From 4135d6083b10f0e0b1c8d05284f146d2ab3c16de Mon Sep 17 00:00:00 2001 From: mailslurp-sdk-bot Date: Fri, 19 Aug 2022 05:46:15 +0000 Subject: [PATCH] 15.13.26 - add-github-releases --- .gitignore | 66 + .gitlab-ci.yml | 33 + .openapi-generator-ignore | 23 + .openapi-generator/VERSION | 1 + .travis.yml | 17 + LICENSE | 7 + README.md | 256 + SECURITY.md | 4 + SUPPORT.md | 4 + docs/AbstractWebhookPayload.md | 14 + docs/AliasControllerApi.md | 741 +++ docs/AliasDto.md | 20 + docs/AliasProjection.md | 18 + docs/ApiUserControllerApi.md | 158 + docs/AttachmentControllerApi.md | 790 +++ docs/AttachmentEntity.md | 19 + docs/AttachmentMetaData.md | 14 + docs/AttachmentProjection.md | 17 + docs/BasicAuthOptions.md | 12 + docs/BounceControllerApi.md | 500 ++ docs/BounceProjection.md | 16 + docs/BounceRecipientProjection.md | 16 + docs/BouncedEmailDto.md | 22 + docs/BouncedRecipientDto.md | 18 + docs/BulkActionsControllerApi.md | 234 + docs/BulkSendEmailOptions.md | 12 + docs/CommonActionsControllerApi.md | 435 ++ docs/Complaint.md | 17 + docs/ConditionOption.md | 12 + docs/ContactControllerApi.md | 467 ++ docs/ContactDto.md | 21 + docs/ContactProjection.md | 18 + docs/ContentMatchOptions.md | 11 + docs/CountDto.md | 11 + docs/CreateAliasOptions.md | 14 + docs/CreateContactOptions.md | 18 + docs/CreateDomainOptions.md | 14 + docs/CreateEmergencyAddressOptions.md | 16 + docs/CreateGroupOptions.md | 12 + docs/CreateInboxDto.md | 21 + docs/CreateInboxForwarderOptions.md | 13 + docs/CreateInboxRulesetOptions.md | 13 + docs/CreateTemplateOptions.md | 12 + docs/CreateTrackingPixelOptions.md | 12 + docs/CreateWebhookOptions.md | 15 + docs/DNSLookupOptions.md | 13 + docs/DNSLookupResult.md | 14 + docs/DNSLookupResults.md | 11 + docs/DeliveryStatusDto.md | 23 + docs/DescribeDomainOptions.md | 11 + docs/DescribeMailServerDomainResult.md | 13 + docs/DomainControllerApi.md | 474 ++ docs/DomainDto.md | 21 + docs/DomainNameRecord.md | 14 + docs/DomainPreview.md | 16 + docs/DownloadAttachmentDto.md | 13 + docs/Email.md | 35 + docs/EmailAnalysis.md | 15 + docs/EmailContentMatchResult.md | 12 + docs/EmailControllerApi.md | 2474 ++++++++++ docs/EmailHtmlDto.md | 11 + docs/EmailLinksResult.md | 12 + docs/EmailPreview.md | 20 + docs/EmailPreviewUrls.md | 12 + docs/EmailProjection.md | 24 + docs/EmailRecipients.md | 13 + docs/EmailTextLinesResult.md | 12 + docs/EmailValidationRequest.md | 16 + docs/EmailVerificationControllerApi.md | 172 + docs/EmailVerificationResult.md | 15 + docs/EmergencyAddress.md | 22 + docs/EmergencyAddressDto.md | 12 + docs/EmptyResponseDto.md | 10 + docs/ExpirationDefaults.md | 15 + docs/ExpiredControllerApi.md | 324 ++ docs/ExpiredInboxDto.md | 13 + docs/ExpiredInboxRecordProjection.md | 14 + docs/ExportControllerApi.md | 178 + docs/ExportLink.md | 11 + docs/ExportOptions.md | 16 + docs/FilterBouncedRecipientsOptions.md | 11 + docs/FilterBouncedRecipientsResult.md | 11 + docs/FlushExpiredInboxesResult.md | 12 + docs/FormControllerApi.md | 98 + docs/ForwardEmailOptions.md | 16 + docs/GravatarUrl.md | 12 + docs/GroupContactsDto.md | 12 + docs/GroupControllerApi.md | 710 +++ docs/GroupDto.md | 14 + docs/GroupProjection.md | 14 + docs/HTMLValidationResult.md | 13 + docs/IPAddressResult.md | 12 + docs/ImapFlagOperationOptions.md | 12 + docs/ImapSmtpAccessDetails.md | 18 + docs/InboxByEmailAddressResult.md | 12 + docs/InboxByNameResult.md | 12 + docs/InboxControllerApi.md | 2774 +++++++++++ docs/InboxDto.md | 23 + docs/InboxExistsDto.md | 11 + docs/InboxForwarderControllerApi.md | 648 +++ docs/InboxForwarderDto.md | 16 + docs/InboxForwarderTestOptions.md | 11 + docs/InboxForwarderTestResult.md | 12 + docs/InboxIdItem.md | 12 + docs/InboxIdsResult.md | 11 + docs/InboxPreview.md | 21 + docs/InboxRulesetControllerApi.md | 648 +++ docs/InboxRulesetDto.md | 17 + docs/InboxRulesetTestOptions.md | 11 + docs/InboxRulesetTestResult.md | 12 + docs/InlineObject.md | 11 + docs/InlineObject1.md | 18 + docs/JSONSchemaDto.md | 11 + docs/MailServerControllerApi.md | 312 ++ docs/MatchOption.md | 13 + docs/MatchOptions.md | 12 + docs/MissedEmail.md | 26 + docs/MissedEmailControllerApi.md | 423 ++ docs/MissedEmailProjection.md | 15 + docs/NameServerRecord.md | 14 + docs/OrganizationInboxProjection.md | 21 + docs/PageAlias.md | 22 + docs/PageAttachmentEntity.md | 22 + docs/PageBouncedEmail.md | 22 + docs/PageBouncedRecipients.md | 22 + docs/PageComplaint.md | 22 + docs/PageContactProjection.md | 22 + docs/PageDeliveryStatus.md | 22 + docs/PageEmailPreview.md | 22 + docs/PageEmailProjection.md | 22 + docs/PageEmailValidationRequest.md | 22 + docs/PageExpiredInboxRecordProjection.md | 22 + docs/PageGroupProjection.md | 22 + docs/PageInboxForwarderDto.md | 22 + docs/PageInboxProjection.md | 22 + docs/PageInboxRulesetDto.md | 22 + docs/PageMissedEmailProjection.md | 22 + docs/PageOrganizationInboxProjection.md | 22 + docs/PagePhoneNumberProjection.md | 22 + docs/PageSentEmailProjection.md | 22 + docs/PageSentEmailWithQueueProjection.md | 22 + docs/PageSmsProjection.md | 22 + docs/PageTemplateProjection.md | 22 + docs/PageThreadProjection.md | 22 + docs/PageTrackingPixelProjection.md | 22 + docs/PageUnknownMissedEmailProjection.md | 22 + docs/PageWebhookProjection.md | 22 + docs/PageWebhookResult.md | 22 + docs/PageableObject.md | 15 + docs/PhoneControllerApi.md | 687 +++ docs/PhoneNumberDto.md | 18 + docs/PhoneNumberProjection.md | 15 + docs/PhonePlanDto.md | 13 + docs/RawEmailJson.md | 11 + docs/Recipient.md | 13 + docs/ReplyToAliasEmailOptions.md | 19 + docs/ReplyToEmailOptions.md | 21 + docs/SendEmailOptions.md | 30 + docs/SendSMTPEnvelopeOptions.md | 13 + docs/SendWithQueueResult.md | 20 + docs/Sender.md | 13 + docs/SentEmailDto.md | 35 + docs/SentEmailProjection.md | 22 + docs/SentEmailsControllerApi.md | 1313 +++++ docs/SetInboxFavouritedOptions.md | 11 + docs/SimpleSendEmailOptions.md | 14 + docs/SmsControllerApi.md | 330 ++ docs/SmsDto.md | 17 + docs/SmsMatchOption.md | 13 + docs/SmsPreview.md | 15 + docs/SmsProjection.md | 17 + docs/Sort.md | 12 + docs/TemplateControllerApi.md | 637 +++ docs/TemplateDto.md | 15 + docs/TemplatePreview.md | 10 + docs/TemplateProjection.md | 15 + docs/TemplateVariable.md | 12 + docs/TestNewInboxForwarderOptions.md | 12 + docs/TestNewInboxRulesetOptions.md | 12 + docs/TestPhoneNumberOptions.md | 10 + docs/ThreadProjection.md | 21 + docs/TrackingControllerApi.md | 250 + docs/TrackingPixelDto.md | 19 + docs/TrackingPixelProjection.md | 19 + docs/UnknownMissedEmailProjection.md | 15 + docs/UnreadCount.md | 11 + docs/UnseenErrorCountDto.md | 11 + docs/UpdateAliasOptions.md | 11 + docs/UpdateDomainOptions.md | 11 + docs/UpdateGroupContacts.md | 11 + docs/UpdateInboxOptions.md | 15 + docs/UploadAttachmentOptions.md | 13 + docs/UserInfoDto.md | 15 + docs/ValidateEmailAddressListOptions.md | 11 + docs/ValidateEmailAddressListResult.md | 13 + docs/ValidationDto.md | 12 + docs/ValidationMessage.md | 12 + docs/VerifyEmailAddressOptions.md | 14 + docs/VerifyWebhookSignatureOptions.md | 11 + docs/VerifyWebhookSignatureResults.md | 10 + docs/WaitForConditions.md | 20 + docs/WaitForControllerApi.md | 702 +++ docs/WaitForSingleSmsOptions.md | 16 + docs/WaitForSmsConditions.md | 21 + docs/WebhookBouncePayload.md | 18 + docs/WebhookBounceRecipientPayload.md | 15 + docs/WebhookControllerApi.md | 2487 ++++++++++ docs/WebhookDeliveryStatusPayload.md | 26 + docs/WebhookDto.md | 23 + docs/WebhookEmailOpenedPayload.md | 19 + docs/WebhookEmailReadPayload.md | 18 + docs/WebhookHeaderNameValue.md | 12 + docs/WebhookHeaders.md | 11 + docs/WebhookNewAttachmentPayload.md | 18 + docs/WebhookNewContactPayload.md | 25 + docs/WebhookNewEmailPayload.md | 24 + docs/WebhookNewSmsPayload.md | 21 + docs/WebhookProjection.md | 18 + docs/WebhookRedriveResult.md | 13 + docs/WebhookResultDto.md | 26 + docs/WebhookTestRequest.md | 14 + docs/WebhookTestResponse.md | 12 + docs/WebhookTestResult.md | 13 + git_push.sh | 58 + mailslurp_client/__init__.py | 245 + mailslurp_client/api/__init__.py | 31 + mailslurp_client/api/alias_controller_api.py | 1174 +++++ .../api/api_user_controller_api.py | 268 ++ .../api/attachment_controller_api.py | 1203 +++++ mailslurp_client/api/bounce_controller_api.py | 780 +++ .../api/bulk_actions_controller_api.py | 374 ++ .../api/common_actions_controller_api.py | 694 +++ .../api/contact_controller_api.py | 717 +++ mailslurp_client/api/domain_controller_api.py | 730 +++ mailslurp_client/api/email_controller_api.py | 3743 +++++++++++++++ .../api/email_verification_controller_api.py | 300 ++ .../api/expired_controller_api.py | 501 ++ mailslurp_client/api/export_controller_api.py | 323 ++ mailslurp_client/api/form_controller_api.py | 178 + mailslurp_client/api/group_controller_api.py | 1106 +++++ mailslurp_client/api/inbox_controller_api.py | 4260 +++++++++++++++++ .../api/inbox_forwarder_controller_api.py | 1007 ++++ .../api/inbox_ruleset_controller_api.py | 1007 ++++ .../api/mail_server_controller_api.py | 498 ++ .../api/missed_email_controller_api.py | 669 +++ mailslurp_client/api/phone_controller_api.py | 1063 ++++ .../api/sent_emails_controller_api.py | 2018 ++++++++ mailslurp_client/api/sms_controller_api.py | 510 ++ .../api/template_controller_api.py | 970 ++++ .../api/tracking_controller_api.py | 403 ++ .../api/wait_for_controller_api.py | 1161 +++++ .../api/webhook_controller_api.py | 3751 +++++++++++++++ mailslurp_client/api_client.py | 667 +++ mailslurp_client/configuration.py | 404 ++ mailslurp_client/exceptions.py | 121 + mailslurp_client/models/__init__.py | 205 + .../models/abstract_webhook_payload.py | 208 + mailslurp_client/models/alias_dto.py | 370 ++ mailslurp_client/models/alias_projection.py | 309 ++ mailslurp_client/models/attachment_entity.py | 333 ++ .../models/attachment_meta_data.py | 211 + .../models/attachment_projection.py | 287 ++ mailslurp_client/models/basic_auth_options.py | 149 + mailslurp_client/models/bounce_projection.py | 253 + .../models/bounce_recipient_projection.py | 253 + mailslurp_client/models/bounced_email_dto.py | 411 ++ .../models/bounced_recipient_dto.py | 305 ++ .../models/bulk_send_email_options.py | 151 + mailslurp_client/models/complaint.py | 307 ++ mailslurp_client/models/condition_option.py | 165 + mailslurp_client/models/contact_dto.py | 385 ++ mailslurp_client/models/contact_projection.py | 306 ++ .../models/content_match_options.py | 124 + mailslurp_client/models/count_dto.py | 122 + .../models/create_alias_options.py | 209 + .../models/create_contact_options.py | 304 ++ .../models/create_domain_options.py | 211 + .../create_emergency_address_options.py | 289 ++ .../models/create_group_options.py | 148 + mailslurp_client/models/create_inbox_dto.py | 399 ++ .../models/create_inbox_forwarder_options.py | 188 + .../models/create_inbox_ruleset_options.py | 194 + .../models/create_template_options.py | 153 + .../models/create_tracking_pixel_options.py | 147 + .../models/create_webhook_options.py | 237 + .../models/delivery_status_dto.py | 463 ++ .../models/describe_domain_options.py | 122 + .../describe_mail_server_domain_result.py | 175 + mailslurp_client/models/dns_lookup_options.py | 190 + mailslurp_client/models/dns_lookup_result.py | 211 + mailslurp_client/models/dns_lookup_results.py | 122 + mailslurp_client/models/domain_dto.py | 411 ++ mailslurp_client/models/domain_name_record.py | 211 + mailslurp_client/models/domain_preview.py | 264 + .../models/download_attachment_dto.py | 182 + mailslurp_client/models/email.py | 780 +++ mailslurp_client/models/email_analysis.py | 230 + .../models/email_content_match_result.py | 149 + mailslurp_client/models/email_html_dto.py | 147 + mailslurp_client/models/email_links_result.py | 149 + mailslurp_client/models/email_preview.py | 372 ++ mailslurp_client/models/email_preview_urls.py | 149 + mailslurp_client/models/email_projection.py | 465 ++ mailslurp_client/models/email_recipients.py | 173 + .../models/email_text_lines_result.py | 149 + .../models/email_validation_request.py | 256 + .../models/email_verification_result.py | 229 + mailslurp_client/models/emergency_address.py | 451 ++ .../models/emergency_address_dto.py | 182 + mailslurp_client/models/empty_response_dto.py | 121 + .../models/expiration_defaults.py | 227 + mailslurp_client/models/expired_inbox_dto.py | 176 + .../models/expired_inbox_record_projection.py | 203 + mailslurp_client/models/export_link.py | 122 + mailslurp_client/models/export_options.py | 258 + .../filter_bounced_recipients_options.py | 122 + .../filter_bounced_recipients_result.py | 122 + .../models/flush_expired_inboxes_result.py | 153 + .../models/forward_email_options.py | 264 + mailslurp_client/models/gravatar_url.py | 149 + mailslurp_client/models/group_contacts_dto.py | 149 + mailslurp_client/models/group_dto.py | 202 + mailslurp_client/models/group_projection.py | 202 + .../models/html_validation_result.py | 182 + .../models/imap_flag_operation_options.py | 155 + .../models/imap_smtp_access_details.py | 327 ++ .../models/inbox_by_email_address_result.py | 148 + .../models/inbox_by_name_result.py | 148 + mailslurp_client/models/inbox_dto.py | 464 ++ mailslurp_client/models/inbox_exists_dto.py | 122 + .../models/inbox_forwarder_dto.py | 263 + .../models/inbox_forwarder_test_options.py | 122 + .../models/inbox_forwarder_test_result.py | 149 + mailslurp_client/models/inbox_id_item.py | 149 + mailslurp_client/models/inbox_ids_result.py | 122 + mailslurp_client/models/inbox_preview.py | 409 ++ mailslurp_client/models/inbox_ruleset_dto.py | 302 ++ .../models/inbox_ruleset_test_options.py | 122 + .../models/inbox_ruleset_test_result.py | 151 + mailslurp_client/models/inline_object.py | 150 + mailslurp_client/models/inline_object1.py | 303 ++ mailslurp_client/models/ip_address_result.py | 149 + mailslurp_client/models/json_schema_dto.py | 122 + mailslurp_client/models/match_option.py | 194 + mailslurp_client/models/match_options.py | 151 + mailslurp_client/models/missed_email.py | 518 ++ .../models/missed_email_projection.py | 227 + mailslurp_client/models/name_server_record.py | 203 + .../models/organization_inbox_projection.py | 411 ++ mailslurp_client/models/page_alias.py | 407 ++ .../models/page_attachment_entity.py | 407 ++ mailslurp_client/models/page_bounced_email.py | 407 ++ .../models/page_bounced_recipients.py | 407 ++ mailslurp_client/models/page_complaint.py | 407 ++ .../models/page_contact_projection.py | 407 ++ .../models/page_delivery_status.py | 407 ++ mailslurp_client/models/page_email_preview.py | 407 ++ .../models/page_email_projection.py | 407 ++ .../models/page_email_validation_request.py | 407 ++ .../page_expired_inbox_record_projection.py | 407 ++ .../models/page_group_projection.py | 407 ++ .../models/page_inbox_forwarder_dto.py | 407 ++ .../models/page_inbox_projection.py | 407 ++ .../models/page_inbox_ruleset_dto.py | 407 ++ .../models/page_missed_email_projection.py | 407 ++ .../page_organization_inbox_projection.py | 407 ++ .../models/page_phone_number_projection.py | 407 ++ .../models/page_sent_email_projection.py | 425 ++ .../page_sent_email_with_queue_projection.py | 425 ++ .../models/page_sms_projection.py | 407 ++ .../models/page_template_projection.py | 407 ++ .../models/page_thread_projection.py | 407 ++ .../models/page_tracking_pixel_projection.py | 407 ++ .../page_unknown_missed_email_projection.py | 407 ++ .../models/page_webhook_projection.py | 407 ++ .../models/page_webhook_result.py | 407 ++ mailslurp_client/models/pageable_object.py | 251 + mailslurp_client/models/phone_number_dto.py | 342 ++ .../models/phone_number_projection.py | 236 + mailslurp_client/models/phone_plan_dto.py | 209 + mailslurp_client/models/raw_email_json.py | 122 + mailslurp_client/models/recipient.py | 175 + .../models/reply_to_alias_email_options.py | 353 ++ .../models/reply_to_email_options.py | 409 ++ mailslurp_client/models/send_email_options.py | 667 +++ .../models/send_smtp_envelope_options.py | 176 + .../models/send_with_queue_result.py | 361 ++ mailslurp_client/models/sender.py | 175 + mailslurp_client/models/sent_email_dto.py | 763 +++ .../models/sent_email_projection.py | 416 ++ .../models/set_inbox_favourited_options.py | 124 + .../models/simple_send_email_options.py | 208 + mailslurp_client/models/sms_dto.py | 311 ++ mailslurp_client/models/sms_match_option.py | 194 + mailslurp_client/models/sms_preview.py | 257 + mailslurp_client/models/sms_projection.py | 284 ++ mailslurp_client/models/sort.py | 173 + mailslurp_client/models/template_dto.py | 240 + mailslurp_client/models/template_preview.py | 122 + .../models/template_projection.py | 230 + mailslurp_client/models/template_variable.py | 159 + .../test_new_inbox_forwarder_options.py | 149 + .../models/test_new_inbox_ruleset_options.py | 149 + .../models/test_phone_number_options.py | 122 + mailslurp_client/models/thread_projection.py | 410 ++ mailslurp_client/models/tracking_pixel_dto.py | 334 ++ .../models/tracking_pixel_projection.py | 333 ++ .../models/unknown_missed_email_projection.py | 227 + mailslurp_client/models/unread_count.py | 122 + .../models/unseen_error_count_dto.py | 122 + .../models/update_alias_options.py | 123 + .../models/update_domain_options.py | 121 + .../models/update_group_contacts.py | 122 + .../models/update_inbox_options.py | 230 + .../models/upload_attachment_options.py | 178 + mailslurp_client/models/user_info_dto.py | 274 ++ .../validate_email_address_list_options.py | 122 + .../validate_email_address_list_result.py | 176 + mailslurp_client/models/validation_dto.py | 151 + mailslurp_client/models/validation_message.py | 148 + .../models/verify_email_address_options.py | 200 + .../verify_webhook_signature_options.py | 149 + .../verify_webhook_signature_results.py | 122 + .../models/wait_for_conditions.py | 389 ++ .../models/wait_for_single_sms_options.py | 285 ++ .../models/wait_for_sms_conditions.py | 418 ++ .../models/webhook_bounce_payload.py | 330 ++ .../webhook_bounce_recipient_payload.py | 245 + .../models/webhook_delivery_status_payload.py | 544 +++ mailslurp_client/models/webhook_dto.py | 469 ++ .../models/webhook_email_opened_payload.py | 361 ++ .../models/webhook_email_read_payload.py | 332 ++ .../models/webhook_header_name_value.py | 153 + mailslurp_client/models/webhook_headers.py | 124 + .../models/webhook_new_attachment_payload.py | 332 ++ .../models/webhook_new_contact_payload.py | 522 ++ .../models/webhook_new_email_payload.py | 504 ++ .../models/webhook_new_sms_payload.py | 418 ++ mailslurp_client/models/webhook_projection.py | 313 ++ .../models/webhook_redrive_result.py | 175 + mailslurp_client/models/webhook_result_dto.py | 539 +++ .../models/webhook_test_request.py | 208 + .../models/webhook_test_response.py | 147 + .../models/webhook_test_result.py | 175 + mailslurp_client/rest.py | 292 ++ requirements.txt | 6 + setup.cfg | 2 + setup.py | 273 ++ test-requirements.txt | 3 + test/__init__.py | 0 test/test_abstract_webhook_payload.py | 59 + test/test_alias_controller_api.py | 97 + test/test_alias_dto.py | 67 + test/test_alias_projection.py | 66 + test/test_api_user_controller_api.py | 46 + test/test_attachment_controller_api.py | 104 + test/test_attachment_entity.py | 65 + test/test_attachment_meta_data.py | 60 + test/test_attachment_projection.py | 63 + test/test_basic_auth_options.py | 56 + test/test_bounce_controller_api.py | 76 + test/test_bounce_projection.py | 60 + test/test_bounce_recipient_projection.py | 60 + test/test_bounced_email_dto.py | 72 + test/test_bounced_recipient_dto.py | 62 + test/test_bulk_actions_controller_api.py | 55 + test/test_bulk_send_email_options.py | 124 + test/test_common_actions_controller_api.py | 69 + test/test_complaint.py | 64 + test/test_condition_option.py | 56 + test/test_contact_controller_api.py | 76 + test/test_contact_dto.py | 75 + test/test_contact_projection.py | 65 + test/test_content_match_options.py | 54 + test/test_count_dto.py | 54 + test/test_create_alias_options.py | 58 + test/test_create_contact_options.py | 64 + test/test_create_domain_options.py | 57 + test/test_create_emergency_address_options.py | 65 + test/test_create_group_options.py | 55 + test/test_create_inbox_dto.py | 65 + test/test_create_inbox_forwarder_options.py | 62 + test/test_create_inbox_ruleset_options.py | 58 + test/test_create_template_options.py | 56 + test/test_create_tracking_pixel_options.py | 54 + test/test_create_webhook_options.py | 65 + test/test_delivery_status_dto.py | 72 + test/test_describe_domain_options.py | 54 + ...test_describe_mail_server_domain_result.py | 69 + test/test_dns_lookup_options.py | 62 + test/test_dns_lookup_result.py | 64 + test/test_dns_lookup_results.py | 70 + test/test_domain_controller_api.py | 76 + test/test_domain_dto.py | 93 + test/test_domain_name_record.py | 64 + test/test_domain_preview.py | 63 + test/test_download_attachment_dto.py | 58 + test/test_email.py | 123 + test/test_email_analysis.py | 57 + test/test_email_content_match_result.py | 60 + test/test_email_controller_api.py | 250 + test/test_email_html_dto.py | 54 + test/test_email_links_result.py | 60 + test/test_email_preview.py | 76 + test/test_email_preview_urls.py | 56 + test/test_email_projection.py | 82 + test/test_email_recipients.py | 70 + test/test_email_text_lines_result.py | 60 + test/test_email_validation_request.py | 63 + .../test_email_verification_controller_api.py | 48 + test/test_email_verification_result.py | 61 + test/test_emergency_address.py | 77 + test/test_emergency_address_dto.py | 58 + test/test_empty_response_dto.py | 53 + test/test_expiration_defaults.py | 59 + test/test_expired_controller_api.py | 62 + test/test_expired_inbox_dto.py | 58 + test/test_expired_inbox_record_projection.py | 60 + test/test_export_controller_api.py | 48 + test/test_export_link.py | 54 + test/test_export_options.py | 59 + .../test_filter_bounced_recipients_options.py | 58 + test/test_filter_bounced_recipients_result.py | 58 + test/test_flush_expired_inboxes_result.py | 60 + test/test_form_controller_api.py | 41 + test/test_forward_email_options.py | 67 + test/test_gravatar_url.py | 56 + test/test_group_contacts_dto.py | 98 + test/test_group_controller_api.py | 96 + test/test_group_dto.py | 59 + test/test_group_projection.py | 59 + test/test_html_validation_result.py | 74 + test/test_imap_flag_operation_options.py | 60 + test/test_imap_smtp_access_details.py | 68 + test/test_inbox_by_email_address_result.py | 55 + test/test_inbox_by_name_result.py | 55 + test/test_inbox_controller_api.py | 270 ++ test/test_inbox_dto.py | 73 + test/test_inbox_exists_dto.py | 54 + test/test_inbox_forwarder_controller_api.py | 90 + test/test_inbox_forwarder_dto.py | 68 + test/test_inbox_forwarder_test_options.py | 54 + test/test_inbox_forwarder_test_result.py | 60 + test/test_inbox_id_item.py | 56 + test/test_inbox_ids_result.py | 62 + test/test_inbox_preview.py | 70 + test/test_inbox_ruleset_controller_api.py | 90 + test/test_inbox_ruleset_dto.py | 66 + test/test_inbox_ruleset_test_options.py | 54 + test/test_inbox_ruleset_test_result.py | 60 + test/test_inline_object.py | 55 + test/test_inline_object1.py | 60 + test/test_ip_address_result.py | 56 + test/test_json_schema_dto.py | 54 + test/test_mail_server_controller_api.py | 62 + test/test_match_option.py | 58 + test/test_match_options.py | 63 + test/test_missed_email.py | 91 + test/test_missed_email_controller_api.py | 69 + test/test_missed_email_projection.py | 59 + test/test_name_server_record.py | 60 + test/test_organization_inbox_projection.py | 71 + test/test_page_alias.py | 86 + test/test_page_attachment_entity.py | 85 + test/test_page_bounced_email.py | 84 + test/test_page_bounced_recipients.py | 84 + test/test_page_complaint.py | 86 + test/test_page_contact_projection.py | 88 + test/test_page_delivery_status.py | 94 + test/test_page_email_preview.py | 96 + test/test_page_email_projection.py | 100 + test/test_page_email_validation_request.py | 84 + ...st_page_expired_inbox_record_projection.py | 82 + test/test_page_group_projection.py | 82 + test/test_page_inbox_forwarder_dto.py | 86 + test/test_page_inbox_projection.py | 91 + test/test_page_inbox_ruleset_dto.py | 85 + test/test_page_missed_email_projection.py | 83 + ...test_page_organization_inbox_projection.py | 91 + test/test_page_phone_number_projection.py | 83 + test/test_page_sent_email_projection.py | 126 + ...t_page_sent_email_with_queue_projection.py | 106 + test/test_page_sms_projection.py | 85 + test/test_page_template_projection.py | 85 + test/test_page_thread_projection.py | 95 + test/test_page_tracking_pixel_projection.py | 87 + ...st_page_unknown_missed_email_projection.py | 85 + test/test_page_webhook_projection.py | 86 + test/test_page_webhook_result.py | 94 + test/test_pageable_object.py | 61 + test/test_phone_controller_api.py | 88 + test/test_phone_number_dto.py | 68 + test/test_phone_number_projection.py | 62 + test/test_phone_plan_dto.py | 60 + test/test_raw_email_json.py | 54 + test/test_recipient.py | 57 + test/test_reply_to_alias_email_options.py | 67 + test/test_reply_to_email_options.py | 69 + test/test_send_email_options.py | 84 + test/test_send_smtp_envelope_options.py | 62 + test/test_send_with_queue_result.py | 68 + test/test_sender.py | 57 + test/test_sent_email_dto.py | 97 + test/test_sent_email_projection.py | 89 + test/test_sent_emails_controller_api.py | 139 + test/test_set_inbox_favourited_options.py | 54 + test/test_simple_send_email_options.py | 57 + test/test_sms_controller_api.py | 62 + test/test_sms_dto.py | 68 + test/test_sms_match_option.py | 58 + test/test_sms_preview.py | 64 + test/test_sms_projection.py | 66 + test/test_sort.py | 55 + test/test_template_controller_api.py | 90 + test/test_template_dto.py | 70 + test/test_template_preview.py | 54 + test/test_template_projection.py | 66 + test/test_template_variable.py | 56 + test/test_test_new_inbox_forwarder_options.py | 68 + test/test_test_new_inbox_ruleset_options.py | 64 + test/test_test_phone_number_options.py | 54 + test/test_thread_projection.py | 78 + test/test_tracking_controller_api.py | 55 + test/test_tracking_pixel_dto.py | 66 + test/test_tracking_pixel_projection.py | 65 + test/test_unknown_missed_email_projection.py | 61 + test/test_unread_count.py | 54 + test/test_unseen_error_count_dto.py | 54 + test/test_update_alias_options.py | 53 + test/test_update_domain_options.py | 53 + test/test_update_group_contacts.py | 58 + test/test_update_inbox_options.py | 59 + test/test_upload_attachment_options.py | 56 + test/test_user_info_dto.py | 63 + ...est_validate_email_address_list_options.py | 58 + ...test_validate_email_address_list_result.py | 70 + test/test_validation_dto.py | 78 + test/test_validation_message.py | 55 + test/test_verify_email_address_options.py | 57 + test/test_verify_webhook_signature_options.py | 56 + test/test_verify_webhook_signature_results.py | 54 + test/test_wait_for_conditions.py | 69 + test/test_wait_for_controller_api.py | 90 + test/test_wait_for_single_sms_options.py | 61 + test/test_wait_for_sms_conditions.py | 71 + test/test_webhook_bounce_payload.py | 69 + test/test_webhook_bounce_recipient_payload.py | 61 + test/test_webhook_controller_api.py | 250 + test/test_webhook_delivery_status_payload.py | 75 + test/test_webhook_dto.py | 78 + test/test_webhook_email_opened_payload.py | 69 + test/test_webhook_email_read_payload.py | 67 + test/test_webhook_header_name_value.py | 56 + test/test_webhook_headers.py | 62 + test/test_webhook_new_attachment_payload.py | 67 + test/test_webhook_new_contact_payload.py | 83 + test/test_webhook_new_email_payload.py | 101 + test/test_webhook_new_sms_payload.py | 73 + test/test_webhook_projection.py | 64 + test/test_webhook_redrive_result.py | 57 + test/test_webhook_result_dto.py | 78 + test/test_webhook_test_request.py | 63 + test/test_webhook_test_response.py | 54 + test/test_webhook_test_result.py | 73 + tox.ini | 9 + 665 files changed, 120071 insertions(+) create mode 100644 .gitignore create mode 100644 .gitlab-ci.yml create mode 100644 .openapi-generator-ignore create mode 100644 .openapi-generator/VERSION create mode 100644 .travis.yml create mode 100644 LICENSE create mode 100644 README.md create mode 100644 SECURITY.md create mode 100644 SUPPORT.md create mode 100644 docs/AbstractWebhookPayload.md create mode 100644 docs/AliasControllerApi.md create mode 100644 docs/AliasDto.md create mode 100644 docs/AliasProjection.md create mode 100644 docs/ApiUserControllerApi.md create mode 100644 docs/AttachmentControllerApi.md create mode 100644 docs/AttachmentEntity.md create mode 100644 docs/AttachmentMetaData.md create mode 100644 docs/AttachmentProjection.md create mode 100644 docs/BasicAuthOptions.md create mode 100644 docs/BounceControllerApi.md create mode 100644 docs/BounceProjection.md create mode 100644 docs/BounceRecipientProjection.md create mode 100644 docs/BouncedEmailDto.md create mode 100644 docs/BouncedRecipientDto.md create mode 100644 docs/BulkActionsControllerApi.md create mode 100644 docs/BulkSendEmailOptions.md create mode 100644 docs/CommonActionsControllerApi.md create mode 100644 docs/Complaint.md create mode 100644 docs/ConditionOption.md create mode 100644 docs/ContactControllerApi.md create mode 100644 docs/ContactDto.md create mode 100644 docs/ContactProjection.md create mode 100644 docs/ContentMatchOptions.md create mode 100644 docs/CountDto.md create mode 100644 docs/CreateAliasOptions.md create mode 100644 docs/CreateContactOptions.md create mode 100644 docs/CreateDomainOptions.md create mode 100644 docs/CreateEmergencyAddressOptions.md create mode 100644 docs/CreateGroupOptions.md create mode 100644 docs/CreateInboxDto.md create mode 100644 docs/CreateInboxForwarderOptions.md create mode 100644 docs/CreateInboxRulesetOptions.md create mode 100644 docs/CreateTemplateOptions.md create mode 100644 docs/CreateTrackingPixelOptions.md create mode 100644 docs/CreateWebhookOptions.md create mode 100644 docs/DNSLookupOptions.md create mode 100644 docs/DNSLookupResult.md create mode 100644 docs/DNSLookupResults.md create mode 100644 docs/DeliveryStatusDto.md create mode 100644 docs/DescribeDomainOptions.md create mode 100644 docs/DescribeMailServerDomainResult.md create mode 100644 docs/DomainControllerApi.md create mode 100644 docs/DomainDto.md create mode 100644 docs/DomainNameRecord.md create mode 100644 docs/DomainPreview.md create mode 100644 docs/DownloadAttachmentDto.md create mode 100644 docs/Email.md create mode 100644 docs/EmailAnalysis.md create mode 100644 docs/EmailContentMatchResult.md create mode 100644 docs/EmailControllerApi.md create mode 100644 docs/EmailHtmlDto.md create mode 100644 docs/EmailLinksResult.md create mode 100644 docs/EmailPreview.md create mode 100644 docs/EmailPreviewUrls.md create mode 100644 docs/EmailProjection.md create mode 100644 docs/EmailRecipients.md create mode 100644 docs/EmailTextLinesResult.md create mode 100644 docs/EmailValidationRequest.md create mode 100644 docs/EmailVerificationControllerApi.md create mode 100644 docs/EmailVerificationResult.md create mode 100644 docs/EmergencyAddress.md create mode 100644 docs/EmergencyAddressDto.md create mode 100644 docs/EmptyResponseDto.md create mode 100644 docs/ExpirationDefaults.md create mode 100644 docs/ExpiredControllerApi.md create mode 100644 docs/ExpiredInboxDto.md create mode 100644 docs/ExpiredInboxRecordProjection.md create mode 100644 docs/ExportControllerApi.md create mode 100644 docs/ExportLink.md create mode 100644 docs/ExportOptions.md create mode 100644 docs/FilterBouncedRecipientsOptions.md create mode 100644 docs/FilterBouncedRecipientsResult.md create mode 100644 docs/FlushExpiredInboxesResult.md create mode 100644 docs/FormControllerApi.md create mode 100644 docs/ForwardEmailOptions.md create mode 100644 docs/GravatarUrl.md create mode 100644 docs/GroupContactsDto.md create mode 100644 docs/GroupControllerApi.md create mode 100644 docs/GroupDto.md create mode 100644 docs/GroupProjection.md create mode 100644 docs/HTMLValidationResult.md create mode 100644 docs/IPAddressResult.md create mode 100644 docs/ImapFlagOperationOptions.md create mode 100644 docs/ImapSmtpAccessDetails.md create mode 100644 docs/InboxByEmailAddressResult.md create mode 100644 docs/InboxByNameResult.md create mode 100644 docs/InboxControllerApi.md create mode 100644 docs/InboxDto.md create mode 100644 docs/InboxExistsDto.md create mode 100644 docs/InboxForwarderControllerApi.md create mode 100644 docs/InboxForwarderDto.md create mode 100644 docs/InboxForwarderTestOptions.md create mode 100644 docs/InboxForwarderTestResult.md create mode 100644 docs/InboxIdItem.md create mode 100644 docs/InboxIdsResult.md create mode 100644 docs/InboxPreview.md create mode 100644 docs/InboxRulesetControllerApi.md create mode 100644 docs/InboxRulesetDto.md create mode 100644 docs/InboxRulesetTestOptions.md create mode 100644 docs/InboxRulesetTestResult.md create mode 100644 docs/InlineObject.md create mode 100644 docs/InlineObject1.md create mode 100644 docs/JSONSchemaDto.md create mode 100644 docs/MailServerControllerApi.md create mode 100644 docs/MatchOption.md create mode 100644 docs/MatchOptions.md create mode 100644 docs/MissedEmail.md create mode 100644 docs/MissedEmailControllerApi.md create mode 100644 docs/MissedEmailProjection.md create mode 100644 docs/NameServerRecord.md create mode 100644 docs/OrganizationInboxProjection.md create mode 100644 docs/PageAlias.md create mode 100644 docs/PageAttachmentEntity.md create mode 100644 docs/PageBouncedEmail.md create mode 100644 docs/PageBouncedRecipients.md create mode 100644 docs/PageComplaint.md create mode 100644 docs/PageContactProjection.md create mode 100644 docs/PageDeliveryStatus.md create mode 100644 docs/PageEmailPreview.md create mode 100644 docs/PageEmailProjection.md create mode 100644 docs/PageEmailValidationRequest.md create mode 100644 docs/PageExpiredInboxRecordProjection.md create mode 100644 docs/PageGroupProjection.md create mode 100644 docs/PageInboxForwarderDto.md create mode 100644 docs/PageInboxProjection.md create mode 100644 docs/PageInboxRulesetDto.md create mode 100644 docs/PageMissedEmailProjection.md create mode 100644 docs/PageOrganizationInboxProjection.md create mode 100644 docs/PagePhoneNumberProjection.md create mode 100644 docs/PageSentEmailProjection.md create mode 100644 docs/PageSentEmailWithQueueProjection.md create mode 100644 docs/PageSmsProjection.md create mode 100644 docs/PageTemplateProjection.md create mode 100644 docs/PageThreadProjection.md create mode 100644 docs/PageTrackingPixelProjection.md create mode 100644 docs/PageUnknownMissedEmailProjection.md create mode 100644 docs/PageWebhookProjection.md create mode 100644 docs/PageWebhookResult.md create mode 100644 docs/PageableObject.md create mode 100644 docs/PhoneControllerApi.md create mode 100644 docs/PhoneNumberDto.md create mode 100644 docs/PhoneNumberProjection.md create mode 100644 docs/PhonePlanDto.md create mode 100644 docs/RawEmailJson.md create mode 100644 docs/Recipient.md create mode 100644 docs/ReplyToAliasEmailOptions.md create mode 100644 docs/ReplyToEmailOptions.md create mode 100644 docs/SendEmailOptions.md create mode 100644 docs/SendSMTPEnvelopeOptions.md create mode 100644 docs/SendWithQueueResult.md create mode 100644 docs/Sender.md create mode 100644 docs/SentEmailDto.md create mode 100644 docs/SentEmailProjection.md create mode 100644 docs/SentEmailsControllerApi.md create mode 100644 docs/SetInboxFavouritedOptions.md create mode 100644 docs/SimpleSendEmailOptions.md create mode 100644 docs/SmsControllerApi.md create mode 100644 docs/SmsDto.md create mode 100644 docs/SmsMatchOption.md create mode 100644 docs/SmsPreview.md create mode 100644 docs/SmsProjection.md create mode 100644 docs/Sort.md create mode 100644 docs/TemplateControllerApi.md create mode 100644 docs/TemplateDto.md create mode 100644 docs/TemplatePreview.md create mode 100644 docs/TemplateProjection.md create mode 100644 docs/TemplateVariable.md create mode 100644 docs/TestNewInboxForwarderOptions.md create mode 100644 docs/TestNewInboxRulesetOptions.md create mode 100644 docs/TestPhoneNumberOptions.md create mode 100644 docs/ThreadProjection.md create mode 100644 docs/TrackingControllerApi.md create mode 100644 docs/TrackingPixelDto.md create mode 100644 docs/TrackingPixelProjection.md create mode 100644 docs/UnknownMissedEmailProjection.md create mode 100644 docs/UnreadCount.md create mode 100644 docs/UnseenErrorCountDto.md create mode 100644 docs/UpdateAliasOptions.md create mode 100644 docs/UpdateDomainOptions.md create mode 100644 docs/UpdateGroupContacts.md create mode 100644 docs/UpdateInboxOptions.md create mode 100644 docs/UploadAttachmentOptions.md create mode 100644 docs/UserInfoDto.md create mode 100644 docs/ValidateEmailAddressListOptions.md create mode 100644 docs/ValidateEmailAddressListResult.md create mode 100644 docs/ValidationDto.md create mode 100644 docs/ValidationMessage.md create mode 100644 docs/VerifyEmailAddressOptions.md create mode 100644 docs/VerifyWebhookSignatureOptions.md create mode 100644 docs/VerifyWebhookSignatureResults.md create mode 100644 docs/WaitForConditions.md create mode 100644 docs/WaitForControllerApi.md create mode 100644 docs/WaitForSingleSmsOptions.md create mode 100644 docs/WaitForSmsConditions.md create mode 100644 docs/WebhookBouncePayload.md create mode 100644 docs/WebhookBounceRecipientPayload.md create mode 100644 docs/WebhookControllerApi.md create mode 100644 docs/WebhookDeliveryStatusPayload.md create mode 100644 docs/WebhookDto.md create mode 100644 docs/WebhookEmailOpenedPayload.md create mode 100644 docs/WebhookEmailReadPayload.md create mode 100644 docs/WebhookHeaderNameValue.md create mode 100644 docs/WebhookHeaders.md create mode 100644 docs/WebhookNewAttachmentPayload.md create mode 100644 docs/WebhookNewContactPayload.md create mode 100644 docs/WebhookNewEmailPayload.md create mode 100644 docs/WebhookNewSmsPayload.md create mode 100644 docs/WebhookProjection.md create mode 100644 docs/WebhookRedriveResult.md create mode 100644 docs/WebhookResultDto.md create mode 100644 docs/WebhookTestRequest.md create mode 100644 docs/WebhookTestResponse.md create mode 100644 docs/WebhookTestResult.md create mode 100644 git_push.sh create mode 100644 mailslurp_client/__init__.py create mode 100644 mailslurp_client/api/__init__.py create mode 100644 mailslurp_client/api/alias_controller_api.py create mode 100644 mailslurp_client/api/api_user_controller_api.py create mode 100644 mailslurp_client/api/attachment_controller_api.py create mode 100644 mailslurp_client/api/bounce_controller_api.py create mode 100644 mailslurp_client/api/bulk_actions_controller_api.py create mode 100644 mailslurp_client/api/common_actions_controller_api.py create mode 100644 mailslurp_client/api/contact_controller_api.py create mode 100644 mailslurp_client/api/domain_controller_api.py create mode 100644 mailslurp_client/api/email_controller_api.py create mode 100644 mailslurp_client/api/email_verification_controller_api.py create mode 100644 mailslurp_client/api/expired_controller_api.py create mode 100644 mailslurp_client/api/export_controller_api.py create mode 100644 mailslurp_client/api/form_controller_api.py create mode 100644 mailslurp_client/api/group_controller_api.py create mode 100644 mailslurp_client/api/inbox_controller_api.py create mode 100644 mailslurp_client/api/inbox_forwarder_controller_api.py create mode 100644 mailslurp_client/api/inbox_ruleset_controller_api.py create mode 100644 mailslurp_client/api/mail_server_controller_api.py create mode 100644 mailslurp_client/api/missed_email_controller_api.py create mode 100644 mailslurp_client/api/phone_controller_api.py create mode 100644 mailslurp_client/api/sent_emails_controller_api.py create mode 100644 mailslurp_client/api/sms_controller_api.py create mode 100644 mailslurp_client/api/template_controller_api.py create mode 100644 mailslurp_client/api/tracking_controller_api.py create mode 100644 mailslurp_client/api/wait_for_controller_api.py create mode 100644 mailslurp_client/api/webhook_controller_api.py create mode 100644 mailslurp_client/api_client.py create mode 100644 mailslurp_client/configuration.py create mode 100644 mailslurp_client/exceptions.py create mode 100644 mailslurp_client/models/__init__.py create mode 100644 mailslurp_client/models/abstract_webhook_payload.py create mode 100644 mailslurp_client/models/alias_dto.py create mode 100644 mailslurp_client/models/alias_projection.py create mode 100644 mailslurp_client/models/attachment_entity.py create mode 100644 mailslurp_client/models/attachment_meta_data.py create mode 100644 mailslurp_client/models/attachment_projection.py create mode 100644 mailslurp_client/models/basic_auth_options.py create mode 100644 mailslurp_client/models/bounce_projection.py create mode 100644 mailslurp_client/models/bounce_recipient_projection.py create mode 100644 mailslurp_client/models/bounced_email_dto.py create mode 100644 mailslurp_client/models/bounced_recipient_dto.py create mode 100644 mailslurp_client/models/bulk_send_email_options.py create mode 100644 mailslurp_client/models/complaint.py create mode 100644 mailslurp_client/models/condition_option.py create mode 100644 mailslurp_client/models/contact_dto.py create mode 100644 mailslurp_client/models/contact_projection.py create mode 100644 mailslurp_client/models/content_match_options.py create mode 100644 mailslurp_client/models/count_dto.py create mode 100644 mailslurp_client/models/create_alias_options.py create mode 100644 mailslurp_client/models/create_contact_options.py create mode 100644 mailslurp_client/models/create_domain_options.py create mode 100644 mailslurp_client/models/create_emergency_address_options.py create mode 100644 mailslurp_client/models/create_group_options.py create mode 100644 mailslurp_client/models/create_inbox_dto.py create mode 100644 mailslurp_client/models/create_inbox_forwarder_options.py create mode 100644 mailslurp_client/models/create_inbox_ruleset_options.py create mode 100644 mailslurp_client/models/create_template_options.py create mode 100644 mailslurp_client/models/create_tracking_pixel_options.py create mode 100644 mailslurp_client/models/create_webhook_options.py create mode 100644 mailslurp_client/models/delivery_status_dto.py create mode 100644 mailslurp_client/models/describe_domain_options.py create mode 100644 mailslurp_client/models/describe_mail_server_domain_result.py create mode 100644 mailslurp_client/models/dns_lookup_options.py create mode 100644 mailslurp_client/models/dns_lookup_result.py create mode 100644 mailslurp_client/models/dns_lookup_results.py create mode 100644 mailslurp_client/models/domain_dto.py create mode 100644 mailslurp_client/models/domain_name_record.py create mode 100644 mailslurp_client/models/domain_preview.py create mode 100644 mailslurp_client/models/download_attachment_dto.py create mode 100644 mailslurp_client/models/email.py create mode 100644 mailslurp_client/models/email_analysis.py create mode 100644 mailslurp_client/models/email_content_match_result.py create mode 100644 mailslurp_client/models/email_html_dto.py create mode 100644 mailslurp_client/models/email_links_result.py create mode 100644 mailslurp_client/models/email_preview.py create mode 100644 mailslurp_client/models/email_preview_urls.py create mode 100644 mailslurp_client/models/email_projection.py create mode 100644 mailslurp_client/models/email_recipients.py create mode 100644 mailslurp_client/models/email_text_lines_result.py create mode 100644 mailslurp_client/models/email_validation_request.py create mode 100644 mailslurp_client/models/email_verification_result.py create mode 100644 mailslurp_client/models/emergency_address.py create mode 100644 mailslurp_client/models/emergency_address_dto.py create mode 100644 mailslurp_client/models/empty_response_dto.py create mode 100644 mailslurp_client/models/expiration_defaults.py create mode 100644 mailslurp_client/models/expired_inbox_dto.py create mode 100644 mailslurp_client/models/expired_inbox_record_projection.py create mode 100644 mailslurp_client/models/export_link.py create mode 100644 mailslurp_client/models/export_options.py create mode 100644 mailslurp_client/models/filter_bounced_recipients_options.py create mode 100644 mailslurp_client/models/filter_bounced_recipients_result.py create mode 100644 mailslurp_client/models/flush_expired_inboxes_result.py create mode 100644 mailslurp_client/models/forward_email_options.py create mode 100644 mailslurp_client/models/gravatar_url.py create mode 100644 mailslurp_client/models/group_contacts_dto.py create mode 100644 mailslurp_client/models/group_dto.py create mode 100644 mailslurp_client/models/group_projection.py create mode 100644 mailslurp_client/models/html_validation_result.py create mode 100644 mailslurp_client/models/imap_flag_operation_options.py create mode 100644 mailslurp_client/models/imap_smtp_access_details.py create mode 100644 mailslurp_client/models/inbox_by_email_address_result.py create mode 100644 mailslurp_client/models/inbox_by_name_result.py create mode 100644 mailslurp_client/models/inbox_dto.py create mode 100644 mailslurp_client/models/inbox_exists_dto.py create mode 100644 mailslurp_client/models/inbox_forwarder_dto.py create mode 100644 mailslurp_client/models/inbox_forwarder_test_options.py create mode 100644 mailslurp_client/models/inbox_forwarder_test_result.py create mode 100644 mailslurp_client/models/inbox_id_item.py create mode 100644 mailslurp_client/models/inbox_ids_result.py create mode 100644 mailslurp_client/models/inbox_preview.py create mode 100644 mailslurp_client/models/inbox_ruleset_dto.py create mode 100644 mailslurp_client/models/inbox_ruleset_test_options.py create mode 100644 mailslurp_client/models/inbox_ruleset_test_result.py create mode 100644 mailslurp_client/models/inline_object.py create mode 100644 mailslurp_client/models/inline_object1.py create mode 100644 mailslurp_client/models/ip_address_result.py create mode 100644 mailslurp_client/models/json_schema_dto.py create mode 100644 mailslurp_client/models/match_option.py create mode 100644 mailslurp_client/models/match_options.py create mode 100644 mailslurp_client/models/missed_email.py create mode 100644 mailslurp_client/models/missed_email_projection.py create mode 100644 mailslurp_client/models/name_server_record.py create mode 100644 mailslurp_client/models/organization_inbox_projection.py create mode 100644 mailslurp_client/models/page_alias.py create mode 100644 mailslurp_client/models/page_attachment_entity.py create mode 100644 mailslurp_client/models/page_bounced_email.py create mode 100644 mailslurp_client/models/page_bounced_recipients.py create mode 100644 mailslurp_client/models/page_complaint.py create mode 100644 mailslurp_client/models/page_contact_projection.py create mode 100644 mailslurp_client/models/page_delivery_status.py create mode 100644 mailslurp_client/models/page_email_preview.py create mode 100644 mailslurp_client/models/page_email_projection.py create mode 100644 mailslurp_client/models/page_email_validation_request.py create mode 100644 mailslurp_client/models/page_expired_inbox_record_projection.py create mode 100644 mailslurp_client/models/page_group_projection.py create mode 100644 mailslurp_client/models/page_inbox_forwarder_dto.py create mode 100644 mailslurp_client/models/page_inbox_projection.py create mode 100644 mailslurp_client/models/page_inbox_ruleset_dto.py create mode 100644 mailslurp_client/models/page_missed_email_projection.py create mode 100644 mailslurp_client/models/page_organization_inbox_projection.py create mode 100644 mailslurp_client/models/page_phone_number_projection.py create mode 100644 mailslurp_client/models/page_sent_email_projection.py create mode 100644 mailslurp_client/models/page_sent_email_with_queue_projection.py create mode 100644 mailslurp_client/models/page_sms_projection.py create mode 100644 mailslurp_client/models/page_template_projection.py create mode 100644 mailslurp_client/models/page_thread_projection.py create mode 100644 mailslurp_client/models/page_tracking_pixel_projection.py create mode 100644 mailslurp_client/models/page_unknown_missed_email_projection.py create mode 100644 mailslurp_client/models/page_webhook_projection.py create mode 100644 mailslurp_client/models/page_webhook_result.py create mode 100644 mailslurp_client/models/pageable_object.py create mode 100644 mailslurp_client/models/phone_number_dto.py create mode 100644 mailslurp_client/models/phone_number_projection.py create mode 100644 mailslurp_client/models/phone_plan_dto.py create mode 100644 mailslurp_client/models/raw_email_json.py create mode 100644 mailslurp_client/models/recipient.py create mode 100644 mailslurp_client/models/reply_to_alias_email_options.py create mode 100644 mailslurp_client/models/reply_to_email_options.py create mode 100644 mailslurp_client/models/send_email_options.py create mode 100644 mailslurp_client/models/send_smtp_envelope_options.py create mode 100644 mailslurp_client/models/send_with_queue_result.py create mode 100644 mailslurp_client/models/sender.py create mode 100644 mailslurp_client/models/sent_email_dto.py create mode 100644 mailslurp_client/models/sent_email_projection.py create mode 100644 mailslurp_client/models/set_inbox_favourited_options.py create mode 100644 mailslurp_client/models/simple_send_email_options.py create mode 100644 mailslurp_client/models/sms_dto.py create mode 100644 mailslurp_client/models/sms_match_option.py create mode 100644 mailslurp_client/models/sms_preview.py create mode 100644 mailslurp_client/models/sms_projection.py create mode 100644 mailslurp_client/models/sort.py create mode 100644 mailslurp_client/models/template_dto.py create mode 100644 mailslurp_client/models/template_preview.py create mode 100644 mailslurp_client/models/template_projection.py create mode 100644 mailslurp_client/models/template_variable.py create mode 100644 mailslurp_client/models/test_new_inbox_forwarder_options.py create mode 100644 mailslurp_client/models/test_new_inbox_ruleset_options.py create mode 100644 mailslurp_client/models/test_phone_number_options.py create mode 100644 mailslurp_client/models/thread_projection.py create mode 100644 mailslurp_client/models/tracking_pixel_dto.py create mode 100644 mailslurp_client/models/tracking_pixel_projection.py create mode 100644 mailslurp_client/models/unknown_missed_email_projection.py create mode 100644 mailslurp_client/models/unread_count.py create mode 100644 mailslurp_client/models/unseen_error_count_dto.py create mode 100644 mailslurp_client/models/update_alias_options.py create mode 100644 mailslurp_client/models/update_domain_options.py create mode 100644 mailslurp_client/models/update_group_contacts.py create mode 100644 mailslurp_client/models/update_inbox_options.py create mode 100644 mailslurp_client/models/upload_attachment_options.py create mode 100644 mailslurp_client/models/user_info_dto.py create mode 100644 mailslurp_client/models/validate_email_address_list_options.py create mode 100644 mailslurp_client/models/validate_email_address_list_result.py create mode 100644 mailslurp_client/models/validation_dto.py create mode 100644 mailslurp_client/models/validation_message.py create mode 100644 mailslurp_client/models/verify_email_address_options.py create mode 100644 mailslurp_client/models/verify_webhook_signature_options.py create mode 100644 mailslurp_client/models/verify_webhook_signature_results.py create mode 100644 mailslurp_client/models/wait_for_conditions.py create mode 100644 mailslurp_client/models/wait_for_single_sms_options.py create mode 100644 mailslurp_client/models/wait_for_sms_conditions.py create mode 100644 mailslurp_client/models/webhook_bounce_payload.py create mode 100644 mailslurp_client/models/webhook_bounce_recipient_payload.py create mode 100644 mailslurp_client/models/webhook_delivery_status_payload.py create mode 100644 mailslurp_client/models/webhook_dto.py create mode 100644 mailslurp_client/models/webhook_email_opened_payload.py create mode 100644 mailslurp_client/models/webhook_email_read_payload.py create mode 100644 mailslurp_client/models/webhook_header_name_value.py create mode 100644 mailslurp_client/models/webhook_headers.py create mode 100644 mailslurp_client/models/webhook_new_attachment_payload.py create mode 100644 mailslurp_client/models/webhook_new_contact_payload.py create mode 100644 mailslurp_client/models/webhook_new_email_payload.py create mode 100644 mailslurp_client/models/webhook_new_sms_payload.py create mode 100644 mailslurp_client/models/webhook_projection.py create mode 100644 mailslurp_client/models/webhook_redrive_result.py create mode 100644 mailslurp_client/models/webhook_result_dto.py create mode 100644 mailslurp_client/models/webhook_test_request.py create mode 100644 mailslurp_client/models/webhook_test_response.py create mode 100644 mailslurp_client/models/webhook_test_result.py create mode 100644 mailslurp_client/rest.py create mode 100644 requirements.txt create mode 100644 setup.cfg create mode 100644 setup.py create mode 100644 test-requirements.txt create mode 100644 test/__init__.py create mode 100644 test/test_abstract_webhook_payload.py create mode 100644 test/test_alias_controller_api.py create mode 100644 test/test_alias_dto.py create mode 100644 test/test_alias_projection.py create mode 100644 test/test_api_user_controller_api.py create mode 100644 test/test_attachment_controller_api.py create mode 100644 test/test_attachment_entity.py create mode 100644 test/test_attachment_meta_data.py create mode 100644 test/test_attachment_projection.py create mode 100644 test/test_basic_auth_options.py create mode 100644 test/test_bounce_controller_api.py create mode 100644 test/test_bounce_projection.py create mode 100644 test/test_bounce_recipient_projection.py create mode 100644 test/test_bounced_email_dto.py create mode 100644 test/test_bounced_recipient_dto.py create mode 100644 test/test_bulk_actions_controller_api.py create mode 100644 test/test_bulk_send_email_options.py create mode 100644 test/test_common_actions_controller_api.py create mode 100644 test/test_complaint.py create mode 100644 test/test_condition_option.py create mode 100644 test/test_contact_controller_api.py create mode 100644 test/test_contact_dto.py create mode 100644 test/test_contact_projection.py create mode 100644 test/test_content_match_options.py create mode 100644 test/test_count_dto.py create mode 100644 test/test_create_alias_options.py create mode 100644 test/test_create_contact_options.py create mode 100644 test/test_create_domain_options.py create mode 100644 test/test_create_emergency_address_options.py create mode 100644 test/test_create_group_options.py create mode 100644 test/test_create_inbox_dto.py create mode 100644 test/test_create_inbox_forwarder_options.py create mode 100644 test/test_create_inbox_ruleset_options.py create mode 100644 test/test_create_template_options.py create mode 100644 test/test_create_tracking_pixel_options.py create mode 100644 test/test_create_webhook_options.py create mode 100644 test/test_delivery_status_dto.py create mode 100644 test/test_describe_domain_options.py create mode 100644 test/test_describe_mail_server_domain_result.py create mode 100644 test/test_dns_lookup_options.py create mode 100644 test/test_dns_lookup_result.py create mode 100644 test/test_dns_lookup_results.py create mode 100644 test/test_domain_controller_api.py create mode 100644 test/test_domain_dto.py create mode 100644 test/test_domain_name_record.py create mode 100644 test/test_domain_preview.py create mode 100644 test/test_download_attachment_dto.py create mode 100644 test/test_email.py create mode 100644 test/test_email_analysis.py create mode 100644 test/test_email_content_match_result.py create mode 100644 test/test_email_controller_api.py create mode 100644 test/test_email_html_dto.py create mode 100644 test/test_email_links_result.py create mode 100644 test/test_email_preview.py create mode 100644 test/test_email_preview_urls.py create mode 100644 test/test_email_projection.py create mode 100644 test/test_email_recipients.py create mode 100644 test/test_email_text_lines_result.py create mode 100644 test/test_email_validation_request.py create mode 100644 test/test_email_verification_controller_api.py create mode 100644 test/test_email_verification_result.py create mode 100644 test/test_emergency_address.py create mode 100644 test/test_emergency_address_dto.py create mode 100644 test/test_empty_response_dto.py create mode 100644 test/test_expiration_defaults.py create mode 100644 test/test_expired_controller_api.py create mode 100644 test/test_expired_inbox_dto.py create mode 100644 test/test_expired_inbox_record_projection.py create mode 100644 test/test_export_controller_api.py create mode 100644 test/test_export_link.py create mode 100644 test/test_export_options.py create mode 100644 test/test_filter_bounced_recipients_options.py create mode 100644 test/test_filter_bounced_recipients_result.py create mode 100644 test/test_flush_expired_inboxes_result.py create mode 100644 test/test_form_controller_api.py create mode 100644 test/test_forward_email_options.py create mode 100644 test/test_gravatar_url.py create mode 100644 test/test_group_contacts_dto.py create mode 100644 test/test_group_controller_api.py create mode 100644 test/test_group_dto.py create mode 100644 test/test_group_projection.py create mode 100644 test/test_html_validation_result.py create mode 100644 test/test_imap_flag_operation_options.py create mode 100644 test/test_imap_smtp_access_details.py create mode 100644 test/test_inbox_by_email_address_result.py create mode 100644 test/test_inbox_by_name_result.py create mode 100644 test/test_inbox_controller_api.py create mode 100644 test/test_inbox_dto.py create mode 100644 test/test_inbox_exists_dto.py create mode 100644 test/test_inbox_forwarder_controller_api.py create mode 100644 test/test_inbox_forwarder_dto.py create mode 100644 test/test_inbox_forwarder_test_options.py create mode 100644 test/test_inbox_forwarder_test_result.py create mode 100644 test/test_inbox_id_item.py create mode 100644 test/test_inbox_ids_result.py create mode 100644 test/test_inbox_preview.py create mode 100644 test/test_inbox_ruleset_controller_api.py create mode 100644 test/test_inbox_ruleset_dto.py create mode 100644 test/test_inbox_ruleset_test_options.py create mode 100644 test/test_inbox_ruleset_test_result.py create mode 100644 test/test_inline_object.py create mode 100644 test/test_inline_object1.py create mode 100644 test/test_ip_address_result.py create mode 100644 test/test_json_schema_dto.py create mode 100644 test/test_mail_server_controller_api.py create mode 100644 test/test_match_option.py create mode 100644 test/test_match_options.py create mode 100644 test/test_missed_email.py create mode 100644 test/test_missed_email_controller_api.py create mode 100644 test/test_missed_email_projection.py create mode 100644 test/test_name_server_record.py create mode 100644 test/test_organization_inbox_projection.py create mode 100644 test/test_page_alias.py create mode 100644 test/test_page_attachment_entity.py create mode 100644 test/test_page_bounced_email.py create mode 100644 test/test_page_bounced_recipients.py create mode 100644 test/test_page_complaint.py create mode 100644 test/test_page_contact_projection.py create mode 100644 test/test_page_delivery_status.py create mode 100644 test/test_page_email_preview.py create mode 100644 test/test_page_email_projection.py create mode 100644 test/test_page_email_validation_request.py create mode 100644 test/test_page_expired_inbox_record_projection.py create mode 100644 test/test_page_group_projection.py create mode 100644 test/test_page_inbox_forwarder_dto.py create mode 100644 test/test_page_inbox_projection.py create mode 100644 test/test_page_inbox_ruleset_dto.py create mode 100644 test/test_page_missed_email_projection.py create mode 100644 test/test_page_organization_inbox_projection.py create mode 100644 test/test_page_phone_number_projection.py create mode 100644 test/test_page_sent_email_projection.py create mode 100644 test/test_page_sent_email_with_queue_projection.py create mode 100644 test/test_page_sms_projection.py create mode 100644 test/test_page_template_projection.py create mode 100644 test/test_page_thread_projection.py create mode 100644 test/test_page_tracking_pixel_projection.py create mode 100644 test/test_page_unknown_missed_email_projection.py create mode 100644 test/test_page_webhook_projection.py create mode 100644 test/test_page_webhook_result.py create mode 100644 test/test_pageable_object.py create mode 100644 test/test_phone_controller_api.py create mode 100644 test/test_phone_number_dto.py create mode 100644 test/test_phone_number_projection.py create mode 100644 test/test_phone_plan_dto.py create mode 100644 test/test_raw_email_json.py create mode 100644 test/test_recipient.py create mode 100644 test/test_reply_to_alias_email_options.py create mode 100644 test/test_reply_to_email_options.py create mode 100644 test/test_send_email_options.py create mode 100644 test/test_send_smtp_envelope_options.py create mode 100644 test/test_send_with_queue_result.py create mode 100644 test/test_sender.py create mode 100644 test/test_sent_email_dto.py create mode 100644 test/test_sent_email_projection.py create mode 100644 test/test_sent_emails_controller_api.py create mode 100644 test/test_set_inbox_favourited_options.py create mode 100644 test/test_simple_send_email_options.py create mode 100644 test/test_sms_controller_api.py create mode 100644 test/test_sms_dto.py create mode 100644 test/test_sms_match_option.py create mode 100644 test/test_sms_preview.py create mode 100644 test/test_sms_projection.py create mode 100644 test/test_sort.py create mode 100644 test/test_template_controller_api.py create mode 100644 test/test_template_dto.py create mode 100644 test/test_template_preview.py create mode 100644 test/test_template_projection.py create mode 100644 test/test_template_variable.py create mode 100644 test/test_test_new_inbox_forwarder_options.py create mode 100644 test/test_test_new_inbox_ruleset_options.py create mode 100644 test/test_test_phone_number_options.py create mode 100644 test/test_thread_projection.py create mode 100644 test/test_tracking_controller_api.py create mode 100644 test/test_tracking_pixel_dto.py create mode 100644 test/test_tracking_pixel_projection.py create mode 100644 test/test_unknown_missed_email_projection.py create mode 100644 test/test_unread_count.py create mode 100644 test/test_unseen_error_count_dto.py create mode 100644 test/test_update_alias_options.py create mode 100644 test/test_update_domain_options.py create mode 100644 test/test_update_group_contacts.py create mode 100644 test/test_update_inbox_options.py create mode 100644 test/test_upload_attachment_options.py create mode 100644 test/test_user_info_dto.py create mode 100644 test/test_validate_email_address_list_options.py create mode 100644 test/test_validate_email_address_list_result.py create mode 100644 test/test_validation_dto.py create mode 100644 test/test_validation_message.py create mode 100644 test/test_verify_email_address_options.py create mode 100644 test/test_verify_webhook_signature_options.py create mode 100644 test/test_verify_webhook_signature_results.py create mode 100644 test/test_wait_for_conditions.py create mode 100644 test/test_wait_for_controller_api.py create mode 100644 test/test_wait_for_single_sms_options.py create mode 100644 test/test_wait_for_sms_conditions.py create mode 100644 test/test_webhook_bounce_payload.py create mode 100644 test/test_webhook_bounce_recipient_payload.py create mode 100644 test/test_webhook_controller_api.py create mode 100644 test/test_webhook_delivery_status_payload.py create mode 100644 test/test_webhook_dto.py create mode 100644 test/test_webhook_email_opened_payload.py create mode 100644 test/test_webhook_email_read_payload.py create mode 100644 test/test_webhook_header_name_value.py create mode 100644 test/test_webhook_headers.py create mode 100644 test/test_webhook_new_attachment_payload.py create mode 100644 test/test_webhook_new_contact_payload.py create mode 100644 test/test_webhook_new_email_payload.py create mode 100644 test/test_webhook_new_sms_payload.py create mode 100644 test/test_webhook_projection.py create mode 100644 test/test_webhook_redrive_result.py create mode 100644 test/test_webhook_result_dto.py create mode 100644 test/test_webhook_test_request.py create mode 100644 test/test_webhook_test_response.py create mode 100644 test/test_webhook_test_result.py create mode 100644 tox.ini diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..43995bd4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,66 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.venv/ +.python-version +.pytest_cache + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +#Ipython Notebook +.ipynb_checkpoints diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..87dce712 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,33 @@ +# ref: https://docs.gitlab.com/ee/ci/README.html + +stages: + - test + +.nosetest: + stage: test + script: + - pip install -r requirements.txt + - pip install -r test-requirements.txt + - pytest --cov=mailslurp_client + +nosetest-2.7: + extends: .nosetest + image: python:2.7-alpine +nosetest-3.3: + extends: .nosetest + image: python:3.3-alpine +nosetest-3.4: + extends: .nosetest + image: python:3.4-alpine +nosetest-3.5: + extends: .nosetest + image: python:3.5-alpine +nosetest-3.6: + extends: .nosetest + image: python:3.6-alpine +nosetest-3.7: + extends: .nosetest + image: python:3.7-alpine +nosetest-3.8: + extends: .nosetest + image: python:3.8-alpine diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION new file mode 100644 index 00000000..ecedc98d --- /dev/null +++ b/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.3.1 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..0bb5a69f --- /dev/null +++ b/.travis.yml @@ -0,0 +1,17 @@ +# ref: https://docs.travis-ci.com/user/languages/python +language: python +python: + - "2.7" + - "3.2" + - "3.3" + - "3.4" + - "3.5" + - "3.6" + - "3.7" + - "3.8" +# command to install dependencies +install: + - "pip install -r requirements.txt" + - "pip install -r test-requirements.txt" +# command to run tests +script: pytest --cov=mailslurp_client diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..c808260a --- /dev/null +++ b/LICENSE @@ -0,0 +1,7 @@ +Copyright 2022 MailSlurp Email API (Provided by Pettman OÜ, Estonia) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 00000000..9ca5ee62 --- /dev/null +++ b/README.md @@ -0,0 +1,256 @@ +# MailSlurp Python Client + +> Create real email addresses on demand. Send and receive emails and attachments from code and tests using Python. + +MailSlurp is an email API service that lets you create real email addresses in code. You can then send and receive emails and attachments in Python applications and tests. + +## Quick links + +- [Method Documentation](https://docs.mailslurp.com/python/docs/) +- [PyPI Package](https://pypi.org/project/mailslurp-client/) +- [Github Source](https://github.com/mailslurp/mailslurp-client-python) +- [Send email using SMTP in Python](https://www.mailslurp.com/smtp/python-send-email-smtp/) +- [SMTP access details](https://www.mailslurp.com/guides/smtp-imap/) + +## Get started + +This section describes how to get up and running with the Python client. + +See the [examples page](https://www.mailslurp.com/examples/) for more examples and use with common frameworks such as Django, Flask and Pytest. + +See the method documentation for a [list of all functions](https://docs.mailslurp.com/ruby/docs/) + +### Create API Key + +First you'll need an API Key. [Create a free account](https://app.mailslurp.com) and copy the key from your dashboard. + +### Install package + +MailSlurp has an official PyPI package called `mailslurp-client`. It supports Python version 2 and 3. + +```bash +pip install mailslurp-client +``` + +On some systems you may need to install `distutils`. + +### Configure + +Once installed you can import `mailslurp_client` and create a configuration with your [API Key](https://app.mailslurp.com). + +```python +import mailslurp_client + +configuration = mailslurp_client.Configuration() +configuration.api_key['x-api-key'] = "your-api-key-here" +``` + +## Common usage + +MailSlurp can be used to create email addresses than can send and receive real emails and attachments in Python. + +### Create an email address + +Use `with` statements to create controllers for each endpoint of the MailSlurp API. + +```python +def create_inbox_example(): + with mailslurp_client.ApiClient(configuration) as api_client: + + # create an inbox using the inbox controller + api_instance = mailslurp_client.InboxControllerApi(api_client) + inbox = api_instance.create_inbox() + + # check the id and email_address of the inbox + assert len(inbox.id) > 0 + assert "mailslurp.com" in inbox.email_address +``` + +#### Inbox types + +Inboxes can be either `SMTP` or `HTTP` type. Set the inbox type using the `inboxType` property. SMTP inboxes are handled by a custom mailserver and support a wide range of clients while HTTP inboxes use Amazon SES and don't support some older clients like Outlook. SMTP inboxes are recommended for public facing email addresses while HTTP inboxes are best for application testing. Please see the guide on [types of inboxes](https://www.mailslurp.com/guides/smtp-vs-http-email-inboxes/) for more information. + +### List inboxes + +```python +def test_can_list_inboxes(self): + # use the with keyword to create an api client + with mailslurp_client.ApiClient(configuration) as api_client: + # create an inbox using the inbox controller + inbox_controller = mailslurp_client.InboxControllerApi(api_client) + inboxes = inbox_controller.get_all_inboxes(page=0) + + # pagination properties + assert inboxes.total_pages > 0 + assert inboxes.total_elements > 0 + + # view contents + assert len(inboxes.content[0].id) > 0 +``` + +### Send emails + +```python +def send_email_example(): + with mailslurp_client.ApiClient(configuration) as api_client: + # first create an inbox + api_instance = mailslurp_client.InboxControllerApi(api_client) + inbox = api_instance.create_inbox() + + # send email from the inbox + send_email_options = mailslurp_client.SendEmailOptions() + send_email_options.to = [inbox.email_address] + send_email_options.subject = "Hello" + send_email_options.body = "Your message" + send_email_options.is_html = True + api_instance.send_email(inbox.id, send_email_options=send_email_options) +``` + +### Send email using SMTP +To use SMTP clients first create an SMTP type inbox and use the inbox controller `get_imap_smtp_access` method to obtain the username, password, port and host. + +```python +import os +import mailslurp_client +from smtplib import SMTP +from mailslurp_client import CreateInboxDto + +api_key = os.environ.get('API_KEY') +assert api_key is not None + +# create a mailslurp configuration +configuration = mailslurp_client.Configuration() +configuration.api_key['x-api-key'] = api_key + + +class Test_MailSlurp_SDK: + # Can send email with SMTP + def test_can_send_with_smtp(self): + with mailslurp_client.ApiClient(configuration) as api_client: + # create an SMTP inbox + inbox_controller = mailslurp_client.InboxControllerApi(api_client) + inbox1 = inbox_controller.create_inbox_with_options(CreateInboxDto(inbox_type="SMTP_INBOX")) + inbox2 = inbox_controller.create_inbox() + assert "@mailslurp.mx" in inbox1.email_address + + # get smtp imap access + smtp_access = inbox_controller.get_imap_smtp_access(inbox_id=inbox1.id) + msg = "Subject: Test subject\r\n\r\nThis is the body" + + # configure smtp client using access details + with SMTP(host=smtp_access.smtp_server_host, port=smtp_access.smtp_server_port) as smtp: + smtp.login(user=smtp_access.smtp_username, password=smtp_access.smtp_password) + smtp.sendmail(from_addr=inbox1.email_address, to_addrs=[inbox2.email_address], msg=msg) + smtp.quit() + + # test that email is sent + wait_for_controller = mailslurp_client.WaitForControllerApi(api_client) + email = wait_for_controller.wait_for_latest_email(inbox_id=inbox2.id) + assert "Test subject" in email.subject +``` + +### Use attachments + +To send attachments first use the `AttachmentControllerApi` to upload a file or byte stream. Then use the attachment ID returned with subsequent send calls. + +```python +@staticmethod +def upload_attachment(): + with mailslurp_client.ApiClient(configuration) as api_client: + import base64 + + file_bytes = "Your file's bytes".encode("utf-8") + encoded_contents = base64.b64encode(file_bytes) + attachment_controller = mailslurp_client.AttachmentControllerApi(api_client) + + upload_options = mailslurp_client.UploadAttachmentOptions( + content_type="text/plain", + filename="test.txt", + base64_contents=str(encoded_contents, 'utf-8') + ) + print("upload_options = {}".format(upload_options)) + return attachment_controller.upload_attachment(upload_options) +``` + +### Receive emails and extract content + +```python +def receive_email_and_extract_content_example(): + with mailslurp_client.ApiClient(configuration) as api_client: + # create two inboxes for testing + inbox_controller = mailslurp_client.InboxControllerApi(api_client) + inbox_1 = inbox_controller.create_inbox() + inbox_2 = inbox_controller.create_inbox() + + # send email from inbox 1 to inbox 2 + send_email_options = mailslurp_client.SendEmailOptions() + send_email_options.to = [inbox_2.email_address] + send_email_options.subject = "Hello inbox 2" + send_email_options.body = "Your code is: 123" + send_email_options.attachments = self.upload_attachment() # see previous section + + inbox_controller.send_email(inbox_1.id, send_email_options=send_email_options) + + # receive email for inbox 2 + waitfor_controller = mailslurp_client.WaitForControllerApi(api_client) + email = waitfor_controller.wait_for_latest_email(inbox_id=inbox_2.id, timeout=30000, unread_only=True) + + assert email.subject == "Hello inbox 2" + + # extract content from body + import re + pattern = re.compile('Your code is: ([0-9]{3})') + matches = pattern.match(email.body) + code = matches.group(1) + + assert code == "123" +``` + +### Download attachments + +```python + +def receive_email_and_extract_content_example(): + with mailslurp_client.ApiClient(configuration) as api_client: + # wait for email to be received by inbox 2 + email = wait_controller.wait_for_latest_email(inbox_id=inbox_2.id, timeout=30000, unread_only=True) + + # assert that the message was received + assert email.inbox_id == inbox_2.id + assert email.subject == "Hello" + + # attachment ids pressent + assert len(email.attachments) == 1 + + # download attachment content + email_controller = mailslurp_client.EmailControllerApi(api_client) + downloaded_bytes = email_controller.download_attachment(email.attachments[0], email.id) + assert len(downloaded_bytes) > 0 + + # alternatively download as base64 string with more meta data + email_controller = mailslurp_client.EmailControllerApi(api_client) + downloaded_attachment = email_controller.download_attachment_base64(email.attachments[0], email.id) + assert downloaded_attachment.content_type == "text/plain" + base64_contents = downloaded_attachment.base64_file_contents + import base64 + attachment_bytes = base64.b64decode(base64_contents) + assert len(attachment_bytes) > 0 +``` + +### Verify email address + +You can verify email addresses with MailSlurp. This will perform SMTP queries for the email address on your behalf. + +```python +def test_validate_email(self): + with mailslurp_client.ApiClient(configuration) as api_client: + mailserver_controller = mailslurp_client.MailServerControllerApi(api_client) + verify_options = mailslurp_client.VerifyEmailAddressOptions(email_address="test@gmail.com") + result = mailserver_controller.verify_email_address(verify_options=verify_options) + assert result.error is None + assert result.is_valid is True +``` + +## SDK Documentation + +See the [guides page](https://www.mailslurp.com/guides/) or [the examples](https://www.github.com/mailslurp/examples) or the [Method Documentation](https://docs.mailslurp.com/ruby/docs/) for full usage. diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..dc36834d --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,4 @@ +# Security + +This client calls the MailSlurp API endpoints. Connections should be made over secure HTTPS using your secure API Token. Do not share or commit the token if you can avoid doing so. +To report security issues or talk with MailSlurp support please email [support@mailslurp.zendesk.com](mailto:support@mailslurp.zendesk.com). diff --git a/SUPPORT.md b/SUPPORT.md new file mode 100644 index 00000000..96f6bd0f --- /dev/null +++ b/SUPPORT.md @@ -0,0 +1,4 @@ +# Support + +To report issues or talk with MailSlurp support please email [support@mailslurp.zendesk.com](mailto:support@mailslurp.zendesk.com). +Alternatively you can visit our [support portal](https://mailslurp.zendesk.com) or open a ticket in the corresponding [Github repository](https://www.github.com/mailslurp). diff --git a/docs/AbstractWebhookPayload.md b/docs/AbstractWebhookPayload.md new file mode 100644 index 00000000..823f370c --- /dev/null +++ b/docs/AbstractWebhookPayload.md @@ -0,0 +1,14 @@ +# AbstractWebhookPayload + +Abstract webhook payload. Use the correct payload type for your webhook event type in order to access all the specific properties for that event. See the `NEW_EMAIL`,`NEW_CONTACT`, `NEW_ATTACHMENT` and `EMAIL_OPENED` payloads for the properties available for those events. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_name** | **str** | | +**message_id** | **str** | | +**webhook_id** | **str** | | +**webhook_name** | **str** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/AliasControllerApi.md b/docs/AliasControllerApi.md new file mode 100644 index 00000000..13dcefe4 --- /dev/null +++ b/docs/AliasControllerApi.md @@ -0,0 +1,741 @@ +# mailslurp_client.AliasControllerApi + +All URIs are relative to *https://python.api.mailslurp.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_alias**](AliasControllerApi#create_alias) | **POST** /aliases | Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active. +[**delete_alias**](AliasControllerApi#delete_alias) | **DELETE** /aliases/{aliasId} | Delete an email alias +[**get_alias**](AliasControllerApi#get_alias) | **GET** /aliases/{aliasId} | Get an email alias +[**get_alias_emails**](AliasControllerApi#get_alias_emails) | **GET** /aliases/{aliasId}/emails | Get emails for an alias +[**get_alias_threads**](AliasControllerApi#get_alias_threads) | **GET** /aliases/{aliasId}/threads | Get threads created for an alias +[**get_aliases**](AliasControllerApi#get_aliases) | **GET** /aliases | Get all email aliases you have created +[**reply_to_alias_email**](AliasControllerApi#reply_to_alias_email) | **PUT** /aliases/{aliasId}/emails/{emailId} | Reply to an email +[**send_alias_email**](AliasControllerApi#send_alias_email) | **POST** /aliases/{aliasId}/emails | Send an email from an alias inbox +[**update_alias**](AliasControllerApi#update_alias) | **PUT** /aliases/{aliasId} | Update an email alias + + +# **create_alias** +> AliasDto create_alias(create_alias_options) + +Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active. + +Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.AliasControllerApi(api_client) + create_alias_options = mailslurp_client.CreateAliasOptions() # CreateAliasOptions | + + try: + # Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active. + api_response = api_instance.create_alias(create_alias_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling AliasControllerApi->create_alias: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_alias_options** | [**CreateAliasOptions**](CreateAliasOptions)| | + +### Return type + +[**AliasDto**](AliasDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **delete_alias** +> delete_alias(alias_id) + +Delete an email alias + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.AliasControllerApi(api_client) + alias_id = 'alias_id_example' # str | + + try: + # Delete an email alias + api_instance.delete_alias(alias_id) + except ApiException as e: + print("Exception when calling AliasControllerApi->delete_alias: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **alias_id** | [**str**]()| | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_alias** +> AliasDto get_alias(alias_id) + +Get an email alias + +Get an email alias by ID + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.AliasControllerApi(api_client) + alias_id = 'alias_id_example' # str | + + try: + # Get an email alias + api_response = api_instance.get_alias(alias_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling AliasControllerApi->get_alias: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **alias_id** | [**str**]()| | + +### Return type + +[**AliasDto**](AliasDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_alias_emails** +> PageEmailProjection get_alias_emails(alias_id, page=page, size=size, sort=sort, since=since, before=before) + +Get emails for an alias + +Get paginated emails for an alias by ID + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.AliasControllerApi(api_client) + alias_id = 'alias_id_example' # str | +page = 0 # int | Optional page index alias email list pagination (optional) (default to 0) +size = 20 # int | Optional page size alias email list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +since = '2013-10-20T19:20:30+01:00' # datetime | Optional filter by sent after given date time (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Optional filter by sent before given date time (optional) + + try: + # Get emails for an alias + api_response = api_instance.get_alias_emails(alias_id, page=page, size=size, sort=sort, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling AliasControllerApi->get_alias_emails: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **alias_id** | [**str**]()| | + **page** | **int**| Optional page index alias email list pagination | [optional] [default to 0] + **size** | **int**| Optional page size alias email list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **since** | **datetime**| Optional filter by sent after given date time | [optional] + **before** | **datetime**| Optional filter by sent before given date time | [optional] + +### Return type + +[**PageEmailProjection**](PageEmailProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_alias_threads** +> PageThreadProjection get_alias_threads(alias_id, page=page, size=size, sort=sort, since=since, before=before) + +Get threads created for an alias + +Returns threads created for an email alias in paginated form + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.AliasControllerApi(api_client) + alias_id = 'alias_id_example' # str | +page = 0 # int | Optional page index in thread list pagination (optional) (default to 0) +size = 20 # int | Optional page size in thread list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +since = '2013-10-20T19:20:30+01:00' # datetime | Optional filter by sent after given date time (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Optional filter by sent before given date time (optional) + + try: + # Get threads created for an alias + api_response = api_instance.get_alias_threads(alias_id, page=page, size=size, sort=sort, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling AliasControllerApi->get_alias_threads: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **alias_id** | [**str**]()| | + **page** | **int**| Optional page index in thread list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in thread list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **since** | **datetime**| Optional filter by sent after given date time | [optional] + **before** | **datetime**| Optional filter by sent before given date time | [optional] + +### Return type + +[**PageThreadProjection**](PageThreadProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_aliases** +> PageAlias get_aliases(page=page, size=size, sort=sort, since=since, before=before) + +Get all email aliases you have created + +Get all email aliases in paginated form + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.AliasControllerApi(api_client) + page = 0 # int | Optional page index in alias list pagination (optional) (default to 0) +size = 20 # int | Optional page size in alias list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) + + try: + # Get all email aliases you have created + api_response = api_instance.get_aliases(page=page, size=size, sort=sort, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling AliasControllerApi->get_aliases: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Optional page index in alias list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in alias list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + +### Return type + +[**PageAlias**](PageAlias) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **reply_to_alias_email** +> SentEmailDto reply_to_alias_email(alias_id, email_id, reply_to_alias_email_options) + +Reply to an email + +Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.AliasControllerApi(api_client) + alias_id = 'alias_id_example' # str | ID of the alias that email belongs to +email_id = 'email_id_example' # str | ID of the email that should be replied to +reply_to_alias_email_options = mailslurp_client.ReplyToAliasEmailOptions() # ReplyToAliasEmailOptions | + + try: + # Reply to an email + api_response = api_instance.reply_to_alias_email(alias_id, email_id, reply_to_alias_email_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling AliasControllerApi->reply_to_alias_email: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **alias_id** | [**str**]()| ID of the alias that email belongs to | + **email_id** | [**str**]()| ID of the email that should be replied to | + **reply_to_alias_email_options** | [**ReplyToAliasEmailOptions**](ReplyToAliasEmailOptions)| | + +### Return type + +[**SentEmailDto**](SentEmailDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **send_alias_email** +> SentEmailDto send_alias_email(alias_id, send_email_options) + +Send an email from an alias inbox + +Send an email from an alias. Replies to the email will be forwarded to the alias masked email address + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.AliasControllerApi(api_client) + alias_id = 'alias_id_example' # str | +send_email_options = mailslurp_client.SendEmailOptions() # SendEmailOptions | + + try: + # Send an email from an alias inbox + api_response = api_instance.send_alias_email(alias_id, send_email_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling AliasControllerApi->send_alias_email: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **alias_id** | [**str**]()| | + **send_email_options** | [**SendEmailOptions**](SendEmailOptions)| | + +### Return type + +[**SentEmailDto**](SentEmailDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **update_alias** +> AliasDto update_alias(alias_id, update_alias_options) + +Update an email alias + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.AliasControllerApi(api_client) + alias_id = 'alias_id_example' # str | +update_alias_options = mailslurp_client.UpdateAliasOptions() # UpdateAliasOptions | + + try: + # Update an email alias + api_response = api_instance.update_alias(alias_id, update_alias_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling AliasControllerApi->update_alias: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **alias_id** | [**str**]()| | + **update_alias_options** | [**UpdateAliasOptions**](UpdateAliasOptions)| | + +### Return type + +[**AliasDto**](AliasDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**202** | Accepted | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/AliasDto.md b/docs/AliasDto.md new file mode 100644 index 00000000..c313961b --- /dev/null +++ b/docs/AliasDto.md @@ -0,0 +1,20 @@ +# AliasDto + +Email alias representation +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**email_address** | **str** | The alias's email address for receiving email | +**masked_email_address** | **str** | The underlying email address that is hidden and will received forwarded email | [optional] +**user_id** | **str** | | +**inbox_id** | **str** | Inbox that is associated with the alias | +**name** | **str** | | [optional] +**use_threads** | **bool** | If alias will generate response threads or not when email are received by it | [optional] +**is_verified** | **bool** | Has the alias been verified. You must verify an alias if the masked email address has not yet been verified by your account | +**created_at** | **datetime** | | [optional] +**updated_at** | **datetime** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/AliasProjection.md b/docs/AliasProjection.md new file mode 100644 index 00000000..59c954ca --- /dev/null +++ b/docs/AliasProjection.md @@ -0,0 +1,18 @@ +# AliasProjection + +Representation of a alias +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**id** | **str** | | +**inbox_id** | **str** | | +**user_id** | **str** | | +**email_address** | **str** | | +**created_at** | **datetime** | | +**use_threads** | **bool** | | [optional] +**updated_at** | **datetime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/ApiUserControllerApi.md b/docs/ApiUserControllerApi.md new file mode 100644 index 00000000..775d94ba --- /dev/null +++ b/docs/ApiUserControllerApi.md @@ -0,0 +1,158 @@ +# mailslurp_client.ApiUserControllerApi + +All URIs are relative to *https://python.api.mailslurp.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_json_property_as_string**](ApiUserControllerApi#get_json_property_as_string) | **POST** /user/json/pluck | +[**get_user_info**](ApiUserControllerApi#get_user_info) | **GET** /user/info | + + +# **get_json_property_as_string** +> str get_json_property_as_string(_property, body) + + + +Utility function to extract properties from JSON objects in language where this is cumbersome. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.ApiUserControllerApi(api_client) + _property = '_property_example' # str | JSON property name or dot separated path selector such as `a.b.c` +body = None # object | + + try: + api_response = api_instance.get_json_property_as_string(_property, body) + pprint(api_response) + except ApiException as e: + print("Exception when calling ApiUserControllerApi->get_json_property_as_string: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **_property** | **str**| JSON property name or dot separated path selector such as `a.b.c` | + **body** | **object**| | + +### Return type + +**str** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_user_info** +> UserInfoDto get_user_info() + + + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.ApiUserControllerApi(api_client) + + try: + api_response = api_instance.get_user_info() + pprint(api_response) + except ApiException as e: + print("Exception when calling ApiUserControllerApi->get_user_info: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**UserInfoDto**](UserInfoDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/AttachmentControllerApi.md b/docs/AttachmentControllerApi.md new file mode 100644 index 00000000..4076351c --- /dev/null +++ b/docs/AttachmentControllerApi.md @@ -0,0 +1,790 @@ +# mailslurp_client.AttachmentControllerApi + +All URIs are relative to *https://python.api.mailslurp.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**delete_all_attachments**](AttachmentControllerApi#delete_all_attachments) | **DELETE** /attachments | Delete all attachments +[**delete_attachment**](AttachmentControllerApi#delete_attachment) | **DELETE** /attachments/{attachmentId} | Delete an attachment +[**download_attachment_as_base64_encoded**](AttachmentControllerApi#download_attachment_as_base64_encoded) | **GET** /attachments/{attachmentId}/base64 | Get email attachment as base64 encoded string as alternative to binary responses. To read the content decode the Base64 encoded contents. +[**download_attachment_as_bytes**](AttachmentControllerApi#download_attachment_as_bytes) | **GET** /attachments/{attachmentId}/bytes | Download attachments. Get email attachment bytes. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints. +[**get_attachment**](AttachmentControllerApi#get_attachment) | **GET** /attachments/{attachmentId} | Get an attachment entity +[**get_attachment_info**](AttachmentControllerApi#get_attachment_info) | **GET** /attachments/{attachmentId}/metadata | Get email attachment metadata information +[**get_attachments**](AttachmentControllerApi#get_attachments) | **GET** /attachments | Get email attachments +[**upload_attachment**](AttachmentControllerApi#upload_attachment) | **POST** /attachments | Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment. +[**upload_attachment_bytes**](AttachmentControllerApi#upload_attachment_bytes) | **POST** /attachments/bytes | Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment. +[**upload_multipart_form**](AttachmentControllerApi#upload_multipart_form) | **POST** /attachments/multipart | Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment. + + +# **delete_all_attachments** +> delete_all_attachments() + +Delete all attachments + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.AttachmentControllerApi(api_client) + + try: + # Delete all attachments + api_instance.delete_all_attachments() + except ApiException as e: + print("Exception when calling AttachmentControllerApi->delete_all_attachments: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **delete_attachment** +> delete_attachment(attachment_id) + +Delete an attachment + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.AttachmentControllerApi(api_client) + attachment_id = 'attachment_id_example' # str | ID of attachment + + try: + # Delete an attachment + api_instance.delete_attachment(attachment_id) + except ApiException as e: + print("Exception when calling AttachmentControllerApi->delete_attachment: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attachment_id** | **str**| ID of attachment | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **download_attachment_as_base64_encoded** +> DownloadAttachmentDto download_attachment_as_base64_encoded(attachment_id) + +Get email attachment as base64 encoded string as alternative to binary responses. To read the content decode the Base64 encoded contents. + +Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.AttachmentControllerApi(api_client) + attachment_id = 'attachment_id_example' # str | ID of attachment + + try: + # Get email attachment as base64 encoded string as alternative to binary responses. To read the content decode the Base64 encoded contents. + api_response = api_instance.download_attachment_as_base64_encoded(attachment_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling AttachmentControllerApi->download_attachment_as_base64_encoded: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attachment_id** | **str**| ID of attachment | + +### Return type + +[**DownloadAttachmentDto**](DownloadAttachmentDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **download_attachment_as_bytes** +> str download_attachment_as_bytes(attachment_id) + +Download attachments. Get email attachment bytes. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints. + +Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.AttachmentControllerApi(api_client) + attachment_id = 'attachment_id_example' # str | ID of attachment + + try: + # Download attachments. Get email attachment bytes. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints. + api_response = api_instance.download_attachment_as_bytes(attachment_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling AttachmentControllerApi->download_attachment_as_bytes: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attachment_id** | **str**| ID of attachment | + +### Return type + +**str** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/octet-stream + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**0** | default response | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_attachment** +> AttachmentEntity get_attachment(attachment_id) + +Get an attachment entity + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.AttachmentControllerApi(api_client) + attachment_id = 'attachment_id_example' # str | ID of attachment + + try: + # Get an attachment entity + api_response = api_instance.get_attachment(attachment_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling AttachmentControllerApi->get_attachment: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attachment_id** | **str**| ID of attachment | + +### Return type + +[**AttachmentEntity**](AttachmentEntity) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_attachment_info** +> AttachmentMetaData get_attachment_info(attachment_id) + +Get email attachment metadata information + +Returns the metadata for an attachment. It is saved separately to the content of the attachment. Contains properties `name` and `content-type` and `content-length` in bytes for a given attachment. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.AttachmentControllerApi(api_client) + attachment_id = 'attachment_id_example' # str | ID of attachment + + try: + # Get email attachment metadata information + api_response = api_instance.get_attachment_info(attachment_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling AttachmentControllerApi->get_attachment_info: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **attachment_id** | **str**| ID of attachment | + +### Return type + +[**AttachmentMetaData**](AttachmentMetaData) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_attachments** +> PageAttachmentEntity get_attachments(page=page, size=size, sort=sort, file_name_filter=file_name_filter, since=since, before=before) + +Get email attachments + +Get all attachments in paginated response. Each entity contains meta data for the attachment such as `name` and `content-type`. Use the `attachmentId` and the download endpoints to get the file contents. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.AttachmentControllerApi(api_client) + page = 0 # int | Optional page index for list pagination (optional) (default to 0) +size = 20 # int | Optional page size for list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +file_name_filter = 'file_name_filter_example' # str | Optional file name and content type search filter (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) + + try: + # Get email attachments + api_response = api_instance.get_attachments(page=page, size=size, sort=sort, file_name_filter=file_name_filter, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling AttachmentControllerApi->get_attachments: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Optional page index for list pagination | [optional] [default to 0] + **size** | **int**| Optional page size for list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **file_name_filter** | **str**| Optional file name and content type search filter | [optional] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + +### Return type + +[**PageAttachmentEntity**](PageAttachmentEntity) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **upload_attachment** +> list[str] upload_attachment(upload_attachment_options) + +Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.AttachmentControllerApi(api_client) + upload_attachment_options = mailslurp_client.UploadAttachmentOptions() # UploadAttachmentOptions | + + try: + # Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment. + api_response = api_instance.upload_attachment(upload_attachment_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling AttachmentControllerApi->upload_attachment: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **upload_attachment_options** | [**UploadAttachmentOptions**](UploadAttachmentOptions)| | + +### Return type + +**list[str]** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **upload_attachment_bytes** +> list[str] upload_attachment_bytes(inline_object1, content_type=content_type, filename=filename) + +Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.AttachmentControllerApi(api_client) + inline_object1 = mailslurp_client.InlineObject1() # InlineObject1 | +content_type = 'content_type_example' # str | Optional contentType for file. For instance `application/pdf` (optional) +filename = 'filename_example' # str | Optional filename to save upload with (optional) + + try: + # Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment. + api_response = api_instance.upload_attachment_bytes(inline_object1, content_type=content_type, filename=filename) + pprint(api_response) + except ApiException as e: + print("Exception when calling AttachmentControllerApi->upload_attachment_bytes: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inline_object1** | [**InlineObject1**](InlineObject1)| | + **content_type** | **str**| Optional contentType for file. For instance `application/pdf` | [optional] + **filename** | **str**| Optional filename to save upload with | [optional] + +### Return type + +**list[str]** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/octet-stream + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **upload_multipart_form** +> list[str] upload_multipart_form(content_type=content_type, filename=filename, x_filename=x_filename, inline_object=inline_object) + +Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.AttachmentControllerApi(api_client) + content_type = 'content_type_example' # str | Optional content type of attachment (optional) +filename = 'filename_example' # str | Optional name of file (optional) +x_filename = 'x_filename_example' # str | Optional content type header of attachment (optional) +inline_object = mailslurp_client.InlineObject() # InlineObject | (optional) + + try: + # Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment. + api_response = api_instance.upload_multipart_form(content_type=content_type, filename=filename, x_filename=x_filename, inline_object=inline_object) + pprint(api_response) + except ApiException as e: + print("Exception when calling AttachmentControllerApi->upload_multipart_form: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **content_type** | **str**| Optional content type of attachment | [optional] + **filename** | **str**| Optional name of file | [optional] + **x_filename** | **str**| Optional content type header of attachment | [optional] + **inline_object** | [**InlineObject**](InlineObject)| | [optional] + +### Return type + +**list[str]** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/AttachmentEntity.md b/docs/AttachmentEntity.md new file mode 100644 index 00000000..89b6cc4e --- /dev/null +++ b/docs/AttachmentEntity.md @@ -0,0 +1,19 @@ +# AttachmentEntity + +Email attachment entity +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**attachment_id** | **str** | | +**bucket** | **str** | | [optional] +**user_id** | **str** | | +**content_type** | **str** | | [optional] +**content_length** | **int** | | [optional] +**name** | **str** | | [optional] +**created_at** | **datetime** | | +**updated_at** | **datetime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/AttachmentMetaData.md b/docs/AttachmentMetaData.md new file mode 100644 index 00000000..55d8755a --- /dev/null +++ b/docs/AttachmentMetaData.md @@ -0,0 +1,14 @@ +# AttachmentMetaData + +Meta data associated with an attachment. Attachments are stored as byte blobs so the meta data is stored separately. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of attachment if given | +**content_type** | **str** | Content type of attachment such as `image/png` | +**content_length** | **int** | Size of attachment in bytes | +**id** | **str** | ID of attachment. Can be used to with attachment controller endpoints to download attachment or with sending methods to attach to an email. | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/AttachmentProjection.md b/docs/AttachmentProjection.md new file mode 100644 index 00000000..454791c0 --- /dev/null +++ b/docs/AttachmentProjection.md @@ -0,0 +1,17 @@ +# AttachmentProjection + +Email attachment data +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**content_length** | **int** | Content length of attachment in bytes | [optional] +**content_type** | **str** | Content type of attachment. | [optional] +**user_id** | **str** | | +**attachment_id** | **str** | Attachment ID | +**created_at** | **datetime** | | +**updated_at** | **datetime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/BasicAuthOptions.md b/docs/BasicAuthOptions.md new file mode 100644 index 00000000..f0d3a94f --- /dev/null +++ b/docs/BasicAuthOptions.md @@ -0,0 +1,12 @@ +# BasicAuthOptions + +Basic Authentication options for webhooks. Will be used is present when calling webhook endpoints. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **str** | | +**password** | **str** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/BounceControllerApi.md b/docs/BounceControllerApi.md new file mode 100644 index 00000000..9da7f5b8 --- /dev/null +++ b/docs/BounceControllerApi.md @@ -0,0 +1,500 @@ +# mailslurp_client.BounceControllerApi + +All URIs are relative to *https://python.api.mailslurp.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**filter_bounced_recipient**](BounceControllerApi#filter_bounced_recipient) | **POST** /bounce/filter-recipients | Filter a list of email recipients and remove those who have bounced +[**get_bounced_email**](BounceControllerApi#get_bounced_email) | **GET** /bounce/emails/{id} | Get a bounced email. +[**get_bounced_emails**](BounceControllerApi#get_bounced_emails) | **GET** /bounce/emails | Get paginated list of bounced emails. +[**get_bounced_recipient**](BounceControllerApi#get_bounced_recipient) | **GET** /bounce/recipients/{id} | Get a bounced email. +[**get_bounced_recipients**](BounceControllerApi#get_bounced_recipients) | **GET** /bounce/recipients | Get paginated list of bounced recipients. +[**get_complaints**](BounceControllerApi#get_complaints) | **GET** /bounce/complaints | Get paginated list of complaints. + + +# **filter_bounced_recipient** +> FilterBouncedRecipientsResult filter_bounced_recipient(filter_bounced_recipients_options) + +Filter a list of email recipients and remove those who have bounced + +Prevent email sending errors by remove recipients who have resulted in past email bounces or complaints + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.BounceControllerApi(api_client) + filter_bounced_recipients_options = mailslurp_client.FilterBouncedRecipientsOptions() # FilterBouncedRecipientsOptions | + + try: + # Filter a list of email recipients and remove those who have bounced + api_response = api_instance.filter_bounced_recipient(filter_bounced_recipients_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling BounceControllerApi->filter_bounced_recipient: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **filter_bounced_recipients_options** | [**FilterBouncedRecipientsOptions**](FilterBouncedRecipientsOptions)| | + +### Return type + +[**FilterBouncedRecipientsResult**](FilterBouncedRecipientsResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_bounced_email** +> BouncedEmailDto get_bounced_email(id) + +Get a bounced email. + +Bounced emails are email you have sent that were rejected by a recipient + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.BounceControllerApi(api_client) + id = 'id_example' # str | ID of the bounced email to fetch + + try: + # Get a bounced email. + api_response = api_instance.get_bounced_email(id) + pprint(api_response) + except ApiException as e: + print("Exception when calling BounceControllerApi->get_bounced_email: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | [**str**]()| ID of the bounced email to fetch | + +### Return type + +[**BouncedEmailDto**](BouncedEmailDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_bounced_emails** +> PageBouncedEmail get_bounced_emails(page=page, size=size, sort=sort, since=since, before=before) + +Get paginated list of bounced emails. + +Bounced emails are email you have sent that were rejected by a recipient + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.BounceControllerApi(api_client) + page = 0 # int | Optional page index (optional) (default to 0) +size = 20 # int | Optional page size (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) + + try: + # Get paginated list of bounced emails. + api_response = api_instance.get_bounced_emails(page=page, size=size, sort=sort, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling BounceControllerApi->get_bounced_emails: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Optional page index | [optional] [default to 0] + **size** | **int**| Optional page size | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + +### Return type + +[**PageBouncedEmail**](PageBouncedEmail) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_bounced_recipient** +> BouncedRecipientDto get_bounced_recipient(id) + +Get a bounced email. + +Bounced emails are email you have sent that were rejected by a recipient + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.BounceControllerApi(api_client) + id = 'id_example' # str | ID of the bounced recipient + + try: + # Get a bounced email. + api_response = api_instance.get_bounced_recipient(id) + pprint(api_response) + except ApiException as e: + print("Exception when calling BounceControllerApi->get_bounced_recipient: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | [**str**]()| ID of the bounced recipient | + +### Return type + +[**BouncedRecipientDto**](BouncedRecipientDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_bounced_recipients** +> PageBouncedRecipients get_bounced_recipients(page=page, size=size, sort=sort, since=since, before=before) + +Get paginated list of bounced recipients. + +Bounced recipients are email addresses that you have sent emails to that did not accept the sent email. Once a recipient is bounced you cannot send emails to that address. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.BounceControllerApi(api_client) + page = 0 # int | Optional page index (optional) (default to 0) +size = 20 # int | Optional page size (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) + + try: + # Get paginated list of bounced recipients. + api_response = api_instance.get_bounced_recipients(page=page, size=size, sort=sort, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling BounceControllerApi->get_bounced_recipients: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Optional page index | [optional] [default to 0] + **size** | **int**| Optional page size | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + +### Return type + +[**PageBouncedRecipients**](PageBouncedRecipients) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_complaints** +> PageComplaint get_complaints(page=page, size=size, sort=sort, since=since, before=before) + +Get paginated list of complaints. + +SMTP complaints made against your account + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.BounceControllerApi(api_client) + page = 0 # int | Optional page index (optional) (default to 0) +size = 20 # int | Optional page size (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) + + try: + # Get paginated list of complaints. + api_response = api_instance.get_complaints(page=page, size=size, sort=sort, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling BounceControllerApi->get_complaints: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Optional page index | [optional] [default to 0] + **size** | **int**| Optional page size | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + +### Return type + +[**PageComplaint**](PageComplaint) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/BounceProjection.md b/docs/BounceProjection.md new file mode 100644 index 00000000..1fda8e73 --- /dev/null +++ b/docs/BounceProjection.md @@ -0,0 +1,16 @@ +# BounceProjection + +Bounced email event +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**sender** | **str** | | +**subject** | **str** | | [optional] +**created_at** | **datetime** | | +**bounce_mta** | **str** | | [optional] +**bounce_type** | **str** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/BounceRecipientProjection.md b/docs/BounceRecipientProjection.md new file mode 100644 index 00000000..5e00fa96 --- /dev/null +++ b/docs/BounceRecipientProjection.md @@ -0,0 +1,16 @@ +# BounceRecipientProjection + +Bounced recipient +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**action** | **str** | | [optional] +**status** | **str** | | [optional] +**sent_email_id** | **str** | | [optional] +**created_at** | **datetime** | | +**recipient** | **str** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/BouncedEmailDto.md b/docs/BouncedEmailDto.md new file mode 100644 index 00000000..0f1775f0 --- /dev/null +++ b/docs/BouncedEmailDto.md @@ -0,0 +1,22 @@ +# BouncedEmailDto + +Bounced email +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**user_id** | **str** | | +**notification_type** | **str** | | +**sent_to_recipients** | **list[str]** | | [optional] +**sender** | **str** | | +**bounce_mta** | **str** | | [optional] +**bounce_type** | **str** | | [optional] +**bounce_recipients** | **list[str]** | | [optional] +**bounce_sub_type** | **str** | | [optional] +**sent_email_id** | **str** | | [optional] +**subject** | **str** | | [optional] +**created_at** | **datetime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/BouncedRecipientDto.md b/docs/BouncedRecipientDto.md new file mode 100644 index 00000000..4d3dd7e5 --- /dev/null +++ b/docs/BouncedRecipientDto.md @@ -0,0 +1,18 @@ +# BouncedRecipientDto + +Bounced recipient +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**user_id** | **str** | | [optional] +**sent_email_id** | **str** | | [optional] +**recipient** | **str** | | +**diagnostic_code** | **str** | | [optional] +**action** | **str** | | [optional] +**status** | **str** | | [optional] +**created_at** | **datetime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/BulkActionsControllerApi.md b/docs/BulkActionsControllerApi.md new file mode 100644 index 00000000..00c03a25 --- /dev/null +++ b/docs/BulkActionsControllerApi.md @@ -0,0 +1,234 @@ +# mailslurp_client.BulkActionsControllerApi + +All URIs are relative to *https://python.api.mailslurp.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**bulk_create_inboxes**](BulkActionsControllerApi#bulk_create_inboxes) | **POST** /bulk/inboxes | Bulk create Inboxes (email addresses) +[**bulk_delete_inboxes**](BulkActionsControllerApi#bulk_delete_inboxes) | **DELETE** /bulk/inboxes | Bulk Delete Inboxes +[**bulk_send_emails**](BulkActionsControllerApi#bulk_send_emails) | **POST** /bulk/send | Bulk Send Emails + + +# **bulk_create_inboxes** +> list[InboxDto] bulk_create_inboxes(count) + +Bulk create Inboxes (email addresses) + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.BulkActionsControllerApi(api_client) + count = 56 # int | Number of inboxes to be created in bulk + + try: + # Bulk create Inboxes (email addresses) + api_response = api_instance.bulk_create_inboxes(count) + pprint(api_response) + except ApiException as e: + print("Exception when calling BulkActionsControllerApi->bulk_create_inboxes: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **count** | **int**| Number of inboxes to be created in bulk | + +### Return type + +[**list[InboxDto]**](InboxDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **bulk_delete_inboxes** +> bulk_delete_inboxes(request_body) + +Bulk Delete Inboxes + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.BulkActionsControllerApi(api_client) + request_body = ['request_body_example'] # list[str] | + + try: + # Bulk Delete Inboxes + api_instance.bulk_delete_inboxes(request_body) + except ApiException as e: + print("Exception when calling BulkActionsControllerApi->bulk_delete_inboxes: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **request_body** | [**list[str]**](str)| | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **bulk_send_emails** +> bulk_send_emails(bulk_send_email_options) + +Bulk Send Emails + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.BulkActionsControllerApi(api_client) + bulk_send_email_options = mailslurp_client.BulkSendEmailOptions() # BulkSendEmailOptions | + + try: + # Bulk Send Emails + api_instance.bulk_send_emails(bulk_send_email_options) + except ApiException as e: + print("Exception when calling BulkActionsControllerApi->bulk_send_emails: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **bulk_send_email_options** | [**BulkSendEmailOptions**](BulkSendEmailOptions)| | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/BulkSendEmailOptions.md b/docs/BulkSendEmailOptions.md new file mode 100644 index 00000000..a479d386 --- /dev/null +++ b/docs/BulkSendEmailOptions.md @@ -0,0 +1,12 @@ +# BulkSendEmailOptions + +Options for bulk sending an email from multiple addresses. See regular `sendEmail` methods for more information. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inbox_ids** | **list[str]** | Inboxes to send the email from | +**send_email_options** | [**SendEmailOptions**](SendEmailOptions) | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/CommonActionsControllerApi.md b/docs/CommonActionsControllerApi.md new file mode 100644 index 00000000..6803c681 --- /dev/null +++ b/docs/CommonActionsControllerApi.md @@ -0,0 +1,435 @@ +# mailslurp_client.CommonActionsControllerApi + +All URIs are relative to *https://python.api.mailslurp.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_new_email_address**](CommonActionsControllerApi#create_new_email_address) | **POST** /newEmailAddress | Create new random inbox +[**create_random_inbox**](CommonActionsControllerApi#create_random_inbox) | **POST** /createInbox | Create new random inbox +[**delete_email_address**](CommonActionsControllerApi#delete_email_address) | **DELETE** /deleteEmailAddress | Delete inbox email address by inbox id +[**empty_inbox**](CommonActionsControllerApi#empty_inbox) | **DELETE** /emptyInbox | Delete all emails in an inbox +[**send_email_simple**](CommonActionsControllerApi#send_email_simple) | **POST** /sendEmail | Send an email + + +# **create_new_email_address** +> InboxDto create_new_email_address(allow_team_access=allow_team_access, use_domain_pool=use_domain_pool, expires_at=expires_at, expires_in=expires_in, email_address=email_address, inbox_type=inbox_type, description=description, name=name, tags=tags, favourite=favourite, virtual_inbox=virtual_inbox) + +Create new random inbox + +Returns an Inbox with an `id` and an `emailAddress` + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.CommonActionsControllerApi(api_client) + allow_team_access = True # bool | (optional) +use_domain_pool = True # bool | (optional) +expires_at = '2013-10-20T19:20:30+01:00' # datetime | (optional) +expires_in = 56 # int | (optional) +email_address = 'email_address_example' # str | (optional) +inbox_type = 'inbox_type_example' # str | (optional) +description = 'description_example' # str | (optional) +name = 'name_example' # str | (optional) +tags = ['tags_example'] # list[str] | (optional) +favourite = True # bool | (optional) +virtual_inbox = True # bool | (optional) + + try: + # Create new random inbox + api_response = api_instance.create_new_email_address(allow_team_access=allow_team_access, use_domain_pool=use_domain_pool, expires_at=expires_at, expires_in=expires_in, email_address=email_address, inbox_type=inbox_type, description=description, name=name, tags=tags, favourite=favourite, virtual_inbox=virtual_inbox) + pprint(api_response) + except ApiException as e: + print("Exception when calling CommonActionsControllerApi->create_new_email_address: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **allow_team_access** | **bool**| | [optional] + **use_domain_pool** | **bool**| | [optional] + **expires_at** | **datetime**| | [optional] + **expires_in** | **int**| | [optional] + **email_address** | **str**| | [optional] + **inbox_type** | **str**| | [optional] + **description** | **str**| | [optional] + **name** | **str**| | [optional] + **tags** | [**list[str]**](str)| | [optional] + **favourite** | **bool**| | [optional] + **virtual_inbox** | **bool**| | [optional] + +### Return type + +[**InboxDto**](InboxDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **create_random_inbox** +> InboxDto create_random_inbox(allow_team_access=allow_team_access, use_domain_pool=use_domain_pool, expires_at=expires_at, expires_in=expires_in, email_address=email_address, inbox_type=inbox_type, description=description, name=name, tags=tags, favourite=favourite, virtual_inbox=virtual_inbox) + +Create new random inbox + +Returns an Inbox with an `id` and an `emailAddress` + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.CommonActionsControllerApi(api_client) + allow_team_access = True # bool | (optional) +use_domain_pool = True # bool | (optional) +expires_at = '2013-10-20T19:20:30+01:00' # datetime | (optional) +expires_in = 56 # int | (optional) +email_address = 'email_address_example' # str | (optional) +inbox_type = 'inbox_type_example' # str | (optional) +description = 'description_example' # str | (optional) +name = 'name_example' # str | (optional) +tags = ['tags_example'] # list[str] | (optional) +favourite = True # bool | (optional) +virtual_inbox = True # bool | (optional) + + try: + # Create new random inbox + api_response = api_instance.create_random_inbox(allow_team_access=allow_team_access, use_domain_pool=use_domain_pool, expires_at=expires_at, expires_in=expires_in, email_address=email_address, inbox_type=inbox_type, description=description, name=name, tags=tags, favourite=favourite, virtual_inbox=virtual_inbox) + pprint(api_response) + except ApiException as e: + print("Exception when calling CommonActionsControllerApi->create_random_inbox: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **allow_team_access** | **bool**| | [optional] + **use_domain_pool** | **bool**| | [optional] + **expires_at** | **datetime**| | [optional] + **expires_in** | **int**| | [optional] + **email_address** | **str**| | [optional] + **inbox_type** | **str**| | [optional] + **description** | **str**| | [optional] + **name** | **str**| | [optional] + **tags** | [**list[str]**](str)| | [optional] + **favourite** | **bool**| | [optional] + **virtual_inbox** | **bool**| | [optional] + +### Return type + +[**InboxDto**](InboxDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **delete_email_address** +> delete_email_address(inbox_id) + +Delete inbox email address by inbox id + +Deletes inbox email address + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.CommonActionsControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | + + try: + # Delete inbox email address by inbox id + api_instance.delete_email_address(inbox_id) + except ApiException as e: + print("Exception when calling CommonActionsControllerApi->delete_email_address: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **empty_inbox** +> empty_inbox(inbox_id) + +Delete all emails in an inbox + +Deletes all emails + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.CommonActionsControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | + + try: + # Delete all emails in an inbox + api_instance.empty_inbox(inbox_id) + except ApiException as e: + print("Exception when calling CommonActionsControllerApi->empty_inbox: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **send_email_simple** +> send_email_simple(simple_send_email_options) + +Send an email + +If no senderId or inboxId provided a random email address will be used to send from. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.CommonActionsControllerApi(api_client) + simple_send_email_options = mailslurp_client.SimpleSendEmailOptions() # SimpleSendEmailOptions | + + try: + # Send an email + api_instance.send_email_simple(simple_send_email_options) + except ApiException as e: + print("Exception when calling CommonActionsControllerApi->send_email_simple: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **simple_send_email_options** | [**SimpleSendEmailOptions**](SimpleSendEmailOptions)| | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/Complaint.md b/docs/Complaint.md new file mode 100644 index 00000000..3624e216 --- /dev/null +++ b/docs/Complaint.md @@ -0,0 +1,17 @@ +# Complaint + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**user_id** | **str** | | [optional] +**event_type** | **str** | | [optional] +**mail_source** | **str** | | [optional] +**mail_message_id** | **str** | | [optional] +**complaint_recipient** | **str** | | +**created_at** | **datetime** | | +**updated_at** | **datetime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/ConditionOption.md b/docs/ConditionOption.md new file mode 100644 index 00000000..02aa8a64 --- /dev/null +++ b/docs/ConditionOption.md @@ -0,0 +1,12 @@ +# ConditionOption + +Options for matching emails in an inbox based on a condition such as `HAS_ATTACHMENTS=TRUE` +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**condition** | **str** | Condition of an email object that can be used to filter results | +**value** | **str** | Expected condition value | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/ContactControllerApi.md b/docs/ContactControllerApi.md new file mode 100644 index 00000000..2e59a9c7 --- /dev/null +++ b/docs/ContactControllerApi.md @@ -0,0 +1,467 @@ +# mailslurp_client.ContactControllerApi + +All URIs are relative to *https://python.api.mailslurp.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_contact**](ContactControllerApi#create_contact) | **POST** /contacts | Create a contact +[**delete_contact**](ContactControllerApi#delete_contact) | **DELETE** /contacts/{contactId} | Delete contact +[**get_all_contacts**](ContactControllerApi#get_all_contacts) | **GET** /contacts/paginated | Get all contacts +[**get_contact**](ContactControllerApi#get_contact) | **GET** /contacts/{contactId} | Get contact +[**get_contact_v_card**](ContactControllerApi#get_contact_v_card) | **GET** /contacts/{contactId}/download | Get contact vCard vcf file +[**get_contacts**](ContactControllerApi#get_contacts) | **GET** /contacts | Get all contacts + + +# **create_contact** +> ContactDto create_contact(create_contact_options) + +Create a contact + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.ContactControllerApi(api_client) + create_contact_options = mailslurp_client.CreateContactOptions() # CreateContactOptions | + + try: + # Create a contact + api_response = api_instance.create_contact(create_contact_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling ContactControllerApi->create_contact: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_contact_options** | [**CreateContactOptions**](CreateContactOptions)| | + +### Return type + +[**ContactDto**](ContactDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **delete_contact** +> delete_contact(contact_id) + +Delete contact + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.ContactControllerApi(api_client) + contact_id = 'contact_id_example' # str | + + try: + # Delete contact + api_instance.delete_contact(contact_id) + except ApiException as e: + print("Exception when calling ContactControllerApi->delete_contact: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **contact_id** | [**str**]()| | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_all_contacts** +> PageContactProjection get_all_contacts(page=page, size=size, sort=sort, since=since, before=before) + +Get all contacts + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.ContactControllerApi(api_client) + page = 0 # int | Optional page index in list pagination (optional) (default to 0) +size = 20 # int | Optional page size in list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) + + try: + # Get all contacts + api_response = api_instance.get_all_contacts(page=page, size=size, sort=sort, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling ContactControllerApi->get_all_contacts: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Optional page index in list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + +### Return type + +[**PageContactProjection**](PageContactProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_contact** +> ContactDto get_contact(contact_id) + +Get contact + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.ContactControllerApi(api_client) + contact_id = 'contact_id_example' # str | + + try: + # Get contact + api_response = api_instance.get_contact(contact_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling ContactControllerApi->get_contact: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **contact_id** | [**str**]()| | + +### Return type + +[**ContactDto**](ContactDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_contact_v_card** +> list[str] get_contact_v_card(contact_id) + +Get contact vCard vcf file + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.ContactControllerApi(api_client) + contact_id = 'contact_id_example' # str | + + try: + # Get contact vCard vcf file + api_response = api_instance.get_contact_v_card(contact_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling ContactControllerApi->get_contact_v_card: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **contact_id** | [**str**]()| | + +### Return type + +**list[str]** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_contacts** +> list[ContactProjection] get_contacts() + +Get all contacts + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.ContactControllerApi(api_client) + + try: + # Get all contacts + api_response = api_instance.get_contacts() + pprint(api_response) + except ApiException as e: + print("Exception when calling ContactControllerApi->get_contacts: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[ContactProjection]**](ContactProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/ContactDto.md b/docs/ContactDto.md new file mode 100644 index 00000000..9fdea1b8 --- /dev/null +++ b/docs/ContactDto.md @@ -0,0 +1,21 @@ +# ContactDto + +Contact object. For saving a user in contact book. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**group_id** | **str** | | [optional] +**first_name** | **str** | | [optional] +**last_name** | **str** | | [optional] +**company** | **str** | | [optional] +**email_addresses** | **list[str]** | | +**primary_email_address** | **str** | | [optional] +**tags** | **list[str]** | | +**meta_data** | [**object**]() | | [optional] +**opt_out** | **bool** | | [optional] +**created_at** | **datetime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/ContactProjection.md b/docs/ContactProjection.md new file mode 100644 index 00000000..6833ddbc --- /dev/null +++ b/docs/ContactProjection.md @@ -0,0 +1,18 @@ +# ContactProjection + +Email contact for address book +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**group_id** | **str** | | [optional] +**created_at** | **datetime** | | +**first_name** | **str** | | [optional] +**last_name** | **str** | | [optional] +**company** | **str** | | [optional] +**email_addresses** | **list[str]** | | [optional] +**opt_out** | **bool** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/ContentMatchOptions.md b/docs/ContentMatchOptions.md new file mode 100644 index 00000000..4910ea67 --- /dev/null +++ b/docs/ContentMatchOptions.md @@ -0,0 +1,11 @@ +# ContentMatchOptions + +Options for matching content using regex patterns based on Java Pattern syntax +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pattern** | **str** | Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns. | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/CountDto.md b/docs/CountDto.md new file mode 100644 index 00000000..b83c4694 --- /dev/null +++ b/docs/CountDto.md @@ -0,0 +1,11 @@ +# CountDto + +Number of elements +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_elements** | **int** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/CreateAliasOptions.md b/docs/CreateAliasOptions.md new file mode 100644 index 00000000..6a511f23 --- /dev/null +++ b/docs/CreateAliasOptions.md @@ -0,0 +1,14 @@ +# CreateAliasOptions + +Create email alias options. Email aliases can be used to mask real email addresses behind an ID. You can also attach an inbox to an alias so that any email received by the inbox email address if forwarded to the alias email address. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email_address** | **str** | Email address to be hidden behind alias. Emails sent to the alias email address will be forwarded to this address. If you want to enable replies set useThreads true and the reply-to for the email will allow outbound communication via a thread. | +**inbox_id** | **str** | Optional inbox ID to attach to alias. Null by default means an a new inbox will be created for the alias. Use a custom inbox to control what email address the alias uses. To use custom email addresses create a domain and an inbox, the use the inbox ID with this call. Emails received by this inbox will be forwarded to the alias email address | [optional] +**name** | **str** | Optional name for alias | [optional] +**use_threads** | **bool** | Enable threads options. If true emails will be sent with a unique reply-to thread address. This means you can reply to the forwarded email and it will be sent to the recipients via your alias address. That way a thread conversation is preserved. | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/CreateContactOptions.md b/docs/CreateContactOptions.md new file mode 100644 index 00000000..28029bdd --- /dev/null +++ b/docs/CreateContactOptions.md @@ -0,0 +1,18 @@ +# CreateContactOptions + +Options for creating an email contact in address book +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**first_name** | **str** | | [optional] +**last_name** | **str** | | [optional] +**company** | **str** | | [optional] +**email_addresses** | **list[str]** | Set of email addresses belonging to the contact | [optional] +**tags** | **list[str]** | Tags that can be used to search and group contacts | [optional] +**meta_data** | [**object**]() | | [optional] +**opt_out** | **bool** | Has the user explicitly or implicitly opted out of being contacted? If so MailSlurp will ignore them in all actions. | [optional] +**group_id** | **str** | Group IDs that contact belongs to | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/CreateDomainOptions.md b/docs/CreateDomainOptions.md new file mode 100644 index 00000000..dec4e4ac --- /dev/null +++ b/docs/CreateDomainOptions.md @@ -0,0 +1,14 @@ +# CreateDomainOptions + +Options for creating a domain to use with MailSlurp. You must have ownership access to this domain in order to verify it. Domains will not function correctly until the domain has been verified. See https://www.mailslurp.com/guides/custom-domains for help. Domains can be either `HTTP` or `SMTP` type. The type of domain determines which inboxes can be used with it. `SMTP` inboxes use a mail server running `mx.mailslurp.com` while `HTTP` inboxes are handled by AWS SES. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **str** | The top level domain you wish to use with MailSlurp. Do not specify subdomain just the top level. So `test.com` covers all subdomains such as `mail.test.com`. Don't include a protocol such as `http://`. Once added you must complete the verification steps by adding the returned records to your domain. | +**description** | **str** | Optional description of the domain. | [optional] +**created_catch_all_inbox** | **bool** | Whether to create a catch all inbox for the domain. Any email sent to an address using your domain that cannot be matched to an existing inbox you created with the domain will be routed to the created catch all inbox. You can access emails using the regular methods on this inbox ID. | [optional] +**domain_type** | **str** | Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails. | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/CreateEmergencyAddressOptions.md b/docs/CreateEmergencyAddressOptions.md new file mode 100644 index 00000000..6689d14a --- /dev/null +++ b/docs/CreateEmergencyAddressOptions.md @@ -0,0 +1,16 @@ +# CreateEmergencyAddressOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_name** | **str** | | +**address1** | **str** | | +**city** | **str** | | +**region** | **str** | | +**postal_code** | **str** | | +**iso_country_code** | **str** | | +**display_name** | **str** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/CreateGroupOptions.md b/docs/CreateGroupOptions.md new file mode 100644 index 00000000..69d5f2fd --- /dev/null +++ b/docs/CreateGroupOptions.md @@ -0,0 +1,12 @@ +# CreateGroupOptions + +Create contact group options +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**description** | **str** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/CreateInboxDto.md b/docs/CreateInboxDto.md new file mode 100644 index 00000000..a3eeca62 --- /dev/null +++ b/docs/CreateInboxDto.md @@ -0,0 +1,21 @@ +# CreateInboxDto + +Options for creating an inbox. An inbox has a real email address that can send and receive emails. Inboxes can be permanent or expire at a given time. Inboxes are either `SMTP` or `HTTP` mailboxes. `SMTP` inboxes are processed by a mail server running at `mx.mailslurp.com` while `HTTP` inboxes are processed by AWS SES. Inboxes can use a custom email address (by verifying your own domain) or a randomly assigned email ending in either `mailslurp.com` or (if `useDomainPool` is enabled) ending in a similar domain such as `mailslurp.xyz` (selected at random). +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email_address** | **str** | A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as `123@mailslurp.com`. If you use the `useDomainPool` option when the email address is null it will generate an email address with a more varied domain ending such as `123@mailslurp.info` or `123@mailslurp.biz`. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Note domain types must match the inbox type - so `SMTP` inboxes will only work with `SMTP` type domains. Avoid `SMTP` inboxes if you need to send emails as they can only receive. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. | [optional] +**name** | **str** | Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails. | [optional] +**description** | **str** | Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with | [optional] +**use_domain_pool** | **bool** | Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default `@mailslurp.com` email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in `@mailslurp.{world,info,xyz,...}` . This means a TLD is randomly selecting from a list of `.biz`, `.info`, `.xyz` etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of `@mailslurp.com` or custom email address provided by the emailAddress field. Note this feature is only available for `HTTP` inbox types. | [optional] +**tags** | **list[str]** | Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. | [optional] +**expires_at** | **datetime** | Optional inbox expiration date. If null then this inbox is permanent and the emails in it won't be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX. | [optional] +**favourite** | **bool** | Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering | [optional] +**expires_in** | **int** | Number of milliseconds that inbox should exist for | [optional] +**allow_team_access** | **bool** | DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization. | [optional] +**inbox_type** | **str** | Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). | [optional] +**virtual_inbox** | **bool** | Virtual inbox prevents any outbound emails from being sent. It creates sent email records but will never send real emails to recipients. Great for testing and faking email sending. | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/CreateInboxForwarderOptions.md b/docs/CreateInboxForwarderOptions.md new file mode 100644 index 00000000..1406ba06 --- /dev/null +++ b/docs/CreateInboxForwarderOptions.md @@ -0,0 +1,13 @@ +# CreateInboxForwarderOptions + +Options for creating an inbox forwarder +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**field** | **str** | Field to match against to trigger inbox forwarding for inbound email | +**match** | **str** | String or wildcard style match for field specified when evaluating forwarding rules | +**forward_to_recipients** | **list[str]** | Email addresses to forward an email to if it matches the field and match criteria of the forwarder | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/CreateInboxRulesetOptions.md b/docs/CreateInboxRulesetOptions.md new file mode 100644 index 00000000..efacb1b9 --- /dev/null +++ b/docs/CreateInboxRulesetOptions.md @@ -0,0 +1,13 @@ +# CreateInboxRulesetOptions + +Options for creating inbox rulesets. Inbox rulesets can be used to block, allow, filter, or forward emails when sending or receiving using the inbox. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scope** | **str** | What type of emails actions to apply ruleset to. Either `SENDING_EMAILS` or `RECEIVING_EMAILS` will apply action and target to any sending or receiving of emails respectively. | +**action** | **str** | Action to be taken when the ruleset matches an email for the given scope. For example: `BLOCK` action with target `*` and scope `SENDING_EMAILS` blocks sending to all recipients. Note `ALLOW` takes precedent over `BLOCK`. `FILTER_REMOVE` is like block but will remove offending email addresses during a send or receive event instead of blocking the action. | +**target** | **str** | Target to match emails with. Can be a wild-card type pattern or a valid email address. For instance `*@gmail.com` matches all gmail addresses while `test@gmail.com` matches one address exactly. The target is applied to every recipient field email address when `SENDING_EMAILS` is the scope and is applied to sender of email when `RECEIVING_EMAILS`. | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/CreateTemplateOptions.md b/docs/CreateTemplateOptions.md new file mode 100644 index 00000000..c84ed7eb --- /dev/null +++ b/docs/CreateTemplateOptions.md @@ -0,0 +1,12 @@ +# CreateTemplateOptions + +Create template options +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of template | +**content** | **str** | Template content. Can include moustache style variables such as {{var_name}} | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/CreateTrackingPixelOptions.md b/docs/CreateTrackingPixelOptions.md new file mode 100644 index 00000000..c8ff52d9 --- /dev/null +++ b/docs/CreateTrackingPixelOptions.md @@ -0,0 +1,12 @@ +# CreateTrackingPixelOptions + +Options for creating a tracking pixel for email open tracking +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**recipient** | **str** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/CreateWebhookOptions.md b/docs/CreateWebhookOptions.md new file mode 100644 index 00000000..7b43ffc4 --- /dev/null +++ b/docs/CreateWebhookOptions.md @@ -0,0 +1,15 @@ +# CreateWebhookOptions + +Options for creating a webhook. Webhooks can be attached to inboxes and MailSlurp will POST a webhook payload to the URL specified whenever the webhook's event is triggered. Webhooks are great for processing many inbound emails and responding to other events at scale. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | Public URL on your server that MailSlurp can post WebhookNotification payload to when an email is received or an event is trigger. The payload of the submitted JSON is dependent on the webhook event type. See docs.mailslurp.com/webhooks for event payload documentation. | +**basic_auth** | [**BasicAuthOptions**](BasicAuthOptions) | | [optional] +**name** | **str** | Optional name for the webhook | [optional] +**event_name** | **str** | Optional webhook event name. Default is `EMAIL_RECEIVED` and is triggered when an email is received by the inbox associated with the webhook. Payload differ according to the webhook event name. | [optional] +**include_headers** | [**WebhookHeaders**](WebhookHeaders) | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/DNSLookupOptions.md b/docs/DNSLookupOptions.md new file mode 100644 index 00000000..c0a518e1 --- /dev/null +++ b/docs/DNSLookupOptions.md @@ -0,0 +1,13 @@ +# DNSLookupOptions + +Options for DNS query. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hostname** | **str** | List of record types you wish to query such as MX, DNS, TXT, NS, A etc. | +**record_types** | **list[str]** | List of record types you wish to query such as MX, DNS, TXT, NS, A etc. | +**omit_final_dns_dot** | **bool** | Optionally control whether to omit the final dot in full DNS name values. | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/DNSLookupResult.md b/docs/DNSLookupResult.md new file mode 100644 index 00000000..48a2c709 --- /dev/null +++ b/docs/DNSLookupResult.md @@ -0,0 +1,14 @@ +# DNSLookupResult + +DNS lookup result. Includes record type, time to live, raw response, and name value for the name server response. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**record_type** | **str** | Domain Name Server Record Types | +**ttl** | **int** | | +**record_entries** | **list[str]** | | +**name** | **str** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/DNSLookupResults.md b/docs/DNSLookupResults.md new file mode 100644 index 00000000..9e044feb --- /dev/null +++ b/docs/DNSLookupResults.md @@ -0,0 +1,11 @@ +# DNSLookupResults + +Results of query on domain name servers +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**results** | [**list[DNSLookupResult]**](DNSLookupResult) | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/DeliveryStatusDto.md b/docs/DeliveryStatusDto.md new file mode 100644 index 00000000..060c97a7 --- /dev/null +++ b/docs/DeliveryStatusDto.md @@ -0,0 +1,23 @@ +# DeliveryStatusDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**user_id** | **str** | | +**sent_id** | **str** | | [optional] +**remote_mta_ip** | **str** | | [optional] +**inbox_id** | **str** | | [optional] +**reporting_mta** | **str** | | [optional] +**recipients** | **list[str]** | | [optional] +**smtp_response** | **str** | | [optional] +**smtp_status_code** | **int** | | [optional] +**processing_time_millis** | **int** | | [optional] +**received** | **datetime** | | [optional] +**subject** | **str** | | [optional] +**created_at** | **datetime** | | +**updated_at** | **datetime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/DescribeDomainOptions.md b/docs/DescribeDomainOptions.md new file mode 100644 index 00000000..2e279c53 --- /dev/null +++ b/docs/DescribeDomainOptions.md @@ -0,0 +1,11 @@ +# DescribeDomainOptions + +Domain record description +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **str** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/DescribeMailServerDomainResult.md b/docs/DescribeMailServerDomainResult.md new file mode 100644 index 00000000..b7c96cd5 --- /dev/null +++ b/docs/DescribeMailServerDomainResult.md @@ -0,0 +1,13 @@ +# DescribeMailServerDomainResult + +Name Server lookup result +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mx_records** | [**list[NameServerRecord]**](NameServerRecord) | | +**domain** | **str** | | +**message** | **str** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/DomainControllerApi.md b/docs/DomainControllerApi.md new file mode 100644 index 00000000..abad8f2e --- /dev/null +++ b/docs/DomainControllerApi.md @@ -0,0 +1,474 @@ +# mailslurp_client.DomainControllerApi + +All URIs are relative to *https://python.api.mailslurp.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**add_domain_wildcard_catch_all**](DomainControllerApi#add_domain_wildcard_catch_all) | **POST** /domains/{id}/wildcard | Add catch all wild card inbox to domain +[**create_domain**](DomainControllerApi#create_domain) | **POST** /domains | Create Domain +[**delete_domain**](DomainControllerApi#delete_domain) | **DELETE** /domains/{id} | Delete a domain +[**get_domain**](DomainControllerApi#get_domain) | **GET** /domains/{id} | Get a domain +[**get_domains**](DomainControllerApi#get_domains) | **GET** /domains | Get domains +[**update_domain**](DomainControllerApi#update_domain) | **PUT** /domains/{id} | Update a domain + + +# **add_domain_wildcard_catch_all** +> DomainDto add_domain_wildcard_catch_all(id) + +Add catch all wild card inbox to domain + +Add a catch all inbox to a domain so that any emails sent to it that cannot be matched will be sent to the catch all inbox generated + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.DomainControllerApi(api_client) + id = 'id_example' # str | + + try: + # Add catch all wild card inbox to domain + api_response = api_instance.add_domain_wildcard_catch_all(id) + pprint(api_response) + except ApiException as e: + print("Exception when calling DomainControllerApi->add_domain_wildcard_catch_all: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | [**str**]()| | + +### Return type + +[**DomainDto**](DomainDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **create_domain** +> DomainDto create_domain(create_domain_options) + +Create Domain + +Link a domain that you own with MailSlurp so you can create email addresses using it. Endpoint returns DNS records used for validation. You must add these verification records to your host provider's DNS setup to verify the domain. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.DomainControllerApi(api_client) + create_domain_options = mailslurp_client.CreateDomainOptions() # CreateDomainOptions | + + try: + # Create Domain + api_response = api_instance.create_domain(create_domain_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling DomainControllerApi->create_domain: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_domain_options** | [**CreateDomainOptions**](CreateDomainOptions)| | + +### Return type + +[**DomainDto**](DomainDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **delete_domain** +> list[str] delete_domain(id) + +Delete a domain + +Delete a domain. This will disable any existing inboxes that use this domain. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.DomainControllerApi(api_client) + id = 'id_example' # str | + + try: + # Delete a domain + api_response = api_instance.delete_domain(id) + pprint(api_response) + except ApiException as e: + print("Exception when calling DomainControllerApi->delete_domain: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | [**str**]()| | + +### Return type + +**list[str]** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_domain** +> DomainDto get_domain(id) + +Get a domain + +Returns domain verification status and tokens for a given domain + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.DomainControllerApi(api_client) + id = 'id_example' # str | + + try: + # Get a domain + api_response = api_instance.get_domain(id) + pprint(api_response) + except ApiException as e: + print("Exception when calling DomainControllerApi->get_domain: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | [**str**]()| | + +### Return type + +[**DomainDto**](DomainDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_domains** +> list[DomainPreview] get_domains() + +Get domains + +List all custom domains you have created + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.DomainControllerApi(api_client) + + try: + # Get domains + api_response = api_instance.get_domains() + pprint(api_response) + except ApiException as e: + print("Exception when calling DomainControllerApi->get_domains: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[DomainPreview]**](DomainPreview) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **update_domain** +> DomainDto update_domain(id, update_domain_options) + +Update a domain + +Update values on a domain. Note you cannot change the domain name as it is immutable. Recreate the domain if you need to alter this. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.DomainControllerApi(api_client) + id = 'id_example' # str | +update_domain_options = mailslurp_client.UpdateDomainOptions() # UpdateDomainOptions | + + try: + # Update a domain + api_response = api_instance.update_domain(id, update_domain_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling DomainControllerApi->update_domain: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | [**str**]()| | + **update_domain_options** | [**UpdateDomainOptions**](UpdateDomainOptions)| | + +### Return type + +[**DomainDto**](DomainDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/DomainDto.md b/docs/DomainDto.md new file mode 100644 index 00000000..e4ca00b4 --- /dev/null +++ b/docs/DomainDto.md @@ -0,0 +1,21 @@ +# DomainDto + +Domain plus verification records and status +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**user_id** | **str** | | +**domain** | **str** | Custom domain name | +**verification_token** | **str** | Verification tokens | +**dkim_tokens** | **list[str]** | Unique token DKIM tokens | +**is_verified** | **bool** | Whether domain has been verified or not. If the domain is not verified after 72 hours there is most likely an issue with the domains DNS records. | +**domain_name_records** | [**list[DomainNameRecord]**](DomainNameRecord) | List of DNS domain name records (C, MX, TXT) etc that you must add to the DNS server associated with your domain provider. | +**catch_all_inbox_id** | **str** | The optional catch all inbox that will receive emails sent to the domain that cannot be matched. | [optional] +**created_at** | **datetime** | | +**updated_at** | **datetime** | | +**domain_type** | **str** | Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails. | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/DomainNameRecord.md b/docs/DomainNameRecord.md new file mode 100644 index 00000000..36c2abb7 --- /dev/null +++ b/docs/DomainNameRecord.md @@ -0,0 +1,14 @@ +# DomainNameRecord + +DNS Record required for verification of a domain. Record vary depending on domain type. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**record_type** | **str** | Domain Name Server Record Types | +**name** | **str** | | +**record_entries** | **list[str]** | | +**ttl** | **int** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/DomainPreview.md b/docs/DomainPreview.md new file mode 100644 index 00000000..d33cfc78 --- /dev/null +++ b/docs/DomainPreview.md @@ -0,0 +1,16 @@ +# DomainPreview + +Preview object for domain entity +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**domain** | **str** | | +**catch_all_inbox_id** | **str** | | [optional] +**created_at** | **datetime** | | +**domain_type** | **str** | Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails. | +**is_verified** | **bool** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/DownloadAttachmentDto.md b/docs/DownloadAttachmentDto.md new file mode 100644 index 00000000..69ccf846 --- /dev/null +++ b/docs/DownloadAttachmentDto.md @@ -0,0 +1,13 @@ +# DownloadAttachmentDto + +Content of attachment +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base64_file_contents** | **str** | Base64 encoded string of attachment bytes. Decode the base64 encoded string to get the raw contents. If the file has a content type such as `text/html` you can read the contents directly by converting it to string using `utf-8` encoding. | +**content_type** | **str** | Content type of attachment. Examples are `image/png`, `application/msword`, `text/csv` etc. | +**size_bytes** | **int** | Size in bytes of attachment content | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/Email.md b/docs/Email.md new file mode 100644 index 00000000..07402a17 --- /dev/null +++ b/docs/Email.md @@ -0,0 +1,35 @@ +# Email + +Email entity (also known as EmailDto). When an SMTP email message is received by MailSlurp it is parsed. The body and attachments are written to disk and the fields such as to, from, subject etc are stored in a database. The `body` contains the email content. If you want the original SMTP message see the `getRawEmail` endpoints. The attachments can be fetched using the AttachmentController +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | ID of the email entity | +**user_id** | **str** | ID of user that email belongs to | +**inbox_id** | **str** | ID of the inbox that received the email | +**domain_id** | **str** | ID of the domain that received the email | [optional] +**to** | **list[str]** | List of `To` recipient email addresses that the email was addressed to. See recipients object for names. | +**_from** | **str** | Who the email was sent from. An email address - see fromName for the sender name. | [optional] +**sender** | [**Sender**](Sender) | | [optional] +**recipients** | [**EmailRecipients**](EmailRecipients) | | [optional] +**reply_to** | **str** | The `replyTo` field on the received email message | [optional] +**cc** | **list[str]** | List of `CC` recipients email addresses that the email was addressed to. See recipients object for names. | [optional] +**bcc** | **list[str]** | List of `BCC` recipients email addresses that the email was addressed to. See recipients object for names. | [optional] +**headers** | **dict(str, str)** | Collection of SMTP headers attached to email | [optional] +**attachments** | **list[str]** | List of IDs of attachments found in the email. Use these IDs with the Inbox and Email Controllers to download attachments and attachment meta data such as filesize, name, extension. | [optional] +**subject** | **str** | The subject line of the email message as specified by SMTP subject header | [optional] +**body** | **str** | The body of the email message as text parsed from the SMTP message body (does not include attachments). Fetch the raw content to access the SMTP message and use the attachments property to access attachments. The body is stored separately to the email entity so the body is not returned in paginated results only in full single email or wait requests. | [optional] +**body_excerpt** | **str** | An excerpt of the body of the email message for quick preview . | [optional] +**body_md5_hash** | **str** | A hash signature of the email message using MD5. Useful for comparing emails without fetching full body. | [optional] +**is_html** | **bool** | Is the email body content type HTML? | [optional] +**charset** | **str** | Detected character set of the email body such as UTF-8 | [optional] +**analysis** | [**EmailAnalysis**](EmailAnalysis) | | [optional] +**created_at** | **datetime** | When was the email received by MailSlurp | +**updated_at** | **datetime** | When was the email last updated | +**read** | **bool** | Read flag. Has the email ever been viewed in the dashboard or fetched via the API with a hydrated body? If so the email is marked as read. Paginated results do not affect read status. Read status is different to email opened event as it depends on your own account accessing the email. Email opened is determined by tracking pixels sent to other uses if enable during sending. You can listened for both email read and email opened events using webhooks. | +**team_access** | **bool** | Can the email be accessed by organization team members | +**html** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/EmailAnalysis.md b/docs/EmailAnalysis.md new file mode 100644 index 00000000..70d67a63 --- /dev/null +++ b/docs/EmailAnalysis.md @@ -0,0 +1,15 @@ +# EmailAnalysis + +Analysis result for email. Each verdict property is a string PASS|FAIL|GRAY or dynamic error message +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**spam_verdict** | **str** | Verdict of spam ranking analysis | [optional] +**virus_verdict** | **str** | Verdict of virus scan analysis | [optional] +**spf_verdict** | **str** | Verdict of Send Policy Framework record spoofing analysis | [optional] +**dkim_verdict** | **str** | Verdict of DomainKeys Identified Mail analysis | [optional] +**dmarc_verdict** | **str** | Verdict of Domain-based Message Authentication Reporting and Conformance analysis | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/EmailContentMatchResult.md b/docs/EmailContentMatchResult.md new file mode 100644 index 00000000..f2ce3992 --- /dev/null +++ b/docs/EmailContentMatchResult.md @@ -0,0 +1,12 @@ +# EmailContentMatchResult + +Matches for the given pattern +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pattern** | **str** | | +**matches** | **list[str]** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/EmailControllerApi.md b/docs/EmailControllerApi.md new file mode 100644 index 00000000..0c0579a0 --- /dev/null +++ b/docs/EmailControllerApi.md @@ -0,0 +1,2474 @@ +# mailslurp_client.EmailControllerApi + +All URIs are relative to *https://python.api.mailslurp.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**apply_imap_flag_operation**](EmailControllerApi#apply_imap_flag_operation) | **POST** /emails/{emailId}/imap-flag-operation | Set IMAP flags associated with a message. Only supports '\\Seen' flag. +[**delete_all_emails**](EmailControllerApi#delete_all_emails) | **DELETE** /emails | Delete all emails in all inboxes. +[**delete_email**](EmailControllerApi#delete_email) | **DELETE** /emails/{emailId} | Delete an email +[**download_attachment**](EmailControllerApi#download_attachment) | **GET** /emails/{emailId}/attachments/{attachmentId} | Get email attachment bytes. Returned as `octet-stream` with content type header. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints and convert the base 64 encoded content to a file or string. +[**download_attachment_base64**](EmailControllerApi#download_attachment_base64) | **GET** /emails/{emailId}/attachments/{attachmentId}/base64 | Get email attachment as base64 encoded string as an alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`. +[**download_body**](EmailControllerApi#download_body) | **GET** /emails/{emailId}/body | Get email body as string. Returned as `plain/text` with content type header. +[**download_body_bytes**](EmailControllerApi#download_body_bytes) | **GET** /emails/{emailId}/body-bytes | Get email body in bytes. Returned as `octet-stream` with content type header. +[**forward_email**](EmailControllerApi#forward_email) | **POST** /emails/{emailId}/forward | Forward email to recipients +[**get_attachment_meta_data**](EmailControllerApi#get_attachment_meta_data) | **GET** /emails/{emailId}/attachments/{attachmentId}/metadata | Get email attachment metadata. This is the `contentType` and `contentLength` of an attachment. To get the individual attachments use the `downloadAttachment` methods. +[**get_email**](EmailControllerApi#get_email) | **GET** /emails/{emailId} | Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController. +[**get_email_attachments**](EmailControllerApi#get_email_attachments) | **GET** /emails/{emailId}/attachments | Get all email attachment metadata. Metadata includes name and size of attachments. +[**get_email_content_match**](EmailControllerApi#get_email_content_match) | **POST** /emails/{emailId}/contentMatch | Get email content regex pattern match results. Runs regex against email body and returns match groups. +[**get_email_count**](EmailControllerApi#get_email_count) | **GET** /emails/emails/count | Get email count +[**get_email_html**](EmailControllerApi#get_email_html) | **GET** /emails/{emailId}/html | Get email content as HTML. For displaying emails in browser context. +[**get_email_html_json**](EmailControllerApi#get_email_html_json) | **GET** /emails/{emailId}/html/json | Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content +[**get_email_html_query**](EmailControllerApi#get_email_html_query) | **GET** /emails/{emailId}/htmlQuery | Parse and return text from an email, stripping HTML and decoding encoded characters +[**get_email_links**](EmailControllerApi#get_email_links) | **GET** /emails/{emailId}/links | Parse and return list of links found in an email (only works for HTML content) +[**get_email_preview_ur_ls**](EmailControllerApi#get_email_preview_ur_ls) | **GET** /emails/{emailId}/urls | Get email URLs for viewing in browser or downloading +[**get_email_text_lines**](EmailControllerApi#get_email_text_lines) | **GET** /emails/{emailId}/textLines | Parse and return text from an email, stripping HTML and decoding encoded characters +[**get_emails_paginated**](EmailControllerApi#get_emails_paginated) | **GET** /emails | Get all emails in all inboxes in paginated form. Email API list all. +[**get_gravatar_url_for_email_address**](EmailControllerApi#get_gravatar_url_for_email_address) | **GET** /emails/gravatarFor | +[**get_latest_email**](EmailControllerApi#get_latest_email) | **GET** /emails/latest | Get latest email in all inboxes. Most recently received. +[**get_latest_email_in_inbox1**](EmailControllerApi#get_latest_email_in_inbox1) | **GET** /emails/latestIn | Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. +[**get_organization_emails_paginated**](EmailControllerApi#get_organization_emails_paginated) | **GET** /emails/organization | Get all organization emails. List team or shared test email accounts +[**get_raw_email_contents**](EmailControllerApi#get_raw_email_contents) | **GET** /emails/{emailId}/raw | Get raw email string. Returns unparsed raw SMTP message with headers and body. +[**get_raw_email_json**](EmailControllerApi#get_raw_email_json) | **GET** /emails/{emailId}/raw/json | Get raw email in JSON. Unparsed SMTP message in JSON wrapper format. +[**get_unread_email_count**](EmailControllerApi#get_unread_email_count) | **GET** /emails/unreadCount | Get unread email count +[**mark_as_read**](EmailControllerApi#mark_as_read) | **PATCH** /emails/{emailId}/read | Mark an email as read on unread +[**reply_to_email**](EmailControllerApi#reply_to_email) | **PUT** /emails/{emailId} | Reply to an email +[**send_email_source_optional**](EmailControllerApi#send_email_source_optional) | **POST** /emails | Send email +[**validate_email**](EmailControllerApi#validate_email) | **POST** /emails/{emailId}/validate | Validate email HTML contents + + +# **apply_imap_flag_operation** +> EmailPreview apply_imap_flag_operation(email_id, imap_flag_operation_options) + +Set IMAP flags associated with a message. Only supports '\\Seen' flag. + +Apply RFC3501 section-2.3.2 IMAP flag operations on an email + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + email_id = 'email_id_example' # str | +imap_flag_operation_options = mailslurp_client.ImapFlagOperationOptions() # ImapFlagOperationOptions | + + try: + # Set IMAP flags associated with a message. Only supports '\\Seen' flag. + api_response = api_instance.apply_imap_flag_operation(email_id, imap_flag_operation_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling EmailControllerApi->apply_imap_flag_operation: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email_id** | [**str**]()| | + **imap_flag_operation_options** | [**ImapFlagOperationOptions**](ImapFlagOperationOptions)| | + +### Return type + +[**EmailPreview**](EmailPreview) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **delete_all_emails** +> delete_all_emails() + +Delete all emails in all inboxes. + +Deletes all emails in your account. Be careful as emails cannot be recovered + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + + try: + # Delete all emails in all inboxes. + api_instance.delete_all_emails() + except ApiException as e: + print("Exception when calling EmailControllerApi->delete_all_emails: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **delete_email** +> delete_email(email_id) + +Delete an email + +Deletes an email and removes it from the inbox. Deleted emails cannot be recovered. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + email_id = 'email_id_example' # str | ID of email to delete + + try: + # Delete an email + api_instance.delete_email(email_id) + except ApiException as e: + print("Exception when calling EmailControllerApi->delete_email: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email_id** | [**str**]()| ID of email to delete | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **download_attachment** +> str download_attachment(email_id, attachment_id, api_key=api_key) + +Get email attachment bytes. Returned as `octet-stream` with content type header. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints and convert the base 64 encoded content to a file or string. + +Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + email_id = 'email_id_example' # str | ID of email +attachment_id = 'attachment_id_example' # str | ID of attachment +api_key = 'api_key_example' # str | Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly. (optional) + + try: + # Get email attachment bytes. Returned as `octet-stream` with content type header. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints and convert the base 64 encoded content to a file or string. + api_response = api_instance.download_attachment(email_id, attachment_id, api_key=api_key) + pprint(api_response) + except ApiException as e: + print("Exception when calling EmailControllerApi->download_attachment: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email_id** | [**str**]()| ID of email | + **attachment_id** | **str**| ID of attachment | + **api_key** | **str**| Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly. | [optional] + +### Return type + +**str** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/octet-stream + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**0** | default response | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **download_attachment_base64** +> DownloadAttachmentDto download_attachment_base64(email_id, attachment_id) + +Get email attachment as base64 encoded string as an alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`. + +Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + email_id = 'email_id_example' # str | ID of email +attachment_id = 'attachment_id_example' # str | ID of attachment + + try: + # Get email attachment as base64 encoded string as an alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`. + api_response = api_instance.download_attachment_base64(email_id, attachment_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling EmailControllerApi->download_attachment_base64: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email_id** | [**str**]()| ID of email | + **attachment_id** | **str**| ID of attachment | + +### Return type + +[**DownloadAttachmentDto**](DownloadAttachmentDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **download_body** +> str download_body(email_id) + +Get email body as string. Returned as `plain/text` with content type header. + +Returns the specified email body for a given email as a string + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + email_id = 'email_id_example' # str | ID of email + + try: + # Get email body as string. Returned as `plain/text` with content type header. + api_response = api_instance.download_body(email_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling EmailControllerApi->download_body: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email_id** | [**str**]()| ID of email | + +### Return type + +**str** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/plain, text/html + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **download_body_bytes** +> str download_body_bytes(email_id) + +Get email body in bytes. Returned as `octet-stream` with content type header. + +Returns the specified email body for a given email as a stream / array of bytes. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + email_id = 'email_id_example' # str | ID of email + + try: + # Get email body in bytes. Returned as `octet-stream` with content type header. + api_response = api_instance.download_body_bytes(email_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling EmailControllerApi->download_body_bytes: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email_id** | [**str**]()| ID of email | + +### Return type + +**str** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/octet-stream + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**0** | default response | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **forward_email** +> SentEmailDto forward_email(email_id, forward_email_options) + +Forward email to recipients + +Forward an existing email to new recipients. The sender of the email will be the inbox that received the email you are forwarding. You can override the sender with the `from` option. Note you must have access to the from address in MailSlurp to use the override. For more control consider fetching the email and sending it a new using the send email endpoints. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + email_id = 'email_id_example' # str | ID of email +forward_email_options = mailslurp_client.ForwardEmailOptions() # ForwardEmailOptions | + + try: + # Forward email to recipients + api_response = api_instance.forward_email(email_id, forward_email_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling EmailControllerApi->forward_email: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email_id** | [**str**]()| ID of email | + **forward_email_options** | [**ForwardEmailOptions**](ForwardEmailOptions)| | + +### Return type + +[**SentEmailDto**](SentEmailDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_attachment_meta_data** +> AttachmentMetaData get_attachment_meta_data(email_id, attachment_id) + +Get email attachment metadata. This is the `contentType` and `contentLength` of an attachment. To get the individual attachments use the `downloadAttachment` methods. + +Returns the metadata such as name and content-type for a given attachment and email. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + email_id = 'email_id_example' # str | ID of email +attachment_id = 'attachment_id_example' # str | ID of attachment + + try: + # Get email attachment metadata. This is the `contentType` and `contentLength` of an attachment. To get the individual attachments use the `downloadAttachment` methods. + api_response = api_instance.get_attachment_meta_data(email_id, attachment_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling EmailControllerApi->get_attachment_meta_data: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email_id** | [**str**]()| ID of email | + **attachment_id** | **str**| ID of attachment | + +### Return type + +[**AttachmentMetaData**](AttachmentMetaData) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_email** +> Email get_email(email_id, decode=decode) + +Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController. + +Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + email_id = 'email_id_example' # str | +decode = False # bool | Decode email body quoted-printable encoding to plain text. SMTP servers often encode text using quoted-printable format (for instance `=D7`). This can be a pain for testing (optional) (default to False) + + try: + # Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController. + api_response = api_instance.get_email(email_id, decode=decode) + pprint(api_response) + except ApiException as e: + print("Exception when calling EmailControllerApi->get_email: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email_id** | [**str**]()| | + **decode** | **bool**| Decode email body quoted-printable encoding to plain text. SMTP servers often encode text using quoted-printable format (for instance `=D7`). This can be a pain for testing | [optional] [default to False] + +### Return type + +[**Email**](Email) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_email_attachments** +> list[AttachmentMetaData] get_email_attachments(email_id) + +Get all email attachment metadata. Metadata includes name and size of attachments. + +Returns an array of attachment metadata such as name and content-type for a given email if present. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + email_id = 'email_id_example' # str | ID of email + + try: + # Get all email attachment metadata. Metadata includes name and size of attachments. + api_response = api_instance.get_email_attachments(email_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling EmailControllerApi->get_email_attachments: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email_id** | [**str**]()| ID of email | + +### Return type + +[**list[AttachmentMetaData]**](AttachmentMetaData) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_email_content_match** +> EmailContentMatchResult get_email_content_match(email_id, content_match_options) + +Get email content regex pattern match results. Runs regex against email body and returns match groups. + +Return the matches for a given Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + email_id = 'email_id_example' # str | ID of email to match against +content_match_options = mailslurp_client.ContentMatchOptions() # ContentMatchOptions | + + try: + # Get email content regex pattern match results. Runs regex against email body and returns match groups. + api_response = api_instance.get_email_content_match(email_id, content_match_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling EmailControllerApi->get_email_content_match: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email_id** | [**str**]()| ID of email to match against | + **content_match_options** | [**ContentMatchOptions**](ContentMatchOptions)| | + +### Return type + +[**EmailContentMatchResult**](EmailContentMatchResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_email_count** +> CountDto get_email_count() + +Get email count + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + + try: + # Get email count + api_response = api_instance.get_email_count() + pprint(api_response) + except ApiException as e: + print("Exception when calling EmailControllerApi->get_email_count: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CountDto**](CountDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_email_html** +> str get_email_html(email_id, decode=decode) + +Get email content as HTML. For displaying emails in browser context. + +Retrieve email content as HTML response for viewing in browsers. Decodes quoted-printable entities and converts charset to UTF-8. Pass your API KEY as a request parameter when viewing in a browser: `?apiKey=xxx`. Returns content-type `text/html;charset=utf-8` so you must call expecting that content response not JSON. For JSON response see the `getEmailHTMLJson` method. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + email_id = 'email_id_example' # str | +decode = False # bool | (optional) (default to False) + + try: + # Get email content as HTML. For displaying emails in browser context. + api_response = api_instance.get_email_html(email_id, decode=decode) + pprint(api_response) + except ApiException as e: + print("Exception when calling EmailControllerApi->get_email_html: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email_id** | [**str**]()| | + **decode** | **bool**| | [optional] [default to False] + +### Return type + +**str** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/html;charset=utf-8, text/html + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_email_html_json** +> EmailHtmlDto get_email_html_json(email_id, decode=decode) + +Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content + +Retrieve email content as HTML response. Decodes quoted-printable entities and converts charset to UTF-8. Returns content-type `application/json;charset=utf-8` so you must call expecting that content response not JSON. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + email_id = 'email_id_example' # str | +decode = False # bool | (optional) (default to False) + + try: + # Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content + api_response = api_instance.get_email_html_json(email_id, decode=decode) + pprint(api_response) + except ApiException as e: + print("Exception when calling EmailControllerApi->get_email_html_json: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email_id** | [**str**]()| | + **decode** | **bool**| | [optional] [default to False] + +### Return type + +[**EmailHtmlDto**](EmailHtmlDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_email_html_query** +> EmailTextLinesResult get_email_html_query(email_id, html_selector) + +Parse and return text from an email, stripping HTML and decoding encoded characters + +Parse an email body and return the content as an array of text. HTML parsing uses JSoup which supports JQuery/CSS style selectors + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + email_id = 'email_id_example' # str | ID of email to perform HTML query on +html_selector = 'html_selector_example' # str | HTML selector to search for. Uses JQuery/JSoup/CSS style selector like '.my-div' to match content. See https://jsoup.org/apidocs/org/jsoup/select/Selector.html for more information. + + try: + # Parse and return text from an email, stripping HTML and decoding encoded characters + api_response = api_instance.get_email_html_query(email_id, html_selector) + pprint(api_response) + except ApiException as e: + print("Exception when calling EmailControllerApi->get_email_html_query: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email_id** | [**str**]()| ID of email to perform HTML query on | + **html_selector** | **str**| HTML selector to search for. Uses JQuery/JSoup/CSS style selector like '.my-div' to match content. See https://jsoup.org/apidocs/org/jsoup/select/Selector.html for more information. | + +### Return type + +[**EmailTextLinesResult**](EmailTextLinesResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_email_links** +> EmailLinksResult get_email_links(email_id) + +Parse and return list of links found in an email (only works for HTML content) + +HTML parsing uses JSoup and UNIX line separators. Searches content for href attributes + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + email_id = 'email_id_example' # str | ID of email to fetch text for + + try: + # Parse and return list of links found in an email (only works for HTML content) + api_response = api_instance.get_email_links(email_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling EmailControllerApi->get_email_links: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email_id** | [**str**]()| ID of email to fetch text for | + +### Return type + +[**EmailLinksResult**](EmailLinksResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_email_preview_ur_ls** +> EmailPreviewUrls get_email_preview_ur_ls(email_id) + +Get email URLs for viewing in browser or downloading + +Get a list of URLs for email content as text/html or raw SMTP message for viewing the message in a browser. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + email_id = 'email_id_example' # str | + + try: + # Get email URLs for viewing in browser or downloading + api_response = api_instance.get_email_preview_ur_ls(email_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling EmailControllerApi->get_email_preview_ur_ls: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email_id** | [**str**]()| | + +### Return type + +[**EmailPreviewUrls**](EmailPreviewUrls) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_email_text_lines** +> EmailTextLinesResult get_email_text_lines(email_id, decode_html_entities=decode_html_entities, line_separator=line_separator) + +Parse and return text from an email, stripping HTML and decoding encoded characters + +Parse an email body and return the content as an array of strings. HTML parsing uses JSoup and UNIX line separators. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + email_id = 'email_id_example' # str | ID of email to fetch text for +decode_html_entities = True # bool | Decode HTML entities (optional) +line_separator = 'line_separator_example' # str | Line separator character (optional) + + try: + # Parse and return text from an email, stripping HTML and decoding encoded characters + api_response = api_instance.get_email_text_lines(email_id, decode_html_entities=decode_html_entities, line_separator=line_separator) + pprint(api_response) + except ApiException as e: + print("Exception when calling EmailControllerApi->get_email_text_lines: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email_id** | [**str**]()| ID of email to fetch text for | + **decode_html_entities** | **bool**| Decode HTML entities | [optional] + **line_separator** | **str**| Line separator character | [optional] + +### Return type + +[**EmailTextLinesResult**](EmailTextLinesResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_emails_paginated** +> PageEmailProjection get_emails_paginated(inbox_id=inbox_id, page=page, size=size, sort=sort, unread_only=unread_only, search_filter=search_filter, since=since, before=before) + +Get all emails in all inboxes in paginated form. Email API list all. + +By default returns all emails across all inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + inbox_id = ['inbox_id_example'] # list[str] | Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. (optional) +page = 0 # int | Optional page index in email list pagination (optional) (default to 0) +size = 20 # int | Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +unread_only = False # bool | Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (optional) (default to False) +search_filter = 'search_filter_example' # str | Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Optional filter emails received after given date time (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Optional filter emails received before given date time (optional) + + try: + # Get all emails in all inboxes in paginated form. Email API list all. + api_response = api_instance.get_emails_paginated(inbox_id=inbox_id, page=page, size=size, sort=sort, unread_only=unread_only, search_filter=search_filter, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling EmailControllerApi->get_emails_paginated: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**list[str]**](str)| Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. | [optional] + **page** | **int**| Optional page index in email list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **unread_only** | **bool**| Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly | [optional] [default to False] + **search_filter** | **str**| Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body | [optional] + **since** | **datetime**| Optional filter emails received after given date time | [optional] + **before** | **datetime**| Optional filter emails received before given date time | [optional] + +### Return type + +[**PageEmailProjection**](PageEmailProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_gravatar_url_for_email_address** +> GravatarUrl get_gravatar_url_for_email_address(email_address, size=size) + + + +Get gravatar url for email address + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + email_address = 'email_address_example' # str | +size = 'size_example' # str | (optional) + + try: + api_response = api_instance.get_gravatar_url_for_email_address(email_address, size=size) + pprint(api_response) + except ApiException as e: + print("Exception when calling EmailControllerApi->get_gravatar_url_for_email_address: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email_address** | **str**| | + **size** | **str**| | [optional] + +### Return type + +[**GravatarUrl**](GravatarUrl) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_latest_email** +> Email get_latest_email(inbox_ids=inbox_ids) + +Get latest email in all inboxes. Most recently received. + +Get the newest email in all inboxes or in a passed set of inbox IDs + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + inbox_ids = ['inbox_ids_example'] # list[str] | Optional set of inboxes to filter by. Only get the latest email from these inbox IDs. If not provided will search across all inboxes (optional) + + try: + # Get latest email in all inboxes. Most recently received. + api_response = api_instance.get_latest_email(inbox_ids=inbox_ids) + pprint(api_response) + except ApiException as e: + print("Exception when calling EmailControllerApi->get_latest_email: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_ids** | [**list[str]**](str)| Optional set of inboxes to filter by. Only get the latest email from these inbox IDs. If not provided will search across all inboxes | [optional] + +### Return type + +[**Email**](Email) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_latest_email_in_inbox1** +> Email get_latest_email_in_inbox1(inbox_id) + +Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. + +Get the newest email in all inboxes or in a passed set of inbox IDs + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | ID of the inbox you want to get the latest email from + + try: + # Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. + api_response = api_instance.get_latest_email_in_inbox1(inbox_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling EmailControllerApi->get_latest_email_in_inbox1: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| ID of the inbox you want to get the latest email from | + +### Return type + +[**Email**](Email) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_organization_emails_paginated** +> PageEmailProjection get_organization_emails_paginated(inbox_id=inbox_id, page=page, size=size, sort=sort, unread_only=unread_only, search_filter=search_filter, since=since, before=before) + +Get all organization emails. List team or shared test email accounts + +By default returns all emails across all team inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + inbox_id = ['inbox_id_example'] # list[str] | Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. (optional) +page = 0 # int | Optional page index in email list pagination (optional) (default to 0) +size = 20 # int | Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +unread_only = False # bool | Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly (optional) (default to False) +search_filter = 'search_filter_example' # str | Optional search filter search filter for emails. (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Optional filter emails received after given date time (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Optional filter emails received before given date time (optional) + + try: + # Get all organization emails. List team or shared test email accounts + api_response = api_instance.get_organization_emails_paginated(inbox_id=inbox_id, page=page, size=size, sort=sort, unread_only=unread_only, search_filter=search_filter, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling EmailControllerApi->get_organization_emails_paginated: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**list[str]**](str)| Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. | [optional] + **page** | **int**| Optional page index in email list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **unread_only** | **bool**| Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly | [optional] [default to False] + **search_filter** | **str**| Optional search filter search filter for emails. | [optional] + **since** | **datetime**| Optional filter emails received after given date time | [optional] + **before** | **datetime**| Optional filter emails received before given date time | [optional] + +### Return type + +[**PageEmailProjection**](PageEmailProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_raw_email_contents** +> str get_raw_email_contents(email_id) + +Get raw email string. Returns unparsed raw SMTP message with headers and body. + +Returns a raw, unparsed, and unprocessed email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawEmailJson endpoint + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + email_id = 'email_id_example' # str | ID of email + + try: + # Get raw email string. Returns unparsed raw SMTP message with headers and body. + api_response = api_instance.get_raw_email_contents(email_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling EmailControllerApi->get_raw_email_contents: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email_id** | [**str**]()| ID of email | + +### Return type + +**str** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/plain + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_raw_email_json** +> RawEmailJson get_raw_email_json(email_id) + +Get raw email in JSON. Unparsed SMTP message in JSON wrapper format. + +Returns a raw, unparsed, and unprocessed email wrapped in a JSON response object for easier handling when compared with the getRawEmail text/plain response + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + email_id = 'email_id_example' # str | ID of email + + try: + # Get raw email in JSON. Unparsed SMTP message in JSON wrapper format. + api_response = api_instance.get_raw_email_json(email_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling EmailControllerApi->get_raw_email_json: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email_id** | [**str**]()| ID of email | + +### Return type + +[**RawEmailJson**](RawEmailJson) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_unread_email_count** +> UnreadCount get_unread_email_count() + +Get unread email count + +Get number of emails unread. Unread means has not been viewed in dashboard or returned in an email API response + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + + try: + # Get unread email count + api_response = api_instance.get_unread_email_count() + pprint(api_response) + except ApiException as e: + print("Exception when calling EmailControllerApi->get_unread_email_count: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**UnreadCount**](UnreadCount) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **mark_as_read** +> EmailPreview mark_as_read(email_id, read=read) + +Mark an email as read on unread + +Marks an email as read or unread. Pass boolean read flag to set value. This is useful if you want to read an email but keep it as unread + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + email_id = 'email_id_example' # str | +read = True # bool | What value to assign to email read property. Default true. (optional) (default to True) + + try: + # Mark an email as read on unread + api_response = api_instance.mark_as_read(email_id, read=read) + pprint(api_response) + except ApiException as e: + print("Exception when calling EmailControllerApi->mark_as_read: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email_id** | [**str**]()| | + **read** | **bool**| What value to assign to email read property. Default true. | [optional] [default to True] + +### Return type + +[**EmailPreview**](EmailPreview) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **reply_to_email** +> SentEmailDto reply_to_email(email_id, reply_to_email_options) + +Reply to an email + +Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + email_id = 'email_id_example' # str | ID of the email that should be replied to +reply_to_email_options = mailslurp_client.ReplyToEmailOptions() # ReplyToEmailOptions | + + try: + # Reply to an email + api_response = api_instance.reply_to_email(email_id, reply_to_email_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling EmailControllerApi->reply_to_email: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email_id** | [**str**]()| ID of the email that should be replied to | + **reply_to_email_options** | [**ReplyToEmailOptions**](ReplyToEmailOptions)| | + +### Return type + +[**SentEmailDto**](SentEmailDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **send_email_source_optional** +> send_email_source_optional(send_email_options, inbox_id=inbox_id, use_domain_pool=use_domain_pool, virtual_send=virtual_send) + +Send email + +Alias for `InboxController.sendEmail` method - see original method for full details. Sends an email from a given inbox that you have created. If no inbox is supplied a random inbox will be created for you and used to send the email. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + send_email_options = mailslurp_client.SendEmailOptions() # SendEmailOptions | +inbox_id = 'inbox_id_example' # str | ID of the inbox you want to send the email from (optional) +use_domain_pool = True # bool | Use domain pool. Optionally create inbox to send from using the mailslurp domain pool. (optional) +virtual_send = True # bool | Optionally create inbox to send from that is a virtual inbox and won't send to external addresses (optional) + + try: + # Send email + api_instance.send_email_source_optional(send_email_options, inbox_id=inbox_id, use_domain_pool=use_domain_pool, virtual_send=virtual_send) + except ApiException as e: + print("Exception when calling EmailControllerApi->send_email_source_optional: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **send_email_options** | [**SendEmailOptions**](SendEmailOptions)| | + **inbox_id** | [**str**]()| ID of the inbox you want to send the email from | [optional] + **use_domain_pool** | **bool**| Use domain pool. Optionally create inbox to send from using the mailslurp domain pool. | [optional] + **virtual_send** | **bool**| Optionally create inbox to send from that is a virtual inbox and won't send to external addresses | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **validate_email** +> ValidationDto validate_email(email_id) + +Validate email HTML contents + +Validate the HTML content of email if HTML is found. Considered valid if no HTML is present. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailControllerApi(api_client) + email_id = 'email_id_example' # str | ID of email + + try: + # Validate email HTML contents + api_response = api_instance.validate_email(email_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling EmailControllerApi->validate_email: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email_id** | [**str**]()| ID of email | + +### Return type + +[**ValidationDto**](ValidationDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/EmailHtmlDto.md b/docs/EmailHtmlDto.md new file mode 100644 index 00000000..37b2ae01 --- /dev/null +++ b/docs/EmailHtmlDto.md @@ -0,0 +1,11 @@ +# EmailHtmlDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**subject** | **str** | | [optional] +**body** | **str** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/EmailLinksResult.md b/docs/EmailLinksResult.md new file mode 100644 index 00000000..699fad3a --- /dev/null +++ b/docs/EmailLinksResult.md @@ -0,0 +1,12 @@ +# EmailLinksResult + +Links found in HTML +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | **list[str]** | | +**body** | **str** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/EmailPreview.md b/docs/EmailPreview.md new file mode 100644 index 00000000..b3907218 --- /dev/null +++ b/docs/EmailPreview.md @@ -0,0 +1,20 @@ +# EmailPreview + +Preview of an email message. For full message (including body and attachments) call the `getEmail` or other email endpoints with the provided email ID. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | ID of the email entity | +**domain_id** | **str** | ID of the domain that received the email | [optional] +**subject** | **str** | The subject line of the email message as specified by SMTP subject header | [optional] +**to** | **list[str]** | List of `To` recipient email addresses that the email was addressed to. See recipients object for names. | +**_from** | **str** | Who the email was sent from. An email address - see fromName for the sender name. | [optional] +**bcc** | **list[str]** | List of `BCC` recipients email addresses that the email was addressed to. See recipients object for names. | [optional] +**cc** | **list[str]** | List of `CC` recipients email addresses that the email was addressed to. See recipients object for names. | [optional] +**created_at** | **datetime** | When was the email received by MailSlurp | +**read** | **bool** | Read flag. Has the email ever been viewed in the dashboard or fetched via the API with a hydrated body? If so the email is marked as read. Paginated results do not affect read status. Read status is different to email opened event as it depends on your own account accessing the email. Email opened is determined by tracking pixels sent to other uses if enable during sending. You can listened for both email read and email opened events using webhooks. | +**attachments** | **list[str]** | List of IDs of attachments found in the email. Use these IDs with the Inbox and Email Controllers to download attachments and attachment meta data such as filesize, name, extension. | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/EmailPreviewUrls.md b/docs/EmailPreviewUrls.md new file mode 100644 index 00000000..adad5755 --- /dev/null +++ b/docs/EmailPreviewUrls.md @@ -0,0 +1,12 @@ +# EmailPreviewUrls + +URLs for email body +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**raw_smtp_message_url** | **str** | | +**plain_html_body_url** | **str** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/EmailProjection.md b/docs/EmailProjection.md new file mode 100644 index 00000000..4ef0e5ab --- /dev/null +++ b/docs/EmailProjection.md @@ -0,0 +1,24 @@ +# EmailProjection + +A compact representation of a full email. Used in list endpoints to keep response sizes low. Body and attachments are not included. To get all fields of the email use the `getEmail` method with the email projection's ID. See `EmailDto` for documentation on projection properties. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**_from** | **str** | | [optional] +**subject** | **str** | | [optional] +**inbox_id** | **str** | | +**attachments** | **list[str]** | | [optional] +**to** | **list[str]** | | +**bcc** | **list[str]** | | [optional] +**cc** | **list[str]** | | [optional] +**created_at** | **datetime** | | +**domain_id** | **str** | | [optional] +**read** | **bool** | | +**team_access** | **bool** | | +**body_md5_hash** | **str** | | [optional] +**body_excerpt** | **str** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/EmailRecipients.md b/docs/EmailRecipients.md new file mode 100644 index 00000000..62560e75 --- /dev/null +++ b/docs/EmailRecipients.md @@ -0,0 +1,13 @@ +# EmailRecipients + +The `To`,`CC`,`BCC` recipients stored in object form with email address and name accessible. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**to** | [**list[Recipient]**](Recipient) | | [optional] +**cc** | [**list[Recipient]**](Recipient) | | [optional] +**bcc** | [**list[Recipient]**](Recipient) | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/EmailTextLinesResult.md b/docs/EmailTextLinesResult.md new file mode 100644 index 00000000..9f3e1877 --- /dev/null +++ b/docs/EmailTextLinesResult.md @@ -0,0 +1,12 @@ +# EmailTextLinesResult + +Parsed text of an email +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lines** | **list[str]** | | +**body** | **str** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/EmailValidationRequest.md b/docs/EmailValidationRequest.md new file mode 100644 index 00000000..3383aede --- /dev/null +++ b/docs/EmailValidationRequest.md @@ -0,0 +1,16 @@ +# EmailValidationRequest + +Email validation request +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**user_id** | **str** | | +**email_address** | **str** | | +**is_valid** | **bool** | | +**created_at** | **datetime** | | +**updated_at** | **datetime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/EmailVerificationControllerApi.md b/docs/EmailVerificationControllerApi.md new file mode 100644 index 00000000..f490d4eb --- /dev/null +++ b/docs/EmailVerificationControllerApi.md @@ -0,0 +1,172 @@ +# mailslurp_client.EmailVerificationControllerApi + +All URIs are relative to *https://python.api.mailslurp.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_validation_requests**](EmailVerificationControllerApi#get_validation_requests) | **GET** /email-verification/validation-requests | Validate a list of email addresses. Per unit billing. See your plan for pricing. +[**validate_email_address_list**](EmailVerificationControllerApi#validate_email_address_list) | **POST** /email-verification/email-address-list | Validate a list of email addresses. Per unit billing. See your plan for pricing. + + +# **get_validation_requests** +> PageEmailValidationRequest get_validation_requests(page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before, is_valid=is_valid) + +Validate a list of email addresses. Per unit billing. See your plan for pricing. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailVerificationControllerApi(api_client) + page = 0 # int | Optional page index in list pagination (optional) (default to 0) +size = 20 # int | Optional page size for paginated result list. (optional) (default to 20) +sort = 'DESC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'DESC') +search_filter = 'search_filter_example' # str | Optional search filter (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) +is_valid = True # bool | Filter where email is valid is true or false (optional) + + try: + # Validate a list of email addresses. Per unit billing. See your plan for pricing. + api_response = api_instance.get_validation_requests(page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before, is_valid=is_valid) + pprint(api_response) + except ApiException as e: + print("Exception when calling EmailVerificationControllerApi->get_validation_requests: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Optional page index in list pagination | [optional] [default to 0] + **size** | **int**| Optional page size for paginated result list. | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'DESC'] + **search_filter** | **str**| Optional search filter | [optional] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + **is_valid** | **bool**| Filter where email is valid is true or false | [optional] + +### Return type + +[**PageEmailValidationRequest**](PageEmailValidationRequest) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **validate_email_address_list** +> ValidateEmailAddressListResult validate_email_address_list(validate_email_address_list_options) + +Validate a list of email addresses. Per unit billing. See your plan for pricing. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.EmailVerificationControllerApi(api_client) + validate_email_address_list_options = mailslurp_client.ValidateEmailAddressListOptions() # ValidateEmailAddressListOptions | + + try: + # Validate a list of email addresses. Per unit billing. See your plan for pricing. + api_response = api_instance.validate_email_address_list(validate_email_address_list_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling EmailVerificationControllerApi->validate_email_address_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **validate_email_address_list_options** | [**ValidateEmailAddressListOptions**](ValidateEmailAddressListOptions)| | + +### Return type + +[**ValidateEmailAddressListResult**](ValidateEmailAddressListResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/EmailVerificationResult.md b/docs/EmailVerificationResult.md new file mode 100644 index 00000000..0e970a86 --- /dev/null +++ b/docs/EmailVerificationResult.md @@ -0,0 +1,15 @@ +# EmailVerificationResult + +Email verification result. Valid means email address exists according to response from mail server running at the domain and port given. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain_name** | **str** | | +**port** | **int** | | +**email_address** | **str** | | +**is_valid** | **bool** | | +**error** | **str** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/EmergencyAddress.md b/docs/EmergencyAddress.md new file mode 100644 index 00000000..7d73844a --- /dev/null +++ b/docs/EmergencyAddress.md @@ -0,0 +1,22 @@ +# EmergencyAddress + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**sid** | **str** | | +**user_id** | **str** | | +**display_name** | **str** | | +**customer_name** | **str** | | +**address1** | **str** | | +**city** | **str** | | +**region** | **str** | | +**postal_code** | **str** | | +**phone_country** | **str** | | +**account_sid** | **str** | | +**created_at** | **datetime** | | +**updated_at** | **datetime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/EmergencyAddressDto.md b/docs/EmergencyAddressDto.md new file mode 100644 index 00000000..f94f1d01 --- /dev/null +++ b/docs/EmergencyAddressDto.md @@ -0,0 +1,12 @@ +# EmergencyAddressDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**address1** | **str** | | +**phone_country** | **str** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/EmptyResponseDto.md b/docs/EmptyResponseDto.md new file mode 100644 index 00000000..25ee5e1b --- /dev/null +++ b/docs/EmptyResponseDto.md @@ -0,0 +1,10 @@ +# EmptyResponseDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/ExpirationDefaults.md b/docs/ExpirationDefaults.md new file mode 100644 index 00000000..3181413b --- /dev/null +++ b/docs/ExpirationDefaults.md @@ -0,0 +1,15 @@ +# ExpirationDefaults + +Expiration defaults for your account +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**default_expiration_millis** | **int** | | [optional] +**max_expiration_millis** | **int** | | [optional] +**default_expires_at** | **datetime** | | [optional] +**can_permanent_inbox** | **bool** | | +**next_inbox_allows_permanent** | **bool** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/ExpiredControllerApi.md b/docs/ExpiredControllerApi.md new file mode 100644 index 00000000..2d49129f --- /dev/null +++ b/docs/ExpiredControllerApi.md @@ -0,0 +1,324 @@ +# mailslurp_client.ExpiredControllerApi + +All URIs are relative to *https://python.api.mailslurp.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_expiration_defaults**](ExpiredControllerApi#get_expiration_defaults) | **GET** /expired/defaults | Get default expiration settings +[**get_expired_inbox_by_inbox_id**](ExpiredControllerApi#get_expired_inbox_by_inbox_id) | **GET** /expired/inbox/{inboxId} | Get expired inbox record for a previously existing inbox +[**get_expired_inbox_record**](ExpiredControllerApi#get_expired_inbox_record) | **GET** /expired/{expiredId} | Get an expired inbox record +[**get_expired_inboxes**](ExpiredControllerApi#get_expired_inboxes) | **GET** /expired | List records of expired inboxes + + +# **get_expiration_defaults** +> ExpirationDefaults get_expiration_defaults() + +Get default expiration settings + +Return default times used for inbox expiration + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.ExpiredControllerApi(api_client) + + try: + # Get default expiration settings + api_response = api_instance.get_expiration_defaults() + pprint(api_response) + except ApiException as e: + print("Exception when calling ExpiredControllerApi->get_expiration_defaults: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**ExpirationDefaults**](ExpirationDefaults) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_expired_inbox_by_inbox_id** +> ExpiredInboxDto get_expired_inbox_by_inbox_id(inbox_id) + +Get expired inbox record for a previously existing inbox + +Use the inboxId to return an ExpiredInboxRecord if an inbox has expired. Inboxes expire and are disabled if an expiration date is set or plan requires. Returns 404 if no expired inbox is found for the inboxId + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.ExpiredControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | ID of inbox you want to retrieve (not the inbox ID) + + try: + # Get expired inbox record for a previously existing inbox + api_response = api_instance.get_expired_inbox_by_inbox_id(inbox_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling ExpiredControllerApi->get_expired_inbox_by_inbox_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| ID of inbox you want to retrieve (not the inbox ID) | + +### Return type + +[**ExpiredInboxDto**](ExpiredInboxDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_expired_inbox_record** +> ExpiredInboxDto get_expired_inbox_record(expired_id) + +Get an expired inbox record + +Inboxes created with an expiration date will expire after the given date and be moved to an ExpiredInbox entity. You can still read emails in the inbox but it can no longer send or receive emails. Fetch the expired inboxes to view the old inboxes properties + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.ExpiredControllerApi(api_client) + expired_id = 'expired_id_example' # str | ID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId + + try: + # Get an expired inbox record + api_response = api_instance.get_expired_inbox_record(expired_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling ExpiredControllerApi->get_expired_inbox_record: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **expired_id** | [**str**]()| ID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId | + +### Return type + +[**ExpiredInboxDto**](ExpiredInboxDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_expired_inboxes** +> PageExpiredInboxRecordProjection get_expired_inboxes(page=page, size=size, sort=sort, since=since, before=before) + +List records of expired inboxes + +Inboxes created with an expiration date will expire after the given date. An ExpiredInboxRecord is created that records the inboxes old ID and email address. You can still read emails in the inbox (using the inboxes old ID) but the email address associated with the inbox can no longer send or receive emails. Fetch expired inbox records to view the old inboxes properties + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.ExpiredControllerApi(api_client) + page = 0 # int | Optional page index in inbox sent email list pagination (optional) (default to 0) +size = 20 # int | Optional page size in inbox sent email list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) + + try: + # List records of expired inboxes + api_response = api_instance.get_expired_inboxes(page=page, size=size, sort=sort, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling ExpiredControllerApi->get_expired_inboxes: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Optional page index in inbox sent email list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in inbox sent email list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + +### Return type + +[**PageExpiredInboxRecordProjection**](PageExpiredInboxRecordProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/ExpiredInboxDto.md b/docs/ExpiredInboxDto.md new file mode 100644 index 00000000..020f8694 --- /dev/null +++ b/docs/ExpiredInboxDto.md @@ -0,0 +1,13 @@ +# ExpiredInboxDto + +Expired inbox +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**inbox_id** | **str** | | +**email_address** | **str** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/ExpiredInboxRecordProjection.md b/docs/ExpiredInboxRecordProjection.md new file mode 100644 index 00000000..dbf8f38d --- /dev/null +++ b/docs/ExpiredInboxRecordProjection.md @@ -0,0 +1,14 @@ +# ExpiredInboxRecordProjection + +Record of inbox expiration +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**user_id** | **str** | | +**email_address** | **str** | | +**created_at** | **datetime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/ExportControllerApi.md b/docs/ExportControllerApi.md new file mode 100644 index 00000000..ea75d3ac --- /dev/null +++ b/docs/ExportControllerApi.md @@ -0,0 +1,178 @@ +# mailslurp_client.ExportControllerApi + +All URIs are relative to *https://python.api.mailslurp.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**export_entities**](ExportControllerApi#export_entities) | **GET** /export | Export inboxes link callable via browser +[**get_export_link**](ExportControllerApi#get_export_link) | **POST** /export | Get export link + + +# **export_entities** +> list[str] export_entities(export_type, api_key, output_format, filter=filter, list_separator_token=list_separator_token, exclude_previously_exported=exclude_previously_exported, created_earliest_time=created_earliest_time, created_oldest_time=created_oldest_time) + +Export inboxes link callable via browser + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.ExportControllerApi(api_client) + export_type = 'export_type_example' # str | +api_key = 'api_key_example' # str | +output_format = 'output_format_example' # str | +filter = 'filter_example' # str | (optional) +list_separator_token = 'list_separator_token_example' # str | (optional) +exclude_previously_exported = True # bool | (optional) +created_earliest_time = '2013-10-20T19:20:30+01:00' # datetime | (optional) +created_oldest_time = '2013-10-20T19:20:30+01:00' # datetime | (optional) + + try: + # Export inboxes link callable via browser + api_response = api_instance.export_entities(export_type, api_key, output_format, filter=filter, list_separator_token=list_separator_token, exclude_previously_exported=exclude_previously_exported, created_earliest_time=created_earliest_time, created_oldest_time=created_oldest_time) + pprint(api_response) + except ApiException as e: + print("Exception when calling ExportControllerApi->export_entities: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **export_type** | **str**| | + **api_key** | **str**| | + **output_format** | **str**| | + **filter** | **str**| | [optional] + **list_separator_token** | **str**| | [optional] + **exclude_previously_exported** | **bool**| | [optional] + **created_earliest_time** | **datetime**| | [optional] + **created_oldest_time** | **datetime**| | [optional] + +### Return type + +**list[str]** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_export_link** +> ExportLink get_export_link(export_type, export_options, api_key=api_key) + +Get export link + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.ExportControllerApi(api_client) + export_type = 'export_type_example' # str | +export_options = mailslurp_client.ExportOptions() # ExportOptions | +api_key = 'api_key_example' # str | (optional) + + try: + # Get export link + api_response = api_instance.get_export_link(export_type, export_options, api_key=api_key) + pprint(api_response) + except ApiException as e: + print("Exception when calling ExportControllerApi->get_export_link: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **export_type** | **str**| | + **export_options** | [**ExportOptions**](ExportOptions)| | + **api_key** | **str**| | [optional] + +### Return type + +[**ExportLink**](ExportLink) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/ExportLink.md b/docs/ExportLink.md new file mode 100644 index 00000000..99884626 --- /dev/null +++ b/docs/ExportLink.md @@ -0,0 +1,11 @@ +# ExportLink + +Export download link +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**download_link** | **str** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/ExportOptions.md b/docs/ExportOptions.md new file mode 100644 index 00000000..14016803 --- /dev/null +++ b/docs/ExportOptions.md @@ -0,0 +1,16 @@ +# ExportOptions + +Options for exporting user data +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**output_format** | **str** | | +**exclude_previously_exported** | **bool** | | [optional] +**created_earliest_time** | **datetime** | | [optional] +**created_oldest_time** | **datetime** | | [optional] +**filter** | **str** | | [optional] +**list_separator_token** | **str** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/FilterBouncedRecipientsOptions.md b/docs/FilterBouncedRecipientsOptions.md new file mode 100644 index 00000000..3172e6fd --- /dev/null +++ b/docs/FilterBouncedRecipientsOptions.md @@ -0,0 +1,11 @@ +# FilterBouncedRecipientsOptions + +Options for filtering bounced email recipients +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email_recipients** | **list[str]** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/FilterBouncedRecipientsResult.md b/docs/FilterBouncedRecipientsResult.md new file mode 100644 index 00000000..4a7fa022 --- /dev/null +++ b/docs/FilterBouncedRecipientsResult.md @@ -0,0 +1,11 @@ +# FilterBouncedRecipientsResult + +Remaining recipients that were filtered to remove bounced recipients +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**filtered_recipients** | **list[str]** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/FlushExpiredInboxesResult.md b/docs/FlushExpiredInboxesResult.md new file mode 100644 index 00000000..4e978e52 --- /dev/null +++ b/docs/FlushExpiredInboxesResult.md @@ -0,0 +1,12 @@ +# FlushExpiredInboxesResult + +Result from calling expire on any inboxes that have applicable expiration dates given current time. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inbox_ids** | **list[str]** | Inbox IDs affected by expiration | +**expire_before** | **datetime** | DateTime to filter inboxes so that those expiring before this time are expired | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/FormControllerApi.md b/docs/FormControllerApi.md new file mode 100644 index 00000000..14595dbe --- /dev/null +++ b/docs/FormControllerApi.md @@ -0,0 +1,98 @@ +# mailslurp_client.FormControllerApi + +All URIs are relative to *https://python.api.mailslurp.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**submit_form**](FormControllerApi#submit_form) | **POST** /forms | Submit a form to be parsed and sent as an email to an address determined by the form fields + + +# **submit_form** +> str submit_form(to=to, subject=subject, redirect_to=redirect_to, email_address=email_address, success_message=success_message, spam_check=spam_check, other_parameters=other_parameters) + +Submit a form to be parsed and sent as an email to an address determined by the form fields + +This endpoint allows you to submit HTML forms and receive the field values and files via email. #### Parameters The endpoint looks for special meta parameters in the form fields OR in the URL request parameters. The meta parameters can be used to specify the behaviour of the email. You must provide at-least a `_to` email address to tell the endpoint where the form should be emailed. These can be submitted as hidden HTML input fields with the corresponding `name` attributes or as URL query parameters such as `?_to=test@example.com` The endpoint takes all other form fields that are named and includes them in the message body of the email. Files are sent as attachments. #### Submitting This endpoint accepts form submission via POST method. It accepts `application/x-www-form-urlencoded`, and `multipart/form-data` content-types. #### HTML Example ```html
``` #### URL Example ```html
``` The email address is specified by a `_to` field OR is extracted from an email alias specified by a `_toAlias` field (see the alias controller for more information). Endpoint accepts . You can specify a content type in HTML forms using the `enctype` attribute, for instance: `
`. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.FormControllerApi(api_client) + to = 'test@example.com' # str | The email address that submitted form should be sent to. (optional) +subject = 'My form submission' # str | Optional subject of the email that will be sent. (optional) +redirect_to = 'https://mysite.com/form-success' # str | Optional URL to redirect form submitter to after submission. If not present user will see a success message. (optional) +email_address = 'test@example.com' # str | Email address of the submitting user. Include this if you wish to record the submitters email address and reply to it later. (optional) +success_message = 'Thanks for submitting' # str | Optional success message to display if no _redirectTo present. (optional) +spam_check = 'spam_check_example' # str | Optional but recommended field that catches spammers out. Include as a hidden form field but LEAVE EMPTY. Spam-bots will usually fill every field. If the _spamCheck field is filled the form submission will be ignored. (optional) +other_parameters = 'other_parameters_example' # str | All other parameters or fields will be accepted and attached to the sent email. This includes files and any HTML form field with a name. These fields will become the body of the email that is sent. (optional) + + try: + # Submit a form to be parsed and sent as an email to an address determined by the form fields + api_response = api_instance.submit_form(to=to, subject=subject, redirect_to=redirect_to, email_address=email_address, success_message=success_message, spam_check=spam_check, other_parameters=other_parameters) + pprint(api_response) + except ApiException as e: + print("Exception when calling FormControllerApi->submit_form: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **to** | **str**| The email address that submitted form should be sent to. | [optional] + **subject** | **str**| Optional subject of the email that will be sent. | [optional] + **redirect_to** | **str**| Optional URL to redirect form submitter to after submission. If not present user will see a success message. | [optional] + **email_address** | **str**| Email address of the submitting user. Include this if you wish to record the submitters email address and reply to it later. | [optional] + **success_message** | **str**| Optional success message to display if no _redirectTo present. | [optional] + **spam_check** | **str**| Optional but recommended field that catches spammers out. Include as a hidden form field but LEAVE EMPTY. Spam-bots will usually fill every field. If the _spamCheck field is filled the form submission will be ignored. | [optional] + **other_parameters** | **str**| All other parameters or fields will be accepted and attached to the sent email. This includes files and any HTML form field with a name. These fields will become the body of the email that is sent. | [optional] + +### Return type + +**str** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/ForwardEmailOptions.md b/docs/ForwardEmailOptions.md new file mode 100644 index 00000000..cc9001e0 --- /dev/null +++ b/docs/ForwardEmailOptions.md @@ -0,0 +1,16 @@ +# ForwardEmailOptions + +Options for forwarding an email +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**to** | **list[str]** | To recipients for forwarded email | +**subject** | **str** | Subject for forwarded email | [optional] +**cc** | **list[str]** | Optional cc recipients | [optional] +**bcc** | **list[str]** | Optional bcc recipients | [optional] +**_from** | **str** | Optional from override | [optional] +**use_inbox_name** | **bool** | Optionally use inbox name as display name for sender email address | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/GravatarUrl.md b/docs/GravatarUrl.md new file mode 100644 index 00000000..93b7136f --- /dev/null +++ b/docs/GravatarUrl.md @@ -0,0 +1,12 @@ +# GravatarUrl + +User image +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | | +**hash** | **str** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/GroupContactsDto.md b/docs/GroupContactsDto.md new file mode 100644 index 00000000..382ee692 --- /dev/null +++ b/docs/GroupContactsDto.md @@ -0,0 +1,12 @@ +# GroupContactsDto + +Describes contacts attached to a contact group +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**group** | [**GroupDto**](GroupDto) | | +**contacts** | [**list[ContactDto]**](ContactDto) | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/GroupControllerApi.md b/docs/GroupControllerApi.md new file mode 100644 index 00000000..330e169a --- /dev/null +++ b/docs/GroupControllerApi.md @@ -0,0 +1,710 @@ +# mailslurp_client.GroupControllerApi + +All URIs are relative to *https://python.api.mailslurp.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**add_contacts_to_group**](GroupControllerApi#add_contacts_to_group) | **PUT** /groups/{groupId}/contacts | Add contacts to a group +[**create_group**](GroupControllerApi#create_group) | **POST** /groups | Create a group +[**delete_group**](GroupControllerApi#delete_group) | **DELETE** /groups/{groupId} | Delete group +[**get_all_groups**](GroupControllerApi#get_all_groups) | **GET** /groups/paginated | Get all Contact Groups in paginated format +[**get_group**](GroupControllerApi#get_group) | **GET** /groups/{groupId} | Get group +[**get_group_with_contacts**](GroupControllerApi#get_group_with_contacts) | **GET** /groups/{groupId}/contacts | Get group and contacts belonging to it +[**get_group_with_contacts_paginated**](GroupControllerApi#get_group_with_contacts_paginated) | **GET** /groups/{groupId}/contacts-paginated | +[**get_groups**](GroupControllerApi#get_groups) | **GET** /groups | Get all groups +[**remove_contacts_from_group**](GroupControllerApi#remove_contacts_from_group) | **DELETE** /groups/{groupId}/contacts | Remove contacts from a group + + +# **add_contacts_to_group** +> GroupContactsDto add_contacts_to_group(group_id, update_group_contacts) + +Add contacts to a group + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.GroupControllerApi(api_client) + group_id = 'group_id_example' # str | +update_group_contacts = mailslurp_client.UpdateGroupContacts() # UpdateGroupContacts | + + try: + # Add contacts to a group + api_response = api_instance.add_contacts_to_group(group_id, update_group_contacts) + pprint(api_response) + except ApiException as e: + print("Exception when calling GroupControllerApi->add_contacts_to_group: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group_id** | [**str**]()| | + **update_group_contacts** | [**UpdateGroupContacts**](UpdateGroupContacts)| | + +### Return type + +[**GroupContactsDto**](GroupContactsDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **create_group** +> GroupDto create_group(create_group_options) + +Create a group + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.GroupControllerApi(api_client) + create_group_options = mailslurp_client.CreateGroupOptions() # CreateGroupOptions | + + try: + # Create a group + api_response = api_instance.create_group(create_group_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling GroupControllerApi->create_group: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_group_options** | [**CreateGroupOptions**](CreateGroupOptions)| | + +### Return type + +[**GroupDto**](GroupDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **delete_group** +> delete_group(group_id) + +Delete group + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.GroupControllerApi(api_client) + group_id = 'group_id_example' # str | + + try: + # Delete group + api_instance.delete_group(group_id) + except ApiException as e: + print("Exception when calling GroupControllerApi->delete_group: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group_id** | [**str**]()| | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_all_groups** +> PageGroupProjection get_all_groups(page=page, size=size, sort=sort, since=since, before=before) + +Get all Contact Groups in paginated format + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.GroupControllerApi(api_client) + page = 0 # int | Optional page index in list pagination (optional) (default to 0) +size = 20 # int | Optional page size in list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) + + try: + # Get all Contact Groups in paginated format + api_response = api_instance.get_all_groups(page=page, size=size, sort=sort, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling GroupControllerApi->get_all_groups: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Optional page index in list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + +### Return type + +[**PageGroupProjection**](PageGroupProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_group** +> GroupDto get_group(group_id) + +Get group + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.GroupControllerApi(api_client) + group_id = 'group_id_example' # str | + + try: + # Get group + api_response = api_instance.get_group(group_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling GroupControllerApi->get_group: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group_id** | [**str**]()| | + +### Return type + +[**GroupDto**](GroupDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_group_with_contacts** +> GroupContactsDto get_group_with_contacts(group_id) + +Get group and contacts belonging to it + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.GroupControllerApi(api_client) + group_id = 'group_id_example' # str | + + try: + # Get group and contacts belonging to it + api_response = api_instance.get_group_with_contacts(group_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling GroupControllerApi->get_group_with_contacts: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group_id** | [**str**]()| | + +### Return type + +[**GroupContactsDto**](GroupContactsDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_group_with_contacts_paginated** +> PageContactProjection get_group_with_contacts_paginated(group_id, page=page, size=size, sort=sort, since=since, before=before) + + + +Get group and paginated contacts belonging to it + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.GroupControllerApi(api_client) + group_id = 'group_id_example' # str | +page = 0 # int | Optional page index in group contact pagination (optional) (default to 0) +size = 20 # int | Optional page size in group contact pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) + + try: + api_response = api_instance.get_group_with_contacts_paginated(group_id, page=page, size=size, sort=sort, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling GroupControllerApi->get_group_with_contacts_paginated: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group_id** | [**str**]()| | + **page** | **int**| Optional page index in group contact pagination | [optional] [default to 0] + **size** | **int**| Optional page size in group contact pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + +### Return type + +[**PageContactProjection**](PageContactProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_groups** +> list[GroupProjection] get_groups() + +Get all groups + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.GroupControllerApi(api_client) + + try: + # Get all groups + api_response = api_instance.get_groups() + pprint(api_response) + except ApiException as e: + print("Exception when calling GroupControllerApi->get_groups: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[GroupProjection]**](GroupProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **remove_contacts_from_group** +> GroupContactsDto remove_contacts_from_group(group_id, update_group_contacts) + +Remove contacts from a group + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.GroupControllerApi(api_client) + group_id = 'group_id_example' # str | +update_group_contacts = mailslurp_client.UpdateGroupContacts() # UpdateGroupContacts | + + try: + # Remove contacts from a group + api_response = api_instance.remove_contacts_from_group(group_id, update_group_contacts) + pprint(api_response) + except ApiException as e: + print("Exception when calling GroupControllerApi->remove_contacts_from_group: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **group_id** | [**str**]()| | + **update_group_contacts** | [**UpdateGroupContacts**](UpdateGroupContacts)| | + +### Return type + +[**GroupContactsDto**](GroupContactsDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/GroupDto.md b/docs/GroupDto.md new file mode 100644 index 00000000..f4bb2346 --- /dev/null +++ b/docs/GroupDto.md @@ -0,0 +1,14 @@ +# GroupDto + +Contact group data +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**name** | **str** | | +**description** | **str** | | [optional] +**created_at** | **datetime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/GroupProjection.md b/docs/GroupProjection.md new file mode 100644 index 00000000..4a139cba --- /dev/null +++ b/docs/GroupProjection.md @@ -0,0 +1,14 @@ +# GroupProjection + +Data for contact group +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**id** | **str** | | +**description** | **str** | | [optional] +**created_at** | **datetime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/HTMLValidationResult.md b/docs/HTMLValidationResult.md new file mode 100644 index 00000000..bb453447 --- /dev/null +++ b/docs/HTMLValidationResult.md @@ -0,0 +1,13 @@ +# HTMLValidationResult + +HTML Validation Results +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**is_valid** | **bool** | Is HTML validation result valid | +**errors** | [**list[ValidationMessage]**](ValidationMessage) | Optional errors resulting from HTML validation | +**warnings** | [**list[ValidationMessage]**](ValidationMessage) | Optional warnings resulting from HTML validation | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/IPAddressResult.md b/docs/IPAddressResult.md new file mode 100644 index 00000000..8f126590 --- /dev/null +++ b/docs/IPAddressResult.md @@ -0,0 +1,12 @@ +# IPAddressResult + +IP Address look up result for a given domain / hostname +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address** | **str** | | +**hostname** | **str** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/ImapFlagOperationOptions.md b/docs/ImapFlagOperationOptions.md new file mode 100644 index 00000000..2802a9f9 --- /dev/null +++ b/docs/ImapFlagOperationOptions.md @@ -0,0 +1,12 @@ +# ImapFlagOperationOptions + +IMAP operation flags +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**flag_operation** | **str** | | +**flags** | **list[str]** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/ImapSmtpAccessDetails.md b/docs/ImapSmtpAccessDetails.md new file mode 100644 index 00000000..55c890e2 --- /dev/null +++ b/docs/ImapSmtpAccessDetails.md @@ -0,0 +1,18 @@ +# ImapSmtpAccessDetails + +Access details for inbox using SMTP or IMAP +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**smtp_server_host** | **str** | SMTP server host domain | +**smtp_server_port** | **int** | SMTP server host port | +**smtp_username** | **str** | SMTP username for login | +**smtp_password** | **str** | SMTP for login | +**imap_server_host** | **str** | IMAP server host domain | +**imap_server_port** | **int** | IMAP server host port | +**imap_username** | **str** | IMAP username for login | +**imap_password** | **str** | IMAP password for login | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/InboxByEmailAddressResult.md b/docs/InboxByEmailAddressResult.md new file mode 100644 index 00000000..523a9523 --- /dev/null +++ b/docs/InboxByEmailAddressResult.md @@ -0,0 +1,12 @@ +# InboxByEmailAddressResult + +Result of search for inbox by email address +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inbox_id** | **str** | | [optional] +**exists** | **bool** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/InboxByNameResult.md b/docs/InboxByNameResult.md new file mode 100644 index 00000000..114d5231 --- /dev/null +++ b/docs/InboxByNameResult.md @@ -0,0 +1,12 @@ +# InboxByNameResult + +Result of search for inbox by name +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inbox_id** | **str** | | [optional] +**exists** | **bool** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/InboxControllerApi.md b/docs/InboxControllerApi.md new file mode 100644 index 00000000..3d217450 --- /dev/null +++ b/docs/InboxControllerApi.md @@ -0,0 +1,2774 @@ +# mailslurp_client.InboxControllerApi + +All URIs are relative to *https://python.api.mailslurp.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_inbox**](InboxControllerApi#create_inbox) | **POST** /inboxes | Create an inbox email address. An inbox has a real email address and can send and receive emails. Inboxes can be either `SMTP` or `HTTP` inboxes. +[**create_inbox_ruleset**](InboxControllerApi#create_inbox_ruleset) | **POST** /inboxes/{inboxId}/rulesets | Create an inbox ruleset +[**create_inbox_with_defaults**](InboxControllerApi#create_inbox_with_defaults) | **POST** /inboxes/withDefaults | Create an inbox with default options. Uses MailSlurp domain pool address and is private. +[**create_inbox_with_options**](InboxControllerApi#create_inbox_with_options) | **POST** /inboxes/withOptions | Create an inbox with options. Extended options for inbox creation. +[**delete_all_inbox_emails**](InboxControllerApi#delete_all_inbox_emails) | **DELETE** /inboxes/{inboxId}/deleteAllInboxEmails | Delete all emails in a given inboxes. +[**delete_all_inboxes**](InboxControllerApi#delete_all_inboxes) | **DELETE** /inboxes | Delete all inboxes +[**delete_inbox**](InboxControllerApi#delete_inbox) | **DELETE** /inboxes/{inboxId} | Delete inbox +[**does_inbox_exist**](InboxControllerApi#does_inbox_exist) | **GET** /inboxes/exists | Does inbox exist +[**flush_expired**](InboxControllerApi#flush_expired) | **DELETE** /inboxes/expired | Remove expired inboxes +[**get_all_inboxes**](InboxControllerApi#get_all_inboxes) | **GET** /inboxes/paginated | List All Inboxes Paginated +[**get_delivery_statuses_by_inbox_id**](InboxControllerApi#get_delivery_statuses_by_inbox_id) | **GET** /inboxes/{inboxId}/delivery-status | +[**get_emails**](InboxControllerApi#get_emails) | **GET** /inboxes/{inboxId}/emails | Get emails in an Inbox. This method is not idempotent as it allows retries and waits if you want certain conditions to be met before returning. For simple listing and sorting of known emails use the email controller instead. +[**get_imap_smtp_access**](InboxControllerApi#get_imap_smtp_access) | **GET** /inboxes/imap-smtp-access | +[**get_inbox**](InboxControllerApi#get_inbox) | **GET** /inboxes/{inboxId} | Get Inbox. Returns properties of an inbox. +[**get_inbox_by_email_address**](InboxControllerApi#get_inbox_by_email_address) | **GET** /inboxes/byEmailAddress | Search for an inbox with the provided email address +[**get_inbox_by_name**](InboxControllerApi#get_inbox_by_name) | **GET** /inboxes/byName | Search for an inbox with the given name +[**get_inbox_count**](InboxControllerApi#get_inbox_count) | **GET** /inboxes/count | Get total inbox count +[**get_inbox_email_count**](InboxControllerApi#get_inbox_email_count) | **GET** /inboxes/{inboxId}/emails/count | Get email count in inbox +[**get_inbox_emails_paginated**](InboxControllerApi#get_inbox_emails_paginated) | **GET** /inboxes/{inboxId}/emails/paginated | Get inbox emails paginated +[**get_inbox_ids**](InboxControllerApi#get_inbox_ids) | **GET** /inboxes/ids | Get all inbox IDs +[**get_inbox_sent_emails**](InboxControllerApi#get_inbox_sent_emails) | **GET** /inboxes/{inboxId}/sent | Get Inbox Sent Emails +[**get_inbox_tags**](InboxControllerApi#get_inbox_tags) | **GET** /inboxes/tags | Get inbox tags +[**get_inboxes**](InboxControllerApi#get_inboxes) | **GET** /inboxes | List Inboxes and email addresses +[**get_latest_email_in_inbox**](InboxControllerApi#get_latest_email_in_inbox) | **GET** /inboxes/getLatestEmail | Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. +[**get_organization_inboxes**](InboxControllerApi#get_organization_inboxes) | **GET** /inboxes/organization | List Organization Inboxes Paginated +[**list_inbox_rulesets**](InboxControllerApi#list_inbox_rulesets) | **GET** /inboxes/{inboxId}/rulesets | List inbox rulesets +[**list_inbox_tracking_pixels**](InboxControllerApi#list_inbox_tracking_pixels) | **GET** /inboxes/{inboxId}/tracking-pixels | List inbox tracking pixels +[**send_email**](InboxControllerApi#send_email) | **POST** /inboxes/{inboxId} | Send Email +[**send_email_and_confirm**](InboxControllerApi#send_email_and_confirm) | **POST** /inboxes/{inboxId}/confirm | Send email and return sent confirmation +[**send_email_with_queue**](InboxControllerApi#send_email_with_queue) | **POST** /inboxes/{inboxId}/with-queue | Send email with queue +[**send_smtp_envelope**](InboxControllerApi#send_smtp_envelope) | **POST** /inboxes/{inboxId}/smtp-envelope | Send email using an SMTP mail envelope and message body and return sent confirmation +[**send_test_email**](InboxControllerApi#send_test_email) | **POST** /inboxes/{inboxId}/send-test-email | Send a test email to inbox +[**set_inbox_favourited**](InboxControllerApi#set_inbox_favourited) | **PUT** /inboxes/{inboxId}/favourite | Set inbox favourited state +[**update_inbox**](InboxControllerApi#update_inbox) | **PATCH** /inboxes/{inboxId} | Update Inbox. Change name and description. Email address is not editable. + + +# **create_inbox** +> InboxDto create_inbox(email_address=email_address, tags=tags, name=name, description=description, use_domain_pool=use_domain_pool, favourite=favourite, expires_at=expires_at, expires_in=expires_in, allow_team_access=allow_team_access, inbox_type=inbox_type, virtual_inbox=virtual_inbox) + +Create an inbox email address. An inbox has a real email address and can send and receive emails. Inboxes can be either `SMTP` or `HTTP` inboxes. + +Create a new inbox and with a randomized email address to send and receive from. Pass emailAddress parameter if you wish to use a specific email address. Creating an inbox is required before sending or receiving emails. If writing tests it is recommended that you create a new inbox during each test method so that it is unique and empty. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + email_address = 'email_address_example' # str | A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as `123@mailslurp.com`. If you use the `useDomainPool` option when the email address is null it will generate an email address with a more varied domain ending such as `123@mailslurp.info` or `123@mailslurp.biz`. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Note domain types must match the inbox type - so `SMTP` inboxes will only work with `SMTP` type domains. Avoid `SMTP` inboxes if you need to send emails as they can only receive. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. (optional) +tags = ['tags_example'] # list[str] | Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. (optional) +name = 'name_example' # str | Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails. (optional) +description = 'description_example' # str | Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with (optional) +use_domain_pool = True # bool | Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default `@mailslurp.com` email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in `@mailslurp.{world,info,xyz,...}` . This means a TLD is randomly selecting from a list of `.biz`, `.info`, `.xyz` etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of `@mailslurp.com` or custom email address provided by the emailAddress field. Note this feature is only available for `HTTP` inbox types. (optional) +favourite = True # bool | Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering (optional) +expires_at = '2013-10-20T19:20:30+01:00' # datetime | Optional inbox expiration date. If null then this inbox is permanent and the emails in it won't be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX. (optional) +expires_in = 56 # int | Number of milliseconds that inbox should exist for (optional) +allow_team_access = True # bool | DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization. (optional) +inbox_type = 'inbox_type_example' # str | HTTP (default) or SMTP inbox type. HTTP inboxes are default and best solution for most cases. SMTP inboxes are more reliable for public inbound email consumption (but do not support sending emails). When using custom domains the domain type must match the inbox type. HTTP inboxes are processed by AWS SES while SMTP inboxes use a custom mail server running at `mx.mailslurp.com`. (optional) +virtual_inbox = True # bool | Virtual inbox prevents any outbound emails from being sent. It creates sent email records but will never send real emails to recipients. Great for testing and faking email sending. (optional) + + try: + # Create an inbox email address. An inbox has a real email address and can send and receive emails. Inboxes can be either `SMTP` or `HTTP` inboxes. + api_response = api_instance.create_inbox(email_address=email_address, tags=tags, name=name, description=description, use_domain_pool=use_domain_pool, favourite=favourite, expires_at=expires_at, expires_in=expires_in, allow_team_access=allow_team_access, inbox_type=inbox_type, virtual_inbox=virtual_inbox) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxControllerApi->create_inbox: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email_address** | **str**| A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as `123@mailslurp.com`. If you use the `useDomainPool` option when the email address is null it will generate an email address with a more varied domain ending such as `123@mailslurp.info` or `123@mailslurp.biz`. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Note domain types must match the inbox type - so `SMTP` inboxes will only work with `SMTP` type domains. Avoid `SMTP` inboxes if you need to send emails as they can only receive. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. | [optional] + **tags** | [**list[str]**](str)| Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. | [optional] + **name** | **str**| Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails. | [optional] + **description** | **str**| Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with | [optional] + **use_domain_pool** | **bool**| Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default `@mailslurp.com` email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in `@mailslurp.{world,info,xyz,...}` . This means a TLD is randomly selecting from a list of `.biz`, `.info`, `.xyz` etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of `@mailslurp.com` or custom email address provided by the emailAddress field. Note this feature is only available for `HTTP` inbox types. | [optional] + **favourite** | **bool**| Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering | [optional] + **expires_at** | **datetime**| Optional inbox expiration date. If null then this inbox is permanent and the emails in it won't be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX. | [optional] + **expires_in** | **int**| Number of milliseconds that inbox should exist for | [optional] + **allow_team_access** | **bool**| DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization. | [optional] + **inbox_type** | **str**| HTTP (default) or SMTP inbox type. HTTP inboxes are default and best solution for most cases. SMTP inboxes are more reliable for public inbound email consumption (but do not support sending emails). When using custom domains the domain type must match the inbox type. HTTP inboxes are processed by AWS SES while SMTP inboxes use a custom mail server running at `mx.mailslurp.com`. | [optional] + **virtual_inbox** | **bool**| Virtual inbox prevents any outbound emails from being sent. It creates sent email records but will never send real emails to recipients. Great for testing and faking email sending. | [optional] + +### Return type + +[**InboxDto**](InboxDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **create_inbox_ruleset** +> InboxRulesetDto create_inbox_ruleset(inbox_id, create_inbox_ruleset_options) + +Create an inbox ruleset + +Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | inboxId +create_inbox_ruleset_options = mailslurp_client.CreateInboxRulesetOptions() # CreateInboxRulesetOptions | + + try: + # Create an inbox ruleset + api_response = api_instance.create_inbox_ruleset(inbox_id, create_inbox_ruleset_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxControllerApi->create_inbox_ruleset: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| inboxId | + **create_inbox_ruleset_options** | [**CreateInboxRulesetOptions**](CreateInboxRulesetOptions)| | + +### Return type + +[**InboxRulesetDto**](InboxRulesetDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **create_inbox_with_defaults** +> InboxDto create_inbox_with_defaults() + +Create an inbox with default options. Uses MailSlurp domain pool address and is private. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + + try: + # Create an inbox with default options. Uses MailSlurp domain pool address and is private. + api_response = api_instance.create_inbox_with_defaults() + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxControllerApi->create_inbox_with_defaults: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**InboxDto**](InboxDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **create_inbox_with_options** +> InboxDto create_inbox_with_options(create_inbox_dto) + +Create an inbox with options. Extended options for inbox creation. + +Additional endpoint that allows inbox creation with request body options. Can be more flexible that other methods for some clients. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + create_inbox_dto = mailslurp_client.CreateInboxDto() # CreateInboxDto | + + try: + # Create an inbox with options. Extended options for inbox creation. + api_response = api_instance.create_inbox_with_options(create_inbox_dto) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxControllerApi->create_inbox_with_options: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_inbox_dto** | [**CreateInboxDto**](CreateInboxDto)| | + +### Return type + +[**InboxDto**](InboxDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **delete_all_inbox_emails** +> delete_all_inbox_emails(inbox_id) + +Delete all emails in a given inboxes. + +Deletes all emails in an inbox. Be careful as emails cannot be recovered + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | + + try: + # Delete all emails in a given inboxes. + api_instance.delete_all_inbox_emails(inbox_id) + except ApiException as e: + print("Exception when calling InboxControllerApi->delete_all_inbox_emails: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **delete_all_inboxes** +> delete_all_inboxes() + +Delete all inboxes + +Permanently delete all inboxes and associated email addresses. This will also delete all emails within the inboxes. Be careful as inboxes cannot be recovered once deleted. Note: deleting inboxes will not impact your usage limits. Monthly inbox creation limits are based on how many inboxes were created in the last 30 days, not how many inboxes you currently have. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + + try: + # Delete all inboxes + api_instance.delete_all_inboxes() + except ApiException as e: + print("Exception when calling InboxControllerApi->delete_all_inboxes: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **delete_inbox** +> delete_inbox(inbox_id) + +Delete inbox + +Permanently delete an inbox and associated email address as well as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | + + try: + # Delete inbox + api_instance.delete_inbox(inbox_id) + except ApiException as e: + print("Exception when calling InboxControllerApi->delete_inbox: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **does_inbox_exist** +> InboxExistsDto does_inbox_exist(email_address) + +Does inbox exist + +Check if inboxes exist by email address. Useful if you are sending emails to mailslurp addresses + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + email_address = 'email_address_example' # str | Email address + + try: + # Does inbox exist + api_response = api_instance.does_inbox_exist(email_address) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxControllerApi->does_inbox_exist: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email_address** | **str**| Email address | + +### Return type + +[**InboxExistsDto**](InboxExistsDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **flush_expired** +> FlushExpiredInboxesResult flush_expired(before=before) + +Remove expired inboxes + +Remove any expired inboxes for your account (instead of waiting for scheduled removal on server) + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + before = '2013-10-20T19:20:30+01:00' # datetime | Optional expired at before flag to flush expired inboxes that have expired before the given time (optional) + + try: + # Remove expired inboxes + api_response = api_instance.flush_expired(before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxControllerApi->flush_expired: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **before** | **datetime**| Optional expired at before flag to flush expired inboxes that have expired before the given time | [optional] + +### Return type + +[**FlushExpiredInboxesResult**](FlushExpiredInboxesResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_all_inboxes** +> PageInboxProjection get_all_inboxes(page=page, size=size, sort=sort, favourite=favourite, search=search, tag=tag, team_access=team_access, since=since, before=before, inbox_type=inbox_type, domain_id=domain_id) + +List All Inboxes Paginated + +List inboxes in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + page = 0 # int | Optional page index in list pagination (optional) (default to 0) +size = 20 # int | Optional page size in list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +favourite = False # bool | Optionally filter results for favourites only (optional) (default to False) +search = 'search_example' # str | Optionally filter by search words partial matching ID, tags, name, and email address (optional) +tag = 'tag_example' # str | Optionally filter by tags. Will return inboxes that include given tags (optional) +team_access = True # bool | DEPRECATED. Optionally filter by team access. (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Optional filter by created after given date time (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Optional filter by created before given date time (optional) +inbox_type = 'inbox_type_example' # str | Optional filter by inbox type (optional) +domain_id = 'domain_id_example' # str | Optional domain ID filter (optional) + + try: + # List All Inboxes Paginated + api_response = api_instance.get_all_inboxes(page=page, size=size, sort=sort, favourite=favourite, search=search, tag=tag, team_access=team_access, since=since, before=before, inbox_type=inbox_type, domain_id=domain_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxControllerApi->get_all_inboxes: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Optional page index in list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **favourite** | **bool**| Optionally filter results for favourites only | [optional] [default to False] + **search** | **str**| Optionally filter by search words partial matching ID, tags, name, and email address | [optional] + **tag** | **str**| Optionally filter by tags. Will return inboxes that include given tags | [optional] + **team_access** | **bool**| DEPRECATED. Optionally filter by team access. | [optional] + **since** | **datetime**| Optional filter by created after given date time | [optional] + **before** | **datetime**| Optional filter by created before given date time | [optional] + **inbox_type** | **str**| Optional filter by inbox type | [optional] + **domain_id** | [**str**]()| Optional domain ID filter | [optional] + +### Return type + +[**PageInboxProjection**](PageInboxProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_delivery_statuses_by_inbox_id** +> PageDeliveryStatus get_delivery_statuses_by_inbox_id(inbox_id, page=page, size=size, sort=sort, since=since, before=before) + + + +Get all email delivery statuses for an inbox + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | +page = 0 # int | Optional page index in delivery status list pagination (optional) (default to 0) +size = 20 # int | Optional page size in delivery status list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) + + try: + api_response = api_instance.get_delivery_statuses_by_inbox_id(inbox_id, page=page, size=size, sort=sort, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxControllerApi->get_delivery_statuses_by_inbox_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| | + **page** | **int**| Optional page index in delivery status list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in delivery status list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + +### Return type + +[**PageDeliveryStatus**](PageDeliveryStatus) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_emails** +> list[EmailPreview] get_emails(inbox_id, size=size, limit=limit, sort=sort, retry_timeout=retry_timeout, delay_timeout=delay_timeout, min_count=min_count, unread_only=unread_only, before=before, since=since) + +Get emails in an Inbox. This method is not idempotent as it allows retries and waits if you want certain conditions to be met before returning. For simple listing and sorting of known emails use the email controller instead. + +List emails that an inbox has received. Only emails that are sent to the inbox's email address will appear in the inbox. It may take several seconds for any email you send to an inbox's email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the `minCount` parameter. The server will retry the inbox database until the `minCount` is satisfied or the `retryTimeout` is reached + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | Id of inbox that emails belongs to +size = 56 # int | Alias for limit. Assessed first before assessing any passed limit. (optional) +limit = 56 # int | Limit the result set, ordered by received date time sort direction. Maximum 100. For more listing options see the email controller (optional) +sort = 'sort_example' # str | Sort the results by received date and direction ASC or DESC (optional) +retry_timeout = 56 # int | Maximum milliseconds to spend retrying inbox database until minCount emails are returned (optional) +delay_timeout = 56 # int | (optional) +min_count = 56 # int | Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached. (optional) +unread_only = True # bool | (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Exclude emails received after this ISO 8601 date time (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Exclude emails received before this ISO 8601 date time (optional) + + try: + # Get emails in an Inbox. This method is not idempotent as it allows retries and waits if you want certain conditions to be met before returning. For simple listing and sorting of known emails use the email controller instead. + api_response = api_instance.get_emails(inbox_id, size=size, limit=limit, sort=sort, retry_timeout=retry_timeout, delay_timeout=delay_timeout, min_count=min_count, unread_only=unread_only, before=before, since=since) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxControllerApi->get_emails: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| Id of inbox that emails belongs to | + **size** | **int**| Alias for limit. Assessed first before assessing any passed limit. | [optional] + **limit** | **int**| Limit the result set, ordered by received date time sort direction. Maximum 100. For more listing options see the email controller | [optional] + **sort** | **str**| Sort the results by received date and direction ASC or DESC | [optional] + **retry_timeout** | **int**| Maximum milliseconds to spend retrying inbox database until minCount emails are returned | [optional] + **delay_timeout** | **int**| | [optional] + **min_count** | **int**| Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached. | [optional] + **unread_only** | **bool**| | [optional] + **before** | **datetime**| Exclude emails received after this ISO 8601 date time | [optional] + **since** | **datetime**| Exclude emails received before this ISO 8601 date time | [optional] + +### Return type + +[**list[EmailPreview]**](EmailPreview) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_imap_smtp_access** +> ImapSmtpAccessDetails get_imap_smtp_access(inbox_id=inbox_id) + + + +Get IMAP and SMTP access usernames and passwords + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | Inbox ID (optional) + + try: + api_response = api_instance.get_imap_smtp_access(inbox_id=inbox_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxControllerApi->get_imap_smtp_access: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| Inbox ID | [optional] + +### Return type + +[**ImapSmtpAccessDetails**](ImapSmtpAccessDetails) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_inbox** +> InboxDto get_inbox(inbox_id) + +Get Inbox. Returns properties of an inbox. + +Returns an inbox's properties, including its email address and ID. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | + + try: + # Get Inbox. Returns properties of an inbox. + api_response = api_instance.get_inbox(inbox_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxControllerApi->get_inbox: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| | + +### Return type + +[**InboxDto**](InboxDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_inbox_by_email_address** +> InboxByEmailAddressResult get_inbox_by_email_address(email_address) + +Search for an inbox with the provided email address + +Get a inbox result by email address + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + email_address = 'email_address_example' # str | + + try: + # Search for an inbox with the provided email address + api_response = api_instance.get_inbox_by_email_address(email_address) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxControllerApi->get_inbox_by_email_address: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email_address** | **str**| | + +### Return type + +[**InboxByEmailAddressResult**](InboxByEmailAddressResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_inbox_by_name** +> InboxByNameResult get_inbox_by_name(name) + +Search for an inbox with the given name + +Get a inbox result by name + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + name = 'name_example' # str | + + try: + # Search for an inbox with the given name + api_response = api_instance.get_inbox_by_name(name) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxControllerApi->get_inbox_by_name: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| | + +### Return type + +[**InboxByNameResult**](InboxByNameResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_inbox_count** +> CountDto get_inbox_count() + +Get total inbox count + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + + try: + # Get total inbox count + api_response = api_instance.get_inbox_count() + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxControllerApi->get_inbox_count: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**CountDto**](CountDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_inbox_email_count** +> CountDto get_inbox_email_count(inbox_id) + +Get email count in inbox + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | Id of inbox that emails belongs to + + try: + # Get email count in inbox + api_response = api_instance.get_inbox_email_count(inbox_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxControllerApi->get_inbox_email_count: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| Id of inbox that emails belongs to | + +### Return type + +[**CountDto**](CountDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_inbox_emails_paginated** +> PageEmailPreview get_inbox_emails_paginated(inbox_id, page=page, size=size, sort=sort, since=since, before=before) + +Get inbox emails paginated + +Get a paginated list of emails in an inbox. Does not hold connections open. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | Id of inbox that emails belongs to +page = 0 # int | Optional page index in inbox emails list pagination (optional) (default to 0) +size = 20 # int | Optional page size in inbox emails list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +since = '2013-10-20T19:20:30+01:00' # datetime | Optional filter by received after given date time (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Optional filter by received before given date time (optional) + + try: + # Get inbox emails paginated + api_response = api_instance.get_inbox_emails_paginated(inbox_id, page=page, size=size, sort=sort, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxControllerApi->get_inbox_emails_paginated: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| Id of inbox that emails belongs to | + **page** | **int**| Optional page index in inbox emails list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in inbox emails list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **since** | **datetime**| Optional filter by received after given date time | [optional] + **before** | **datetime**| Optional filter by received before given date time | [optional] + +### Return type + +[**PageEmailPreview**](PageEmailPreview) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_inbox_ids** +> InboxIdsResult get_inbox_ids() + +Get all inbox IDs + +Get list of inbox IDs + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + + try: + # Get all inbox IDs + api_response = api_instance.get_inbox_ids() + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxControllerApi->get_inbox_ids: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**InboxIdsResult**](InboxIdsResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_inbox_sent_emails** +> PageSentEmailProjection get_inbox_sent_emails(inbox_id, page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before) + +Get Inbox Sent Emails + +Returns an inbox's sent email receipts. Call individual sent email endpoints for more details. Note for privacy reasons the full body of sent emails is never stored. An MD5 hash hex is available for comparison instead. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | +page = 0 # int | Optional page index in inbox sent email list pagination (optional) (default to 0) +size = 20 # int | Optional page size in inbox sent email list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +search_filter = 'search_filter_example' # str | Optional sent email search (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Optional filter by sent after given date time (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Optional filter by sent before given date time (optional) + + try: + # Get Inbox Sent Emails + api_response = api_instance.get_inbox_sent_emails(inbox_id, page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxControllerApi->get_inbox_sent_emails: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| | + **page** | **int**| Optional page index in inbox sent email list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in inbox sent email list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **search_filter** | **str**| Optional sent email search | [optional] + **since** | **datetime**| Optional filter by sent after given date time | [optional] + **before** | **datetime**| Optional filter by sent before given date time | [optional] + +### Return type + +[**PageSentEmailProjection**](PageSentEmailProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_inbox_tags** +> list[str] get_inbox_tags() + +Get inbox tags + +Get all inbox tags + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + + try: + # Get inbox tags + api_response = api_instance.get_inbox_tags() + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxControllerApi->get_inbox_tags: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**list[str]** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_inboxes** +> list[InboxDto] get_inboxes(size=size, sort=sort, since=since, before=before) + +List Inboxes and email addresses + +List the inboxes you have created. Note use of the more advanced `getAllInboxes` is recommended and allows paginated access using a limit and sort parameter. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + size = 100 # int | Optional result size limit. Note an automatic limit of 100 results is applied. See the paginated `getAllEmails` for larger queries. (optional) (default to 100) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +since = '2013-10-20T19:20:30+01:00' # datetime | Optional filter by created after given date time (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Optional filter by created before given date time (optional) + + try: + # List Inboxes and email addresses + api_response = api_instance.get_inboxes(size=size, sort=sort, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxControllerApi->get_inboxes: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **size** | **int**| Optional result size limit. Note an automatic limit of 100 results is applied. See the paginated `getAllEmails` for larger queries. | [optional] [default to 100] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **since** | **datetime**| Optional filter by created after given date time | [optional] + **before** | **datetime**| Optional filter by created before given date time | [optional] + +### Return type + +[**list[InboxDto]**](InboxDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_latest_email_in_inbox** +> Email get_latest_email_in_inbox(inbox_id, timeout_millis) + +Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. + +Get the newest email in an inbox or wait for one to arrive + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | ID of the inbox you want to get the latest email from +timeout_millis = 56 # int | Timeout milliseconds to wait for latest email + + try: + # Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. + api_response = api_instance.get_latest_email_in_inbox(inbox_id, timeout_millis) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxControllerApi->get_latest_email_in_inbox: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| ID of the inbox you want to get the latest email from | + **timeout_millis** | **int**| Timeout milliseconds to wait for latest email | + +### Return type + +[**Email**](Email) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_organization_inboxes** +> PageOrganizationInboxProjection get_organization_inboxes(page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before) + +List Organization Inboxes Paginated + +List organization inboxes in paginated form. These are inboxes created with `allowTeamAccess` flag enabled. Organization inboxes are `readOnly` for non-admin users. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + page = 0 # int | Optional page index in list pagination (optional) (default to 0) +size = 20 # int | Optional page size in list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +search_filter = 'search_filter_example' # str | Optional search filter (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Optional filter by created after given date time (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Optional filter by created before given date time (optional) + + try: + # List Organization Inboxes Paginated + api_response = api_instance.get_organization_inboxes(page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxControllerApi->get_organization_inboxes: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Optional page index in list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **search_filter** | **str**| Optional search filter | [optional] + **since** | **datetime**| Optional filter by created after given date time | [optional] + **before** | **datetime**| Optional filter by created before given date time | [optional] + +### Return type + +[**PageOrganizationInboxProjection**](PageOrganizationInboxProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **list_inbox_rulesets** +> PageInboxRulesetDto list_inbox_rulesets(inbox_id, page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before) + +List inbox rulesets + +List all rulesets attached to an inbox + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | +page = 0 # int | Optional page index in inbox ruleset list pagination (optional) (default to 0) +size = 20 # int | Optional page size in inbox ruleset list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +search_filter = 'search_filter_example' # str | Optional search filter (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Optional filter by created after given date time (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Optional filter by created before given date time (optional) + + try: + # List inbox rulesets + api_response = api_instance.list_inbox_rulesets(inbox_id, page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxControllerApi->list_inbox_rulesets: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| | + **page** | **int**| Optional page index in inbox ruleset list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in inbox ruleset list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **search_filter** | **str**| Optional search filter | [optional] + **since** | **datetime**| Optional filter by created after given date time | [optional] + **before** | **datetime**| Optional filter by created before given date time | [optional] + +### Return type + +[**PageInboxRulesetDto**](PageInboxRulesetDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **list_inbox_tracking_pixels** +> PageTrackingPixelProjection list_inbox_tracking_pixels(inbox_id, page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before) + +List inbox tracking pixels + +List all tracking pixels sent from an inbox + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | +page = 0 # int | Optional page index in inbox tracking pixel list pagination (optional) (default to 0) +size = 20 # int | Optional page size in inbox tracking pixel list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +search_filter = 'search_filter_example' # str | Optional search filter (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Optional filter by created after given date time (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Optional filter by created before given date time (optional) + + try: + # List inbox tracking pixels + api_response = api_instance.list_inbox_tracking_pixels(inbox_id, page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxControllerApi->list_inbox_tracking_pixels: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| | + **page** | **int**| Optional page index in inbox tracking pixel list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in inbox tracking pixel list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **search_filter** | **str**| Optional search filter | [optional] + **since** | **datetime**| Optional filter by created after given date time | [optional] + **before** | **datetime**| Optional filter by created before given date time | [optional] + +### Return type + +[**PageTrackingPixelProjection**](PageTrackingPixelProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **send_email** +> send_email(inbox_id, send_email_options) + +Send Email + +Send an email from an inbox's email address. The request body should contain the `SendEmailOptions` that include recipients, attachments, body etc. See `SendEmailOptions` for all available properties. Note the `inboxId` refers to the inbox's id not the inbox's email address. See https://www.mailslurp.com/guides/ for more information on how to send emails. This method does not return a sent email entity due to legacy reasons. To send and get a sent email as returned response use the sister method `sendEmailAndConfirm`. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | ID of the inbox you want to send the email from +send_email_options = mailslurp_client.SendEmailOptions() # SendEmailOptions | + + try: + # Send Email + api_instance.send_email(inbox_id, send_email_options) + except ApiException as e: + print("Exception when calling InboxControllerApi->send_email: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| ID of the inbox you want to send the email from | + **send_email_options** | [**SendEmailOptions**](SendEmailOptions)| | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **send_email_and_confirm** +> SentEmailDto send_email_and_confirm(inbox_id, send_email_options) + +Send email and return sent confirmation + +Sister method for standard `sendEmail` method with the benefit of returning a `SentEmail` entity confirming the successful sending of the email with a link to the sent object created for it. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | ID of the inbox you want to send the email from +send_email_options = mailslurp_client.SendEmailOptions() # SendEmailOptions | + + try: + # Send email and return sent confirmation + api_response = api_instance.send_email_and_confirm(inbox_id, send_email_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxControllerApi->send_email_and_confirm: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| ID of the inbox you want to send the email from | + **send_email_options** | [**SendEmailOptions**](SendEmailOptions)| | + +### Return type + +[**SentEmailDto**](SentEmailDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **send_email_with_queue** +> send_email_with_queue(inbox_id, validate_before_enqueue, send_email_options) + +Send email with queue + +Send an email using a queue. Will place the email onto a queue that will then be processed and sent. Use this queue method to enable any failed email sending to be recovered. This will prevent lost emails when sending if your account encounters a block or payment issue. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | ID of the inbox you want to send the email from +validate_before_enqueue = True # bool | Validate before adding to queue +send_email_options = mailslurp_client.SendEmailOptions() # SendEmailOptions | + + try: + # Send email with queue + api_instance.send_email_with_queue(inbox_id, validate_before_enqueue, send_email_options) + except ApiException as e: + print("Exception when calling InboxControllerApi->send_email_with_queue: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| ID of the inbox you want to send the email from | + **validate_before_enqueue** | **bool**| Validate before adding to queue | + **send_email_options** | [**SendEmailOptions**](SendEmailOptions)| | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **send_smtp_envelope** +> SentEmailDto send_smtp_envelope(inbox_id, send_smtp_envelope_options) + +Send email using an SMTP mail envelope and message body and return sent confirmation + +Send email using an SMTP envelope containing RCPT TO, MAIL FROM, and a SMTP BODY. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | ID of the inbox you want to send the email from +send_smtp_envelope_options = mailslurp_client.SendSMTPEnvelopeOptions() # SendSMTPEnvelopeOptions | + + try: + # Send email using an SMTP mail envelope and message body and return sent confirmation + api_response = api_instance.send_smtp_envelope(inbox_id, send_smtp_envelope_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxControllerApi->send_smtp_envelope: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| ID of the inbox you want to send the email from | + **send_smtp_envelope_options** | [**SendSMTPEnvelopeOptions**](SendSMTPEnvelopeOptions)| | + +### Return type + +[**SentEmailDto**](SentEmailDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **send_test_email** +> send_test_email(inbox_id) + +Send a test email to inbox + +Send an inbox a test email to test email receiving is working + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | + + try: + # Send a test email to inbox + api_instance.send_test_email(inbox_id) + except ApiException as e: + print("Exception when calling InboxControllerApi->send_test_email: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **set_inbox_favourited** +> InboxDto set_inbox_favourited(inbox_id, set_inbox_favourited_options) + +Set inbox favourited state + +Set and return new favourite state for an inbox + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | ID of inbox to set favourite state +set_inbox_favourited_options = mailslurp_client.SetInboxFavouritedOptions() # SetInboxFavouritedOptions | + + try: + # Set inbox favourited state + api_response = api_instance.set_inbox_favourited(inbox_id, set_inbox_favourited_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxControllerApi->set_inbox_favourited: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| ID of inbox to set favourite state | + **set_inbox_favourited_options** | [**SetInboxFavouritedOptions**](SetInboxFavouritedOptions)| | + +### Return type + +[**InboxDto**](InboxDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **update_inbox** +> InboxDto update_inbox(inbox_id, update_inbox_options) + +Update Inbox. Change name and description. Email address is not editable. + +Update editable fields on an inbox + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | +update_inbox_options = mailslurp_client.UpdateInboxOptions() # UpdateInboxOptions | + + try: + # Update Inbox. Change name and description. Email address is not editable. + api_response = api_instance.update_inbox(inbox_id, update_inbox_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxControllerApi->update_inbox: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| | + **update_inbox_options** | [**UpdateInboxOptions**](UpdateInboxOptions)| | + +### Return type + +[**InboxDto**](InboxDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/InboxDto.md b/docs/InboxDto.md new file mode 100644 index 00000000..1c1f253b --- /dev/null +++ b/docs/InboxDto.md @@ -0,0 +1,23 @@ +# InboxDto + +Representation of a MailSlurp inbox. An inbox has an ID and a real email address. Emails can be sent to or from this email address. Inboxes are either `SMTP` or `HTTP` mailboxes. The default, `HTTP` inboxes, use AWS SES to process emails and are best suited as test email accounts and do not support IMAP or POP3. `SMTP` inboxes use a custom mail server at `mx.mailslurp.com` and support SMTP login, IMAP and POP3. Use the `EmailController` or the `InboxController` methods to send and receive emails and attachments. Inboxes may have a description, name, and tags for display purposes. You can also favourite an inbox for easier searching. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically. | +**user_id** | **str** | ID of user that inbox belongs to | [optional] +**created_at** | **datetime** | When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`. | +**name** | **str** | Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search | [optional] +**domain_id** | **str** | ID of custom domain used by the inbox if any | [optional] +**description** | **str** | Description of an inbox for labelling and searching purposes | [optional] +**email_address** | **str** | The inbox's email address. Inbox projections and previews may not include the email address. To view the email address fetch the inbox entity directly. Send an email to this address and the inbox will receive and store it for you. Note the email address in MailSlurp match characters exactly and are case sensitive so `+123` additions are considered different addresses. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. | +**expires_at** | **str** | Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email. | [optional] +**favourite** | **bool** | Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering | +**tags** | **list[str]** | Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. | [optional] +**inbox_type** | **str** | Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). | [optional] +**read_only** | **bool** | Is the inbox readOnly for the caller. Read only means can not be deleted or modified. This flag is present when using team accounts and shared inboxes. | +**virtual_inbox** | **bool** | Virtual inbox can receive email but will not send emails to real recipients. Will save sent email record but never send an actual email. Perfect for testing mail server actions. | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/InboxExistsDto.md b/docs/InboxExistsDto.md new file mode 100644 index 00000000..9fb3c793 --- /dev/null +++ b/docs/InboxExistsDto.md @@ -0,0 +1,11 @@ +# InboxExistsDto + +Result of email exists query +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**exists** | **bool** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/InboxForwarderControllerApi.md b/docs/InboxForwarderControllerApi.md new file mode 100644 index 00000000..991befbc --- /dev/null +++ b/docs/InboxForwarderControllerApi.md @@ -0,0 +1,648 @@ +# mailslurp_client.InboxForwarderControllerApi + +All URIs are relative to *https://python.api.mailslurp.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_new_inbox_forwarder**](InboxForwarderControllerApi#create_new_inbox_forwarder) | **POST** /forwarders | Create an inbox forwarder +[**delete_inbox_forwarder**](InboxForwarderControllerApi#delete_inbox_forwarder) | **DELETE** /forwarders/{id} | Delete an inbox forwarder +[**delete_inbox_forwarders**](InboxForwarderControllerApi#delete_inbox_forwarders) | **DELETE** /forwarders | Delete inbox forwarders +[**get_inbox_forwarder**](InboxForwarderControllerApi#get_inbox_forwarder) | **GET** /forwarders/{id} | Get an inbox forwarder +[**get_inbox_forwarders**](InboxForwarderControllerApi#get_inbox_forwarders) | **GET** /forwarders | List inbox forwarders +[**test_inbox_forwarder**](InboxForwarderControllerApi#test_inbox_forwarder) | **POST** /forwarders/{id}/test | Test an inbox forwarder +[**test_inbox_forwarders_for_inbox**](InboxForwarderControllerApi#test_inbox_forwarders_for_inbox) | **PUT** /forwarders | Test inbox forwarders for inbox +[**test_new_inbox_forwarder**](InboxForwarderControllerApi#test_new_inbox_forwarder) | **PATCH** /forwarders | Test new inbox forwarder + + +# **create_new_inbox_forwarder** +> InboxForwarderDto create_new_inbox_forwarder(inbox_id, create_inbox_forwarder_options) + +Create an inbox forwarder + +Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxForwarderControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | Inbox id to attach forwarder to +create_inbox_forwarder_options = mailslurp_client.CreateInboxForwarderOptions() # CreateInboxForwarderOptions | + + try: + # Create an inbox forwarder + api_response = api_instance.create_new_inbox_forwarder(inbox_id, create_inbox_forwarder_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxForwarderControllerApi->create_new_inbox_forwarder: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| Inbox id to attach forwarder to | + **create_inbox_forwarder_options** | [**CreateInboxForwarderOptions**](CreateInboxForwarderOptions)| | + +### Return type + +[**InboxForwarderDto**](InboxForwarderDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **delete_inbox_forwarder** +> delete_inbox_forwarder(id) + +Delete an inbox forwarder + +Delete inbox forwarder + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxForwarderControllerApi(api_client) + id = 'id_example' # str | ID of inbox forwarder + + try: + # Delete an inbox forwarder + api_instance.delete_inbox_forwarder(id) + except ApiException as e: + print("Exception when calling InboxForwarderControllerApi->delete_inbox_forwarder: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | [**str**]()| ID of inbox forwarder | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **delete_inbox_forwarders** +> delete_inbox_forwarders(inbox_id=inbox_id) + +Delete inbox forwarders + +Delete inbox forwarders. Accepts optional inboxId filter. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxForwarderControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | Optional inbox id to attach forwarder to (optional) + + try: + # Delete inbox forwarders + api_instance.delete_inbox_forwarders(inbox_id=inbox_id) + except ApiException as e: + print("Exception when calling InboxForwarderControllerApi->delete_inbox_forwarders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| Optional inbox id to attach forwarder to | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_inbox_forwarder** +> InboxForwarderDto get_inbox_forwarder(id) + +Get an inbox forwarder + +Get inbox ruleset + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxForwarderControllerApi(api_client) + id = 'id_example' # str | ID of inbox forwarder + + try: + # Get an inbox forwarder + api_response = api_instance.get_inbox_forwarder(id) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxForwarderControllerApi->get_inbox_forwarder: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | [**str**]()| ID of inbox forwarder | + +### Return type + +[**InboxForwarderDto**](InboxForwarderDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_inbox_forwarders** +> PageInboxForwarderDto get_inbox_forwarders(inbox_id=inbox_id, page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before) + +List inbox forwarders + +List all forwarders attached to an inbox + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxForwarderControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | Optional inbox id to get forwarders from (optional) +page = 0 # int | Optional page index in inbox forwarder list pagination (optional) (default to 0) +size = 20 # int | Optional page size in inbox forwarder list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +search_filter = 'search_filter_example' # str | Optional search filter (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) + + try: + # List inbox forwarders + api_response = api_instance.get_inbox_forwarders(inbox_id=inbox_id, page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxForwarderControllerApi->get_inbox_forwarders: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| Optional inbox id to get forwarders from | [optional] + **page** | **int**| Optional page index in inbox forwarder list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in inbox forwarder list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **search_filter** | **str**| Optional search filter | [optional] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + +### Return type + +[**PageInboxForwarderDto**](PageInboxForwarderDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **test_inbox_forwarder** +> InboxForwarderTestResult test_inbox_forwarder(id, inbox_forwarder_test_options) + +Test an inbox forwarder + +Test an inbox forwarder + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxForwarderControllerApi(api_client) + id = 'id_example' # str | ID of inbox forwarder +inbox_forwarder_test_options = mailslurp_client.InboxForwarderTestOptions() # InboxForwarderTestOptions | + + try: + # Test an inbox forwarder + api_response = api_instance.test_inbox_forwarder(id, inbox_forwarder_test_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxForwarderControllerApi->test_inbox_forwarder: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | [**str**]()| ID of inbox forwarder | + **inbox_forwarder_test_options** | [**InboxForwarderTestOptions**](InboxForwarderTestOptions)| | + +### Return type + +[**InboxForwarderTestResult**](InboxForwarderTestResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **test_inbox_forwarders_for_inbox** +> InboxForwarderTestResult test_inbox_forwarders_for_inbox(inbox_id, inbox_forwarder_test_options) + +Test inbox forwarders for inbox + +Test inbox forwarders for inbox + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxForwarderControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | ID of inbox +inbox_forwarder_test_options = mailslurp_client.InboxForwarderTestOptions() # InboxForwarderTestOptions | + + try: + # Test inbox forwarders for inbox + api_response = api_instance.test_inbox_forwarders_for_inbox(inbox_id, inbox_forwarder_test_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxForwarderControllerApi->test_inbox_forwarders_for_inbox: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| ID of inbox | + **inbox_forwarder_test_options** | [**InboxForwarderTestOptions**](InboxForwarderTestOptions)| | + +### Return type + +[**InboxForwarderTestResult**](InboxForwarderTestResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **test_new_inbox_forwarder** +> InboxForwarderTestResult test_new_inbox_forwarder(test_new_inbox_forwarder_options) + +Test new inbox forwarder + +Test new inbox forwarder + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxForwarderControllerApi(api_client) + test_new_inbox_forwarder_options = mailslurp_client.TestNewInboxForwarderOptions() # TestNewInboxForwarderOptions | + + try: + # Test new inbox forwarder + api_response = api_instance.test_new_inbox_forwarder(test_new_inbox_forwarder_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxForwarderControllerApi->test_new_inbox_forwarder: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_new_inbox_forwarder_options** | [**TestNewInboxForwarderOptions**](TestNewInboxForwarderOptions)| | + +### Return type + +[**InboxForwarderTestResult**](InboxForwarderTestResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/InboxForwarderDto.md b/docs/InboxForwarderDto.md new file mode 100644 index 00000000..3aba2007 --- /dev/null +++ b/docs/InboxForwarderDto.md @@ -0,0 +1,16 @@ +# InboxForwarderDto + +Inbox forwarder +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**inbox_id** | **str** | | +**field** | **str** | | +**match** | **str** | | +**forward_to_recipients** | **list[str]** | | +**created_at** | **datetime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/InboxForwarderTestOptions.md b/docs/InboxForwarderTestOptions.md new file mode 100644 index 00000000..5e1f2446 --- /dev/null +++ b/docs/InboxForwarderTestOptions.md @@ -0,0 +1,11 @@ +# InboxForwarderTestOptions + +Options for testing an inbox forwarder against a value +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**test_value** | **str** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/InboxForwarderTestResult.md b/docs/InboxForwarderTestResult.md new file mode 100644 index 00000000..db84de2d --- /dev/null +++ b/docs/InboxForwarderTestResult.md @@ -0,0 +1,12 @@ +# InboxForwarderTestResult + +Results of inbox forwarder test +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**matches** | **dict(str, bool)** | | +**does_match** | **bool** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/InboxIdItem.md b/docs/InboxIdItem.md new file mode 100644 index 00000000..7efb5d0e --- /dev/null +++ b/docs/InboxIdItem.md @@ -0,0 +1,12 @@ +# InboxIdItem + +Inbox ID and email address pair +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**email_address** | **str** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/InboxIdsResult.md b/docs/InboxIdsResult.md new file mode 100644 index 00000000..873d74f1 --- /dev/null +++ b/docs/InboxIdsResult.md @@ -0,0 +1,11 @@ +# InboxIdsResult + +List of inbox IDs and email addresses +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inbox_ids** | [**list[InboxIdItem]**](InboxIdItem) | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/InboxPreview.md b/docs/InboxPreview.md new file mode 100644 index 00000000..1b28bbd6 --- /dev/null +++ b/docs/InboxPreview.md @@ -0,0 +1,21 @@ +# InboxPreview + +Inbox data +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically. | +**domain_id** | **str** | ID of custom domain used by the inbox if any | [optional] +**email_address** | **str** | The inbox's email address. Inbox projections and previews may not include the email address. To view the email address fetch the inbox entity directly. Send an email to this address and the inbox will receive and store it for you. Note the email address in MailSlurp match characters exactly and are case sensitive so `+123` additions are considered different addresses. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. | [optional] +**created_at** | **datetime** | When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`. | +**favourite** | **bool** | Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering | +**name** | **str** | Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search | [optional] +**tags** | **list[str]** | Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. | [optional] +**team_access** | **bool** | Does inbox permit team access for organization team members. If so team users can use inbox and emails associated with it. See the team access guide at https://www.mailslurp.com/guides/team-email-account-sharing/ | +**inbox_type** | **str** | Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). | [optional] +**virtual_inbox** | **bool** | Virtual inbox can receive email but will not send emails to real recipients. Will save sent email record but never send an actual email. Perfect for testing mail server actions. | +**expires_at** | **str** | Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email. | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/InboxRulesetControllerApi.md b/docs/InboxRulesetControllerApi.md new file mode 100644 index 00000000..f17cbbcb --- /dev/null +++ b/docs/InboxRulesetControllerApi.md @@ -0,0 +1,648 @@ +# mailslurp_client.InboxRulesetControllerApi + +All URIs are relative to *https://python.api.mailslurp.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_new_inbox_ruleset**](InboxRulesetControllerApi#create_new_inbox_ruleset) | **POST** /rulesets | Create an inbox ruleset +[**delete_inbox_ruleset**](InboxRulesetControllerApi#delete_inbox_ruleset) | **DELETE** /rulesets/{id} | Delete an inbox ruleset +[**delete_inbox_rulesets**](InboxRulesetControllerApi#delete_inbox_rulesets) | **DELETE** /rulesets | Delete inbox rulesets +[**get_inbox_ruleset**](InboxRulesetControllerApi#get_inbox_ruleset) | **GET** /rulesets/{id} | Get an inbox ruleset +[**get_inbox_rulesets**](InboxRulesetControllerApi#get_inbox_rulesets) | **GET** /rulesets | List inbox rulesets +[**test_inbox_ruleset**](InboxRulesetControllerApi#test_inbox_ruleset) | **POST** /rulesets/{id}/test | Test an inbox ruleset +[**test_inbox_rulesets_for_inbox**](InboxRulesetControllerApi#test_inbox_rulesets_for_inbox) | **PUT** /rulesets | Test inbox rulesets for inbox +[**test_new_inbox_ruleset**](InboxRulesetControllerApi#test_new_inbox_ruleset) | **PATCH** /rulesets | Test new inbox ruleset + + +# **create_new_inbox_ruleset** +> InboxRulesetDto create_new_inbox_ruleset(inbox_id, create_inbox_ruleset_options) + +Create an inbox ruleset + +Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxRulesetControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | Inbox id to attach ruleset to +create_inbox_ruleset_options = mailslurp_client.CreateInboxRulesetOptions() # CreateInboxRulesetOptions | + + try: + # Create an inbox ruleset + api_response = api_instance.create_new_inbox_ruleset(inbox_id, create_inbox_ruleset_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxRulesetControllerApi->create_new_inbox_ruleset: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| Inbox id to attach ruleset to | + **create_inbox_ruleset_options** | [**CreateInboxRulesetOptions**](CreateInboxRulesetOptions)| | + +### Return type + +[**InboxRulesetDto**](InboxRulesetDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **delete_inbox_ruleset** +> delete_inbox_ruleset(id) + +Delete an inbox ruleset + +Delete inbox ruleset + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxRulesetControllerApi(api_client) + id = 'id_example' # str | ID of inbox ruleset + + try: + # Delete an inbox ruleset + api_instance.delete_inbox_ruleset(id) + except ApiException as e: + print("Exception when calling InboxRulesetControllerApi->delete_inbox_ruleset: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | [**str**]()| ID of inbox ruleset | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **delete_inbox_rulesets** +> delete_inbox_rulesets(inbox_id=inbox_id) + +Delete inbox rulesets + +Delete inbox rulesets. Accepts optional inboxId filter. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxRulesetControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | Optional inbox id to attach ruleset to (optional) + + try: + # Delete inbox rulesets + api_instance.delete_inbox_rulesets(inbox_id=inbox_id) + except ApiException as e: + print("Exception when calling InboxRulesetControllerApi->delete_inbox_rulesets: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| Optional inbox id to attach ruleset to | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_inbox_ruleset** +> InboxRulesetDto get_inbox_ruleset(id) + +Get an inbox ruleset + +Get inbox ruleset + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxRulesetControllerApi(api_client) + id = 'id_example' # str | ID of inbox ruleset + + try: + # Get an inbox ruleset + api_response = api_instance.get_inbox_ruleset(id) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxRulesetControllerApi->get_inbox_ruleset: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | [**str**]()| ID of inbox ruleset | + +### Return type + +[**InboxRulesetDto**](InboxRulesetDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_inbox_rulesets** +> PageInboxRulesetDto get_inbox_rulesets(inbox_id=inbox_id, page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before) + +List inbox rulesets + +List all rulesets attached to an inbox + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxRulesetControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | Optional inbox id to get rulesets from (optional) +page = 0 # int | Optional page index in inbox ruleset list pagination (optional) (default to 0) +size = 20 # int | Optional page size in inbox ruleset list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +search_filter = 'search_filter_example' # str | Optional search filter (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) + + try: + # List inbox rulesets + api_response = api_instance.get_inbox_rulesets(inbox_id=inbox_id, page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxRulesetControllerApi->get_inbox_rulesets: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| Optional inbox id to get rulesets from | [optional] + **page** | **int**| Optional page index in inbox ruleset list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in inbox ruleset list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **search_filter** | **str**| Optional search filter | [optional] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + +### Return type + +[**PageInboxRulesetDto**](PageInboxRulesetDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **test_inbox_ruleset** +> InboxRulesetTestResult test_inbox_ruleset(id, inbox_ruleset_test_options) + +Test an inbox ruleset + +Test an inbox ruleset + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxRulesetControllerApi(api_client) + id = 'id_example' # str | ID of inbox ruleset +inbox_ruleset_test_options = mailslurp_client.InboxRulesetTestOptions() # InboxRulesetTestOptions | + + try: + # Test an inbox ruleset + api_response = api_instance.test_inbox_ruleset(id, inbox_ruleset_test_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxRulesetControllerApi->test_inbox_ruleset: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | [**str**]()| ID of inbox ruleset | + **inbox_ruleset_test_options** | [**InboxRulesetTestOptions**](InboxRulesetTestOptions)| | + +### Return type + +[**InboxRulesetTestResult**](InboxRulesetTestResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **test_inbox_rulesets_for_inbox** +> InboxRulesetTestResult test_inbox_rulesets_for_inbox(inbox_id, inbox_ruleset_test_options) + +Test inbox rulesets for inbox + +Test inbox rulesets for inbox + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxRulesetControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | ID of inbox +inbox_ruleset_test_options = mailslurp_client.InboxRulesetTestOptions() # InboxRulesetTestOptions | + + try: + # Test inbox rulesets for inbox + api_response = api_instance.test_inbox_rulesets_for_inbox(inbox_id, inbox_ruleset_test_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxRulesetControllerApi->test_inbox_rulesets_for_inbox: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| ID of inbox | + **inbox_ruleset_test_options** | [**InboxRulesetTestOptions**](InboxRulesetTestOptions)| | + +### Return type + +[**InboxRulesetTestResult**](InboxRulesetTestResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **test_new_inbox_ruleset** +> InboxRulesetTestResult test_new_inbox_ruleset(test_new_inbox_ruleset_options) + +Test new inbox ruleset + +Test new inbox ruleset + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.InboxRulesetControllerApi(api_client) + test_new_inbox_ruleset_options = mailslurp_client.TestNewInboxRulesetOptions() # TestNewInboxRulesetOptions | + + try: + # Test new inbox ruleset + api_response = api_instance.test_new_inbox_ruleset(test_new_inbox_ruleset_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling InboxRulesetControllerApi->test_new_inbox_ruleset: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **test_new_inbox_ruleset_options** | [**TestNewInboxRulesetOptions**](TestNewInboxRulesetOptions)| | + +### Return type + +[**InboxRulesetTestResult**](InboxRulesetTestResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/InboxRulesetDto.md b/docs/InboxRulesetDto.md new file mode 100644 index 00000000..6bf8f940 --- /dev/null +++ b/docs/InboxRulesetDto.md @@ -0,0 +1,17 @@ +# InboxRulesetDto + +Rules for inbox +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**inbox_id** | **str** | | +**scope** | **str** | | +**action** | **str** | | +**target** | **str** | | +**handler** | **str** | | +**created_at** | **datetime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/InboxRulesetTestOptions.md b/docs/InboxRulesetTestOptions.md new file mode 100644 index 00000000..048a724a --- /dev/null +++ b/docs/InboxRulesetTestOptions.md @@ -0,0 +1,11 @@ +# InboxRulesetTestOptions + +Test options for inbox ruleset +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**test_target** | **str** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/InboxRulesetTestResult.md b/docs/InboxRulesetTestResult.md new file mode 100644 index 00000000..5487e2ef --- /dev/null +++ b/docs/InboxRulesetTestResult.md @@ -0,0 +1,12 @@ +# InboxRulesetTestResult + +Result of test of inbox ruleset +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ruleset_matches** | **dict(str, bool)** | Map of inbox ruleset ID to boolean of if target matches | +**matches** | **bool** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/InlineObject.md b/docs/InlineObject.md new file mode 100644 index 00000000..d9d178fa --- /dev/null +++ b/docs/InlineObject.md @@ -0,0 +1,11 @@ +# InlineObject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content_type_header** | **str** | Optional content type header of attachment | [optional] +**file** | **file** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/InlineObject1.md b/docs/InlineObject1.md new file mode 100644 index 00000000..6ce0d9c4 --- /dev/null +++ b/docs/InlineObject1.md @@ -0,0 +1,18 @@ +# InlineObject1 + +Byte array request body +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**short** | **int** | | [optional] +**char** | **str** | | [optional] +**int** | **int** | | [optional] +**long** | **int** | | [optional] +**float** | **float** | | [optional] +**double** | **float** | | [optional] +**direct** | **bool** | | [optional] +**read_only** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/JSONSchemaDto.md b/docs/JSONSchemaDto.md new file mode 100644 index 00000000..d5e191b3 --- /dev/null +++ b/docs/JSONSchemaDto.md @@ -0,0 +1,11 @@ +# JSONSchemaDto + +JSONSchema for payload +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/MailServerControllerApi.md b/docs/MailServerControllerApi.md new file mode 100644 index 00000000..89471aca --- /dev/null +++ b/docs/MailServerControllerApi.md @@ -0,0 +1,312 @@ +# mailslurp_client.MailServerControllerApi + +All URIs are relative to *https://python.api.mailslurp.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**describe_mail_server_domain**](MailServerControllerApi#describe_mail_server_domain) | **POST** /mail-server/describe/domain | Get DNS Mail Server records for a domain +[**get_dns_lookup**](MailServerControllerApi#get_dns_lookup) | **POST** /mail-server/describe/dns-lookup | Lookup DNS records for a domain +[**get_ip_address**](MailServerControllerApi#get_ip_address) | **POST** /mail-server/describe/ip-address | Get IP address for a domain +[**verify_email_address**](MailServerControllerApi#verify_email_address) | **POST** /mail-server/verify/email-address | Deprecated. Use the EmailVerificationController methods for more accurate and reliable functionality. Verify the existence of an email address at a given mail server. + + +# **describe_mail_server_domain** +> DescribeMailServerDomainResult describe_mail_server_domain(describe_domain_options) + +Get DNS Mail Server records for a domain + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.MailServerControllerApi(api_client) + describe_domain_options = mailslurp_client.DescribeDomainOptions() # DescribeDomainOptions | + + try: + # Get DNS Mail Server records for a domain + api_response = api_instance.describe_mail_server_domain(describe_domain_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling MailServerControllerApi->describe_mail_server_domain: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **describe_domain_options** | [**DescribeDomainOptions**](DescribeDomainOptions)| | + +### Return type + +[**DescribeMailServerDomainResult**](DescribeMailServerDomainResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_dns_lookup** +> DNSLookupResults get_dns_lookup(dns_lookup_options) + +Lookup DNS records for a domain + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.MailServerControllerApi(api_client) + dns_lookup_options = mailslurp_client.DNSLookupOptions() # DNSLookupOptions | + + try: + # Lookup DNS records for a domain + api_response = api_instance.get_dns_lookup(dns_lookup_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling MailServerControllerApi->get_dns_lookup: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dns_lookup_options** | [**DNSLookupOptions**](DNSLookupOptions)| | + +### Return type + +[**DNSLookupResults**](DNSLookupResults) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_ip_address** +> IPAddressResult get_ip_address(name) + +Get IP address for a domain + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.MailServerControllerApi(api_client) + name = 'name_example' # str | + + try: + # Get IP address for a domain + api_response = api_instance.get_ip_address(name) + pprint(api_response) + except ApiException as e: + print("Exception when calling MailServerControllerApi->get_ip_address: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| | + +### Return type + +[**IPAddressResult**](IPAddressResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **verify_email_address** +> EmailVerificationResult verify_email_address(verify_email_address_options) + +Deprecated. Use the EmailVerificationController methods for more accurate and reliable functionality. Verify the existence of an email address at a given mail server. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.MailServerControllerApi(api_client) + verify_email_address_options = mailslurp_client.VerifyEmailAddressOptions() # VerifyEmailAddressOptions | + + try: + # Deprecated. Use the EmailVerificationController methods for more accurate and reliable functionality. Verify the existence of an email address at a given mail server. + api_response = api_instance.verify_email_address(verify_email_address_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling MailServerControllerApi->verify_email_address: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **verify_email_address_options** | [**VerifyEmailAddressOptions**](VerifyEmailAddressOptions)| | + +### Return type + +[**EmailVerificationResult**](EmailVerificationResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/MatchOption.md b/docs/MatchOption.md new file mode 100644 index 00000000..ec4ff90a --- /dev/null +++ b/docs/MatchOption.md @@ -0,0 +1,13 @@ +# MatchOption + +Options for matching emails in an inbox. Each match option object contains a `field`, `should` and `value` property. Together they form logical conditions such as `SUBJECT` should `CONTAIN` value. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**field** | **str** | Fields of an email object that can be used to filter results | +**should** | **str** | How the value of the email field specified should be compared to the value given in the match options. | +**value** | **str** | The value you wish to compare with the value of the field specified using the `should` value passed. For example `BODY` should `CONTAIN` a value passed. | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/MatchOptions.md b/docs/MatchOptions.md new file mode 100644 index 00000000..b8de68aa --- /dev/null +++ b/docs/MatchOptions.md @@ -0,0 +1,12 @@ +# MatchOptions + +Optional filter for matching emails based on fields. For instance filter results to only include emails whose `SUBJECT` value does `CONTAIN` given match value. An example payload would be `{ matches: [{ field: 'SUBJECT', should: 'CONTAIN', value: 'Welcome' }] }`. You can also pass conditions such as `HAS_ATTACHMENT`. If you wish to extract regex matches inside the email content see the `getEmailContentMatch` method in the EmailController. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**matches** | [**list[MatchOption]**](MatchOption) | Zero or more match options such as `{ field: 'SUBJECT', should: 'CONTAIN', value: 'Welcome' }`. Options are additive so if one does not match the email is excluded from results | [optional] +**conditions** | [**list[ConditionOption]**](ConditionOption) | Zero or more conditions such as `{ condition: 'HAS_ATTACHMENTS', value: 'TRUE' }`. Note the values are the strings `TRUE|FALSE` not booleans. | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/MissedEmail.md b/docs/MissedEmail.md new file mode 100644 index 00000000..bfbdddc6 --- /dev/null +++ b/docs/MissedEmail.md @@ -0,0 +1,26 @@ +# MissedEmail + +Missed email +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**user_id** | **str** | | [optional] +**subject** | **str** | | [optional] +**body_excerpt** | **str** | | [optional] +**attachment_count** | **int** | | +**_from** | **str** | | [optional] +**raw_url** | **str** | | [optional] +**raw_key** | **str** | | [optional] +**raw_bucket** | **str** | | [optional] +**can_restore** | **bool** | | [optional] +**to** | **list[str]** | | +**cc** | **list[str]** | | +**bcc** | **list[str]** | | +**inbox_ids** | **list[str]** | | +**created_at** | **datetime** | | +**updated_at** | **datetime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/MissedEmailControllerApi.md b/docs/MissedEmailControllerApi.md new file mode 100644 index 00000000..c9c1727e --- /dev/null +++ b/docs/MissedEmailControllerApi.md @@ -0,0 +1,423 @@ +# mailslurp_client.MissedEmailControllerApi + +All URIs are relative to *https://python.api.mailslurp.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_all_missed_emails**](MissedEmailControllerApi#get_all_missed_emails) | **GET** /missed-emails | Get all MissedEmails in paginated format +[**get_all_unknown_missed_emails**](MissedEmailControllerApi#get_all_unknown_missed_emails) | **GET** /missed-emails/unknown | Get all unknown missed emails in paginated format +[**get_missed_email**](MissedEmailControllerApi#get_missed_email) | **GET** /missed-emails/{missedEmailId} | Get MissedEmail +[**restore_missed_emails**](MissedEmailControllerApi#restore_missed_emails) | **POST** /missed-emails/restore | Restore missed emails +[**wait_for_nth_missed_email**](MissedEmailControllerApi#wait_for_nth_missed_email) | **GET** /missed-emails/waitForNthMissedEmail | Wait for Nth missed email + + +# **get_all_missed_emails** +> PageMissedEmailProjection get_all_missed_emails(page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before, inbox_id=inbox_id) + +Get all MissedEmails in paginated format + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.MissedEmailControllerApi(api_client) + page = 0 # int | Optional page index in list pagination (optional) (default to 0) +size = 20 # int | Optional page size in list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +search_filter = 'search_filter_example' # str | Optional search filter (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) +inbox_id = 'inbox_id_example' # str | Optional inbox ID filter (optional) + + try: + # Get all MissedEmails in paginated format + api_response = api_instance.get_all_missed_emails(page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before, inbox_id=inbox_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling MissedEmailControllerApi->get_all_missed_emails: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Optional page index in list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **search_filter** | **str**| Optional search filter | [optional] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + **inbox_id** | [**str**]()| Optional inbox ID filter | [optional] + +### Return type + +[**PageMissedEmailProjection**](PageMissedEmailProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_all_unknown_missed_emails** +> PageUnknownMissedEmailProjection get_all_unknown_missed_emails(page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before, inbox_id=inbox_id) + +Get all unknown missed emails in paginated format + +Unknown missed emails are emails that were sent to MailSlurp but could not be assigned to an existing inbox. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.MissedEmailControllerApi(api_client) + page = 0 # int | Optional page index in list pagination (optional) (default to 0) +size = 20 # int | Optional page size in list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +search_filter = 'search_filter_example' # str | Optional search filter (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) +inbox_id = 'inbox_id_example' # str | Optional inbox ID filter (optional) + + try: + # Get all unknown missed emails in paginated format + api_response = api_instance.get_all_unknown_missed_emails(page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before, inbox_id=inbox_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling MissedEmailControllerApi->get_all_unknown_missed_emails: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Optional page index in list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **search_filter** | **str**| Optional search filter | [optional] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + **inbox_id** | [**str**]()| Optional inbox ID filter | [optional] + +### Return type + +[**PageUnknownMissedEmailProjection**](PageUnknownMissedEmailProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_missed_email** +> MissedEmail get_missed_email(missed_email_id) + +Get MissedEmail + +List emails that were missed due to plan limits. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.MissedEmailControllerApi(api_client) + missed_email_id = 'missed_email_id_example' # str | + + try: + # Get MissedEmail + api_response = api_instance.get_missed_email(missed_email_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling MissedEmailControllerApi->get_missed_email: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **missed_email_id** | [**str**]()| | + +### Return type + +[**MissedEmail**](MissedEmail) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **restore_missed_emails** +> restore_missed_emails() + +Restore missed emails + +If emails were missed due to a plan limit they are saved as missed emails. If support team enables the canRestore flag these emails can be reload into your account using this method. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.MissedEmailControllerApi(api_client) + + try: + # Restore missed emails + api_instance.restore_missed_emails() + except ApiException as e: + print("Exception when calling MissedEmailControllerApi->restore_missed_emails: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **wait_for_nth_missed_email** +> MissedEmail wait_for_nth_missed_email(index, inbox_id=inbox_id, timeout=timeout, since=since, before=before) + +Wait for Nth missed email + +Wait for 0 based index missed email + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.MissedEmailControllerApi(api_client) + index = 56 # int | Zero based index of the email to wait for. If 1 missed email already and you want to wait for the 2nd email pass index=1 +inbox_id = 'inbox_id_example' # str | Optional inbox ID filter (optional) +timeout = 56 # int | Optional timeout milliseconds (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) + + try: + # Wait for Nth missed email + api_response = api_instance.wait_for_nth_missed_email(index, inbox_id=inbox_id, timeout=timeout, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling MissedEmailControllerApi->wait_for_nth_missed_email: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **index** | **int**| Zero based index of the email to wait for. If 1 missed email already and you want to wait for the 2nd email pass index=1 | + **inbox_id** | [**str**]()| Optional inbox ID filter | [optional] + **timeout** | **int**| Optional timeout milliseconds | [optional] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + +### Return type + +[**MissedEmail**](MissedEmail) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/MissedEmailProjection.md b/docs/MissedEmailProjection.md new file mode 100644 index 00000000..eaec75e5 --- /dev/null +++ b/docs/MissedEmailProjection.md @@ -0,0 +1,15 @@ +# MissedEmailProjection + +Missed email data +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**_from** | **str** | | [optional] +**subject** | **str** | | [optional] +**user_id** | **str** | | [optional] +**created_at** | **datetime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/NameServerRecord.md b/docs/NameServerRecord.md new file mode 100644 index 00000000..c6bb0f63 --- /dev/null +++ b/docs/NameServerRecord.md @@ -0,0 +1,14 @@ +# NameServerRecord + +Name Server Record +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**raw** | **str** | | +**record_type** | **str** | | +**priority** | **str** | | +**value** | **str** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/OrganizationInboxProjection.md b/docs/OrganizationInboxProjection.md new file mode 100644 index 00000000..5a5dd241 --- /dev/null +++ b/docs/OrganizationInboxProjection.md @@ -0,0 +1,21 @@ +# OrganizationInboxProjection + +Organization team inbox +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically. | +**domain_id** | **str** | ID of custom domain used by the inbox if any | [optional] +**created_at** | **datetime** | When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`. | +**name** | **str** | Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search | [optional] +**email_address** | **str** | The inbox's email address. Inbox projections and previews may not include the email address. To view the email address fetch the inbox entity directly. Send an email to this address and the inbox will receive and store it for you. Note the email address in MailSlurp match characters exactly and are case sensitive so `+123` additions are considered different addresses. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. | [optional] +**favourite** | **bool** | Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering | +**tags** | **list[str]** | Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. | [optional] +**team_access** | **bool** | Does inbox permit team access for organization team members. If so team users can use inbox and emails associated with it. See the team access guide at https://www.mailslurp.com/guides/team-email-account-sharing/ | +**inbox_type** | **str** | Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). | [optional] +**read_only** | **bool** | Is the inbox readOnly for the caller. Read only means can not be deleted or modified. This flag is present when using team accounts and shared inboxes. | +**virtual_inbox** | **bool** | Virtual inbox can receive email but will not send emails to real recipients. Will save sent email record but never send an actual email. Perfect for testing mail server actions. | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PageAlias.md b/docs/PageAlias.md new file mode 100644 index 00000000..d6b4912e --- /dev/null +++ b/docs/PageAlias.md @@ -0,0 +1,22 @@ +# PageAlias + +Paginated email alias results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**list[AliasProjection]**](AliasProjection) | | [optional] +**pageable** | [**PageableObject**](PageableObject) | | [optional] +**total** | **int** | | [optional] +**last** | **bool** | | [optional] +**total_elements** | **int** | | [optional] +**total_pages** | **int** | | [optional] +**size** | **int** | | [optional] +**number** | **int** | | [optional] +**sort** | [**Sort**](Sort) | | [optional] +**first** | **bool** | | [optional] +**number_of_elements** | **int** | | [optional] +**empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PageAttachmentEntity.md b/docs/PageAttachmentEntity.md new file mode 100644 index 00000000..2bdd3b75 --- /dev/null +++ b/docs/PageAttachmentEntity.md @@ -0,0 +1,22 @@ +# PageAttachmentEntity + +Paginated attachment entity results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**list[AttachmentProjection]**](AttachmentProjection) | | [optional] +**pageable** | [**PageableObject**](PageableObject) | | [optional] +**total** | **int** | | [optional] +**last** | **bool** | | [optional] +**total_elements** | **int** | | [optional] +**total_pages** | **int** | | [optional] +**size** | **int** | | [optional] +**number** | **int** | | [optional] +**sort** | [**Sort**](Sort) | | [optional] +**first** | **bool** | | [optional] +**number_of_elements** | **int** | | [optional] +**empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PageBouncedEmail.md b/docs/PageBouncedEmail.md new file mode 100644 index 00000000..f314c531 --- /dev/null +++ b/docs/PageBouncedEmail.md @@ -0,0 +1,22 @@ +# PageBouncedEmail + +Paginated bounced email. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**list[BounceProjection]**](BounceProjection) | | [optional] +**pageable** | [**PageableObject**](PageableObject) | | [optional] +**total** | **int** | | [optional] +**last** | **bool** | | [optional] +**total_elements** | **int** | | [optional] +**total_pages** | **int** | | [optional] +**size** | **int** | | [optional] +**number** | **int** | | [optional] +**sort** | [**Sort**](Sort) | | [optional] +**first** | **bool** | | [optional] +**number_of_elements** | **int** | | [optional] +**empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PageBouncedRecipients.md b/docs/PageBouncedRecipients.md new file mode 100644 index 00000000..795d1c23 --- /dev/null +++ b/docs/PageBouncedRecipients.md @@ -0,0 +1,22 @@ +# PageBouncedRecipients + +Paginated bounced recipients. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**list[BounceRecipientProjection]**](BounceRecipientProjection) | | [optional] +**pageable** | [**PageableObject**](PageableObject) | | [optional] +**total** | **int** | | [optional] +**last** | **bool** | | [optional] +**total_elements** | **int** | | [optional] +**total_pages** | **int** | | [optional] +**size** | **int** | | [optional] +**number** | **int** | | [optional] +**sort** | [**Sort**](Sort) | | [optional] +**first** | **bool** | | [optional] +**number_of_elements** | **int** | | [optional] +**empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PageComplaint.md b/docs/PageComplaint.md new file mode 100644 index 00000000..6db75f49 --- /dev/null +++ b/docs/PageComplaint.md @@ -0,0 +1,22 @@ +# PageComplaint + +Paginated complaint email. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**list[Complaint]**](Complaint) | | [optional] +**pageable** | [**PageableObject**](PageableObject) | | [optional] +**total** | **int** | | [optional] +**last** | **bool** | | [optional] +**total_elements** | **int** | | [optional] +**total_pages** | **int** | | [optional] +**size** | **int** | | [optional] +**number** | **int** | | [optional] +**sort** | [**Sort**](Sort) | | [optional] +**first** | **bool** | | [optional] +**number_of_elements** | **int** | | [optional] +**empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PageContactProjection.md b/docs/PageContactProjection.md new file mode 100644 index 00000000..0363d419 --- /dev/null +++ b/docs/PageContactProjection.md @@ -0,0 +1,22 @@ +# PageContactProjection + +Paginated contact results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**list[ContactProjection]**](ContactProjection) | | [optional] +**pageable** | [**PageableObject**](PageableObject) | | [optional] +**total** | **int** | | [optional] +**last** | **bool** | | [optional] +**total_elements** | **int** | | [optional] +**total_pages** | **int** | | [optional] +**size** | **int** | | [optional] +**number** | **int** | | [optional] +**sort** | [**Sort**](Sort) | | [optional] +**first** | **bool** | | [optional] +**number_of_elements** | **int** | | [optional] +**empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PageDeliveryStatus.md b/docs/PageDeliveryStatus.md new file mode 100644 index 00000000..24f58edf --- /dev/null +++ b/docs/PageDeliveryStatus.md @@ -0,0 +1,22 @@ +# PageDeliveryStatus + +Paginated delivery status results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**list[DeliveryStatusDto]**](DeliveryStatusDto) | | [optional] +**pageable** | [**PageableObject**](PageableObject) | | [optional] +**total** | **int** | | [optional] +**last** | **bool** | | [optional] +**total_elements** | **int** | | [optional] +**total_pages** | **int** | | [optional] +**size** | **int** | | [optional] +**number** | **int** | | [optional] +**sort** | [**Sort**](Sort) | | [optional] +**first** | **bool** | | [optional] +**number_of_elements** | **int** | | [optional] +**empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PageEmailPreview.md b/docs/PageEmailPreview.md new file mode 100644 index 00000000..f2e06913 --- /dev/null +++ b/docs/PageEmailPreview.md @@ -0,0 +1,22 @@ +# PageEmailPreview + +Paginated email preview results. EmailProjections and EmailPreviews are essentially the same but have legacy naming issues. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. For emails there are several methods for fetching message bodies and attachments. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**list[EmailPreview]**](EmailPreview) | | [optional] +**pageable** | [**PageableObject**](PageableObject) | | [optional] +**total** | **int** | | [optional] +**last** | **bool** | | [optional] +**total_elements** | **int** | | [optional] +**total_pages** | **int** | | [optional] +**size** | **int** | | [optional] +**number** | **int** | | [optional] +**sort** | [**Sort**](Sort) | | [optional] +**first** | **bool** | | [optional] +**number_of_elements** | **int** | | [optional] +**empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PageEmailProjection.md b/docs/PageEmailProjection.md new file mode 100644 index 00000000..d4e7ae13 --- /dev/null +++ b/docs/PageEmailProjection.md @@ -0,0 +1,22 @@ +# PageEmailProjection + +Paginated email projection results. EmailProjections and EmailPreviews are essentially the same but have legacy naming issues. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full email entity use the projection ID with individual method calls. For emails there are several methods for fetching message bodies and attachments. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**list[EmailProjection]**](EmailProjection) | | [optional] +**pageable** | [**PageableObject**](PageableObject) | | [optional] +**total** | **int** | | [optional] +**last** | **bool** | | [optional] +**total_elements** | **int** | | [optional] +**total_pages** | **int** | | [optional] +**size** | **int** | | [optional] +**number** | **int** | | [optional] +**sort** | [**Sort**](Sort) | | [optional] +**first** | **bool** | | [optional] +**number_of_elements** | **int** | | [optional] +**empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PageEmailValidationRequest.md b/docs/PageEmailValidationRequest.md new file mode 100644 index 00000000..2d2a421b --- /dev/null +++ b/docs/PageEmailValidationRequest.md @@ -0,0 +1,22 @@ +# PageEmailValidationRequest + +Paginated email validation request records. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**list[EmailValidationRequest]**](EmailValidationRequest) | | [optional] +**pageable** | [**PageableObject**](PageableObject) | | [optional] +**total** | **int** | | [optional] +**last** | **bool** | | [optional] +**total_elements** | **int** | | [optional] +**total_pages** | **int** | | [optional] +**size** | **int** | | [optional] +**number** | **int** | | [optional] +**sort** | [**Sort**](Sort) | | [optional] +**first** | **bool** | | [optional] +**number_of_elements** | **int** | | [optional] +**empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PageExpiredInboxRecordProjection.md b/docs/PageExpiredInboxRecordProjection.md new file mode 100644 index 00000000..705ff686 --- /dev/null +++ b/docs/PageExpiredInboxRecordProjection.md @@ -0,0 +1,22 @@ +# PageExpiredInboxRecordProjection + +Paginated expired inbox results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**list[ExpiredInboxRecordProjection]**](ExpiredInboxRecordProjection) | | [optional] +**pageable** | [**PageableObject**](PageableObject) | | [optional] +**total** | **int** | | [optional] +**last** | **bool** | | [optional] +**total_elements** | **int** | | [optional] +**total_pages** | **int** | | [optional] +**size** | **int** | | [optional] +**number** | **int** | | [optional] +**sort** | [**Sort**](Sort) | | [optional] +**first** | **bool** | | [optional] +**number_of_elements** | **int** | | [optional] +**empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PageGroupProjection.md b/docs/PageGroupProjection.md new file mode 100644 index 00000000..c76d1a70 --- /dev/null +++ b/docs/PageGroupProjection.md @@ -0,0 +1,22 @@ +# PageGroupProjection + +Paginated missed email results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**list[GroupProjection]**](GroupProjection) | | [optional] +**pageable** | [**PageableObject**](PageableObject) | | [optional] +**total** | **int** | | [optional] +**last** | **bool** | | [optional] +**total_elements** | **int** | | [optional] +**total_pages** | **int** | | [optional] +**size** | **int** | | [optional] +**number** | **int** | | [optional] +**sort** | [**Sort**](Sort) | | [optional] +**first** | **bool** | | [optional] +**number_of_elements** | **int** | | [optional] +**empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PageInboxForwarderDto.md b/docs/PageInboxForwarderDto.md new file mode 100644 index 00000000..dcebc27a --- /dev/null +++ b/docs/PageInboxForwarderDto.md @@ -0,0 +1,22 @@ +# PageInboxForwarderDto + +Paginated inbox forwarder results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**list[InboxForwarderDto]**](InboxForwarderDto) | | [optional] +**pageable** | [**PageableObject**](PageableObject) | | [optional] +**total** | **int** | | [optional] +**last** | **bool** | | [optional] +**total_elements** | **int** | | [optional] +**total_pages** | **int** | | [optional] +**size** | **int** | | [optional] +**number** | **int** | | [optional] +**sort** | [**Sort**](Sort) | | [optional] +**first** | **bool** | | [optional] +**number_of_elements** | **int** | | [optional] +**empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PageInboxProjection.md b/docs/PageInboxProjection.md new file mode 100644 index 00000000..34464f97 --- /dev/null +++ b/docs/PageInboxProjection.md @@ -0,0 +1,22 @@ +# PageInboxProjection + +Paginated inbox results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**list[InboxPreview]**](InboxPreview) | | [optional] +**pageable** | [**PageableObject**](PageableObject) | | [optional] +**total** | **int** | | [optional] +**last** | **bool** | | [optional] +**total_elements** | **int** | | [optional] +**total_pages** | **int** | | [optional] +**size** | **int** | | [optional] +**number** | **int** | | [optional] +**sort** | [**Sort**](Sort) | | [optional] +**first** | **bool** | | [optional] +**number_of_elements** | **int** | | [optional] +**empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PageInboxRulesetDto.md b/docs/PageInboxRulesetDto.md new file mode 100644 index 00000000..3fc711bb --- /dev/null +++ b/docs/PageInboxRulesetDto.md @@ -0,0 +1,22 @@ +# PageInboxRulesetDto + +Paginated inbox ruleset results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**list[InboxRulesetDto]**](InboxRulesetDto) | | [optional] +**pageable** | [**PageableObject**](PageableObject) | | [optional] +**total** | **int** | | [optional] +**last** | **bool** | | [optional] +**total_elements** | **int** | | [optional] +**total_pages** | **int** | | [optional] +**size** | **int** | | [optional] +**number** | **int** | | [optional] +**sort** | [**Sort**](Sort) | | [optional] +**first** | **bool** | | [optional] +**number_of_elements** | **int** | | [optional] +**empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PageMissedEmailProjection.md b/docs/PageMissedEmailProjection.md new file mode 100644 index 00000000..60e7711d --- /dev/null +++ b/docs/PageMissedEmailProjection.md @@ -0,0 +1,22 @@ +# PageMissedEmailProjection + +Paginated MissedEmail results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**list[MissedEmailProjection]**](MissedEmailProjection) | | [optional] +**pageable** | [**PageableObject**](PageableObject) | | [optional] +**total** | **int** | | [optional] +**last** | **bool** | | [optional] +**total_elements** | **int** | | [optional] +**total_pages** | **int** | | [optional] +**size** | **int** | | [optional] +**number** | **int** | | [optional] +**sort** | [**Sort**](Sort) | | [optional] +**first** | **bool** | | [optional] +**number_of_elements** | **int** | | [optional] +**empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PageOrganizationInboxProjection.md b/docs/PageOrganizationInboxProjection.md new file mode 100644 index 00000000..362051e4 --- /dev/null +++ b/docs/PageOrganizationInboxProjection.md @@ -0,0 +1,22 @@ +# PageOrganizationInboxProjection + +Paginated organization inbox results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**list[OrganizationInboxProjection]**](OrganizationInboxProjection) | | [optional] +**pageable** | [**PageableObject**](PageableObject) | | [optional] +**total** | **int** | | [optional] +**last** | **bool** | | [optional] +**total_elements** | **int** | | [optional] +**total_pages** | **int** | | [optional] +**size** | **int** | | [optional] +**number** | **int** | | [optional] +**sort** | [**Sort**](Sort) | | [optional] +**first** | **bool** | | [optional] +**number_of_elements** | **int** | | [optional] +**empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PagePhoneNumberProjection.md b/docs/PagePhoneNumberProjection.md new file mode 100644 index 00000000..b76abc4e --- /dev/null +++ b/docs/PagePhoneNumberProjection.md @@ -0,0 +1,22 @@ +# PagePhoneNumberProjection + +Paginated phone numbers. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**list[PhoneNumberProjection]**](PhoneNumberProjection) | | [optional] +**pageable** | [**PageableObject**](PageableObject) | | [optional] +**total** | **int** | | [optional] +**last** | **bool** | | [optional] +**total_elements** | **int** | | [optional] +**total_pages** | **int** | | [optional] +**size** | **int** | | [optional] +**number** | **int** | | [optional] +**sort** | [**Sort**](Sort) | | [optional] +**first** | **bool** | | [optional] +**number_of_elements** | **int** | | [optional] +**empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PageSentEmailProjection.md b/docs/PageSentEmailProjection.md new file mode 100644 index 00000000..de08a79a --- /dev/null +++ b/docs/PageSentEmailProjection.md @@ -0,0 +1,22 @@ +# PageSentEmailProjection + +Paginated sent email results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full sent email entity use the projection ID with individual method calls. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**list[SentEmailProjection]**](SentEmailProjection) | Collection of items | +**pageable** | [**PageableObject**](PageableObject) | | [optional] +**total** | **int** | | [optional] +**size** | **int** | Size of page requested | +**number** | **int** | Page number starting at 0 | +**number_of_elements** | **int** | Number of items returned | +**total_elements** | **int** | Total number of items available for querying | +**total_pages** | **int** | Total number of pages available | +**last** | **bool** | | [optional] +**sort** | [**Sort**](Sort) | | [optional] +**first** | **bool** | | [optional] +**empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PageSentEmailWithQueueProjection.md b/docs/PageSentEmailWithQueueProjection.md new file mode 100644 index 00000000..f878b8a3 --- /dev/null +++ b/docs/PageSentEmailWithQueueProjection.md @@ -0,0 +1,22 @@ +# PageSentEmailWithQueueProjection + +Paginated sent email results for emails sent with queue. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full sent email entity use the projection ID with individual method calls. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**list[SendWithQueueResult]**](SendWithQueueResult) | Collection of items | +**pageable** | [**PageableObject**](PageableObject) | | [optional] +**total** | **int** | | [optional] +**size** | **int** | Size of page requested | +**number** | **int** | Page number starting at 0 | +**number_of_elements** | **int** | Number of items returned | +**total_elements** | **int** | Total number of items available for querying | +**total_pages** | **int** | Total number of pages available | +**last** | **bool** | | [optional] +**sort** | [**Sort**](Sort) | | [optional] +**first** | **bool** | | [optional] +**empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PageSmsProjection.md b/docs/PageSmsProjection.md new file mode 100644 index 00000000..98a6b2b4 --- /dev/null +++ b/docs/PageSmsProjection.md @@ -0,0 +1,22 @@ +# PageSmsProjection + +Paginated SMS messages. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**list[SmsProjection]**](SmsProjection) | | [optional] +**pageable** | [**PageableObject**](PageableObject) | | [optional] +**total** | **int** | | [optional] +**last** | **bool** | | [optional] +**total_elements** | **int** | | [optional] +**total_pages** | **int** | | [optional] +**size** | **int** | | [optional] +**number** | **int** | | [optional] +**sort** | [**Sort**](Sort) | | [optional] +**first** | **bool** | | [optional] +**number_of_elements** | **int** | | [optional] +**empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PageTemplateProjection.md b/docs/PageTemplateProjection.md new file mode 100644 index 00000000..99c77a1b --- /dev/null +++ b/docs/PageTemplateProjection.md @@ -0,0 +1,22 @@ +# PageTemplateProjection + +Paginated email template results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**list[TemplateProjection]**](TemplateProjection) | | [optional] +**pageable** | [**PageableObject**](PageableObject) | | [optional] +**total** | **int** | | [optional] +**last** | **bool** | | [optional] +**total_elements** | **int** | | [optional] +**total_pages** | **int** | | [optional] +**size** | **int** | | [optional] +**number** | **int** | | [optional] +**sort** | [**Sort**](Sort) | | [optional] +**first** | **bool** | | [optional] +**number_of_elements** | **int** | | [optional] +**empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PageThreadProjection.md b/docs/PageThreadProjection.md new file mode 100644 index 00000000..9fa9f209 --- /dev/null +++ b/docs/PageThreadProjection.md @@ -0,0 +1,22 @@ +# PageThreadProjection + +Paginated email projection results. EmailProjections and EmailPreviews are essentially the same but have legacy naming issues. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full email entity use the projection ID with individual method calls. For emails there are several methods for fetching message bodies and attachments. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**list[ThreadProjection]**](ThreadProjection) | | [optional] +**pageable** | [**PageableObject**](PageableObject) | | [optional] +**total** | **int** | | [optional] +**last** | **bool** | | [optional] +**total_elements** | **int** | | [optional] +**total_pages** | **int** | | [optional] +**size** | **int** | | [optional] +**number** | **int** | | [optional] +**sort** | [**Sort**](Sort) | | [optional] +**first** | **bool** | | [optional] +**number_of_elements** | **int** | | [optional] +**empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PageTrackingPixelProjection.md b/docs/PageTrackingPixelProjection.md new file mode 100644 index 00000000..087cee3c --- /dev/null +++ b/docs/PageTrackingPixelProjection.md @@ -0,0 +1,22 @@ +# PageTrackingPixelProjection + +Paginated TrackingPixel results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**list[TrackingPixelProjection]**](TrackingPixelProjection) | | [optional] +**pageable** | [**PageableObject**](PageableObject) | | [optional] +**total** | **int** | | [optional] +**last** | **bool** | | [optional] +**total_elements** | **int** | | [optional] +**total_pages** | **int** | | [optional] +**size** | **int** | | [optional] +**number** | **int** | | [optional] +**sort** | [**Sort**](Sort) | | [optional] +**first** | **bool** | | [optional] +**number_of_elements** | **int** | | [optional] +**empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PageUnknownMissedEmailProjection.md b/docs/PageUnknownMissedEmailProjection.md new file mode 100644 index 00000000..0187ec1e --- /dev/null +++ b/docs/PageUnknownMissedEmailProjection.md @@ -0,0 +1,22 @@ +# PageUnknownMissedEmailProjection + +Paginated unknown MissedEmail results. Unknown missed emails are emails that were sent to MailSlurp /Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**list[UnknownMissedEmailProjection]**](UnknownMissedEmailProjection) | | [optional] +**pageable** | [**PageableObject**](PageableObject) | | [optional] +**total** | **int** | | [optional] +**last** | **bool** | | [optional] +**total_elements** | **int** | | [optional] +**total_pages** | **int** | | [optional] +**size** | **int** | | [optional] +**number** | **int** | | [optional] +**sort** | [**Sort**](Sort) | | [optional] +**first** | **bool** | | [optional] +**number_of_elements** | **int** | | [optional] +**empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PageWebhookProjection.md b/docs/PageWebhookProjection.md new file mode 100644 index 00000000..1da76ff5 --- /dev/null +++ b/docs/PageWebhookProjection.md @@ -0,0 +1,22 @@ +# PageWebhookProjection + +Paginated webhook entity. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**list[WebhookProjection]**](WebhookProjection) | | [optional] +**pageable** | [**PageableObject**](PageableObject) | | [optional] +**total** | **int** | | [optional] +**last** | **bool** | | [optional] +**total_elements** | **int** | | [optional] +**total_pages** | **int** | | [optional] +**size** | **int** | | [optional] +**number** | **int** | | [optional] +**sort** | [**Sort**](Sort) | | [optional] +**first** | **bool** | | [optional] +**number_of_elements** | **int** | | [optional] +**empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PageWebhookResult.md b/docs/PageWebhookResult.md new file mode 100644 index 00000000..9aa4b600 --- /dev/null +++ b/docs/PageWebhookResult.md @@ -0,0 +1,22 @@ +# PageWebhookResult + +Paginated webhook results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | [**list[WebhookResultDto]**](WebhookResultDto) | | [optional] +**pageable** | [**PageableObject**](PageableObject) | | [optional] +**total** | **int** | | [optional] +**last** | **bool** | | [optional] +**total_elements** | **int** | | [optional] +**total_pages** | **int** | | [optional] +**size** | **int** | | [optional] +**number** | **int** | | [optional] +**sort** | [**Sort**](Sort) | | [optional] +**first** | **bool** | | [optional] +**number_of_elements** | **int** | | [optional] +**empty** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PageableObject.md b/docs/PageableObject.md new file mode 100644 index 00000000..62329452 --- /dev/null +++ b/docs/PageableObject.md @@ -0,0 +1,15 @@ +# PageableObject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**offset** | **int** | | [optional] +**sort** | [**Sort**](Sort) | | [optional] +**page_number** | **int** | | [optional] +**page_size** | **int** | | [optional] +**paged** | **bool** | | [optional] +**unpaged** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PhoneControllerApi.md b/docs/PhoneControllerApi.md new file mode 100644 index 00000000..67d02f1f --- /dev/null +++ b/docs/PhoneControllerApi.md @@ -0,0 +1,687 @@ +# mailslurp_client.PhoneControllerApi + +All URIs are relative to *https://python.api.mailslurp.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_emergency_address**](PhoneControllerApi#create_emergency_address) | **POST** /phone/emergency-addresses | +[**delete_emergency_address**](PhoneControllerApi#delete_emergency_address) | **DELETE** /phone/emergency-addresses/{addressId} | +[**delete_phone_number**](PhoneControllerApi#delete_phone_number) | **DELETE** /phone/numbers/{phoneNumberId} | +[**get_emergency_address**](PhoneControllerApi#get_emergency_address) | **GET** /phone/emergency-addresses/{addressId} | +[**get_emergency_addresses**](PhoneControllerApi#get_emergency_addresses) | **GET** /phone/emergency-addresses | +[**get_phone_number**](PhoneControllerApi#get_phone_number) | **GET** /phone/numbers/{phoneNumberId} | +[**get_phone_numbers**](PhoneControllerApi#get_phone_numbers) | **GET** /phone/numbers | +[**get_phone_plans**](PhoneControllerApi#get_phone_plans) | **GET** /phone/plans | +[**test_phone_number_send_sms**](PhoneControllerApi#test_phone_number_send_sms) | **POST** /phone/numbers/{phoneNumberId}/test | + + +# **create_emergency_address** +> EmergencyAddress create_emergency_address(create_emergency_address_options) + + + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.PhoneControllerApi(api_client) + create_emergency_address_options = mailslurp_client.CreateEmergencyAddressOptions() # CreateEmergencyAddressOptions | + + try: + api_response = api_instance.create_emergency_address(create_emergency_address_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling PhoneControllerApi->create_emergency_address: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_emergency_address_options** | [**CreateEmergencyAddressOptions**](CreateEmergencyAddressOptions)| | + +### Return type + +[**EmergencyAddress**](EmergencyAddress) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **delete_emergency_address** +> EmptyResponseDto delete_emergency_address(address_id) + + + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.PhoneControllerApi(api_client) + address_id = 'address_id_example' # str | + + try: + api_response = api_instance.delete_emergency_address(address_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling PhoneControllerApi->delete_emergency_address: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **address_id** | [**str**]()| | + +### Return type + +[**EmptyResponseDto**](EmptyResponseDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **delete_phone_number** +> delete_phone_number(phone_number_id) + + + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.PhoneControllerApi(api_client) + phone_number_id = 'phone_number_id_example' # str | + + try: + api_instance.delete_phone_number(phone_number_id) + except ApiException as e: + print("Exception when calling PhoneControllerApi->delete_phone_number: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **phone_number_id** | [**str**]()| | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_emergency_address** +> EmergencyAddress get_emergency_address(address_id) + + + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.PhoneControllerApi(api_client) + address_id = 'address_id_example' # str | + + try: + api_response = api_instance.get_emergency_address(address_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling PhoneControllerApi->get_emergency_address: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **address_id** | [**str**]()| | + +### Return type + +[**EmergencyAddress**](EmergencyAddress) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_emergency_addresses** +> list[EmergencyAddressDto] get_emergency_addresses() + + + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.PhoneControllerApi(api_client) + + try: + api_response = api_instance.get_emergency_addresses() + pprint(api_response) + except ApiException as e: + print("Exception when calling PhoneControllerApi->get_emergency_addresses: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[EmergencyAddressDto]**](EmergencyAddressDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_phone_number** +> PhoneNumberDto get_phone_number(phone_number_id) + + + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.PhoneControllerApi(api_client) + phone_number_id = 'phone_number_id_example' # str | + + try: + api_response = api_instance.get_phone_number(phone_number_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling PhoneControllerApi->get_phone_number: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **phone_number_id** | [**str**]()| | + +### Return type + +[**PhoneNumberDto**](PhoneNumberDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_phone_numbers** +> PagePhoneNumberProjection get_phone_numbers(phone_country=phone_country, page=page, size=size, sort=sort, since=since, before=before) + + + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.PhoneControllerApi(api_client) + phone_country = 'phone_country_example' # str | Optional phone country (optional) +page = 0 # int | Optional page index for list pagination (optional) (default to 0) +size = 20 # int | Optional page size for list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) + + try: + api_response = api_instance.get_phone_numbers(phone_country=phone_country, page=page, size=size, sort=sort, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling PhoneControllerApi->get_phone_numbers: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **phone_country** | **str**| Optional phone country | [optional] + **page** | **int**| Optional page index for list pagination | [optional] [default to 0] + **size** | **int**| Optional page size for list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + +### Return type + +[**PagePhoneNumberProjection**](PagePhoneNumberProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_phone_plans** +> list[PhonePlanDto] get_phone_plans() + + + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.PhoneControllerApi(api_client) + + try: + api_response = api_instance.get_phone_plans() + pprint(api_response) + except ApiException as e: + print("Exception when calling PhoneControllerApi->get_phone_plans: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[PhonePlanDto]**](PhonePlanDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **test_phone_number_send_sms** +> test_phone_number_send_sms(phone_number_id, test_phone_number_options, x_test_id=x_test_id) + + + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.PhoneControllerApi(api_client) + phone_number_id = 'phone_number_id_example' # str | +test_phone_number_options = mailslurp_client.TestPhoneNumberOptions() # TestPhoneNumberOptions | +x_test_id = 'x_test_id_example' # str | (optional) + + try: + api_instance.test_phone_number_send_sms(phone_number_id, test_phone_number_options, x_test_id=x_test_id) + except ApiException as e: + print("Exception when calling PhoneControllerApi->test_phone_number_send_sms: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **phone_number_id** | [**str**]()| | + **test_phone_number_options** | [**TestPhoneNumberOptions**](TestPhoneNumberOptions)| | + **x_test_id** | **str**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/PhoneNumberDto.md b/docs/PhoneNumberDto.md new file mode 100644 index 00000000..b46a961a --- /dev/null +++ b/docs/PhoneNumberDto.md @@ -0,0 +1,18 @@ +# PhoneNumberDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**user_id** | **str** | | +**compliance_address** | **str** | | [optional] +**emergency_address** | **str** | | [optional] +**phone_number** | **str** | | +**phone_country** | **str** | | +**phone_plan** | **str** | | +**created_at** | **datetime** | | +**updated_at** | **datetime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PhoneNumberProjection.md b/docs/PhoneNumberProjection.md new file mode 100644 index 00000000..061c5d05 --- /dev/null +++ b/docs/PhoneNumberProjection.md @@ -0,0 +1,15 @@ +# PhoneNumberProjection + +Phone number projection +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**user_id** | **str** | | +**phone_number** | **str** | | +**phone_country** | **str** | | +**created_at** | **datetime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/PhonePlanDto.md b/docs/PhonePlanDto.md new file mode 100644 index 00000000..702dc6b8 --- /dev/null +++ b/docs/PhonePlanDto.md @@ -0,0 +1,13 @@ +# PhonePlanDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**user_id** | **str** | | +**phone_country** | **str** | | +**created_at** | **datetime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/RawEmailJson.md b/docs/RawEmailJson.md new file mode 100644 index 00000000..d62c671a --- /dev/null +++ b/docs/RawEmailJson.md @@ -0,0 +1,11 @@ +# RawEmailJson + +Content in raw format +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **str** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/Recipient.md b/docs/Recipient.md new file mode 100644 index 00000000..104fbb33 --- /dev/null +++ b/docs/Recipient.md @@ -0,0 +1,13 @@ +# Recipient + +Email recipient +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**raw_value** | **str** | | +**email_address** | **str** | | +**name** | **str** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/ReplyToAliasEmailOptions.md b/docs/ReplyToAliasEmailOptions.md new file mode 100644 index 00000000..a328bb51 --- /dev/null +++ b/docs/ReplyToAliasEmailOptions.md @@ -0,0 +1,19 @@ +# ReplyToAliasEmailOptions + +Options for replying to an alias email using the alias inbox +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | Body of the reply email you want to send | +**is_html** | **bool** | Is the reply HTML | +**charset** | **str** | The charset that your message should be sent with. Optional. Default is UTF-8 | [optional] +**attachments** | **list[str]** | List of uploaded attachments to send with the reply. Optional. | [optional] +**template_variables** | **dict(str, object)** | Template variables if using a template | [optional] +**template** | **str** | Template ID to use instead of body. Will use template variable map to fill defined variable slots. | [optional] +**send_strategy** | **str** | How an email should be sent based on its recipients | [optional] +**use_inbox_name** | **bool** | Optionally use inbox name as display name for sender email address | [optional] +**html** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/ReplyToEmailOptions.md b/docs/ReplyToEmailOptions.md new file mode 100644 index 00000000..87a36ed6 --- /dev/null +++ b/docs/ReplyToEmailOptions.md @@ -0,0 +1,21 @@ +# ReplyToEmailOptions + +Options for replying to email with API +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | Body of the reply email you want to send | +**is_html** | **bool** | Is the reply HTML | +**_from** | **str** | The from header that should be used. Optional | [optional] +**reply_to** | **str** | The replyTo header that should be used. Optional | [optional] +**charset** | **str** | The charset that your message should be sent with. Optional. Default is UTF-8 | [optional] +**attachments** | **list[str]** | List of uploaded attachments to send with the reply. Optional. | [optional] +**template_variables** | **dict(str, object)** | Template variables if using a template | [optional] +**template** | **str** | Template ID to use instead of body. Will use template variable map to fill defined variable slots. | [optional] +**send_strategy** | **str** | How an email should be sent based on its recipients | [optional] +**use_inbox_name** | **bool** | Optionally use inbox name as display name for sender email address | [optional] +**html** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/SendEmailOptions.md b/docs/SendEmailOptions.md new file mode 100644 index 00000000..d73e1d98 --- /dev/null +++ b/docs/SendEmailOptions.md @@ -0,0 +1,30 @@ +# SendEmailOptions + +Options for the email to be sent +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**to_contacts** | **list[str]** | Optional list of contact IDs to send email to. Manage your contacts via the API or dashboard. When contacts are used the email is sent to each contact separately so they will not see other recipients. | [optional] +**to_group** | **str** | Optional contact group ID to send email to. You can create contacts and contact groups in the API or dashboard and use them for email campaigns. When contact groups are used the email is sent to each contact separately so they will not see other recipients | [optional] +**to** | **list[str]** | List of destination email addresses. Each email address must be RFC 5322 format. Even single recipients must be in array form. Maximum recipients per email depends on your plan. If you need to send many emails try using contacts or contact groups or use a non standard sendStrategy to ensure that spam filters are not triggered (many recipients in one email can affect your spam rating). Be cautious when sending emails that your recipients exist. High bounce rates (meaning a high percentage of emails cannot be delivered because an address does not exist) can result in account freezing. | [optional] +**_from** | **str** | Optional from address. Email address is RFC 5322 format and may include a display name and email in angle brackets (`my@address.com` or `My inbox <my@address.com>`). If no sender is set the source inbox address will be used for this field. If you set `useInboxName` to `true` the from field will include the inbox name as a display name: `inbox_name <inbox@address.com>`. For this to work use the name field when creating an inbox. Beware of potential spam penalties when setting the from field to an address not used by the inbox. Your emails may get blocked by services if you impersonate another address. To use a custom email addresses use a custom domain. You can create domains with the DomainController. The domain must be verified in the dashboard before it can be used. | [optional] +**cc** | **list[str]** | Optional list of cc destination email addresses | [optional] +**bcc** | **list[str]** | Optional list of bcc destination email addresses | [optional] +**subject** | **str** | Optional email subject line | [optional] +**reply_to** | **str** | Optional replyTo header | [optional] +**body** | **str** | Optional contents of email. If body contains HTML then set `isHTML` to true to ensure that email clients render it correctly. You can use moustache template syntax in the email body in conjunction with `toGroup` contact variables or `templateVariables` data. If you need more templating control consider creating a template and using the `template` property instead of the body. | [optional] +**html** | **bool** | Optional HTML flag to indicate that contents is HTML. Set's a `content-type: text/html` for email. (Deprecated: use `isHTML` instead.) | [optional] +**is_html** | **bool** | Optional HTML flag. If true the `content-type` of the email will be `text/html`. Set to true when sending HTML to ensure proper rending on email clients | [optional] +**charset** | **str** | Optional charset | [optional] +**attachments** | **list[str]** | Optional list of attachment IDs to send with this email. You must first upload each attachment separately via method call or dashboard in order to obtain attachment IDs. This way you can reuse attachments with different emails once uploaded. There are several ways to upload that support `multi-part form`, `base64 file encoding`, and octet stream binary uploads. See the `UploadController` for available methods. | [optional] +**template_variables** | **dict(str, object)** | Optional map of template variables. Will replace moustache syntax variables in subject and body or template with the associated values if found. | [optional] +**template** | **str** | Optional template ID to use for body. Will override body if provided. When using a template make sure you pass the corresponding map of `templateVariables`. You can find which variables are needed by fetching the template itself or viewing it in the dashboard. | [optional] +**send_strategy** | **str** | How an email should be sent based on its recipients | [optional] +**use_inbox_name** | **bool** | Use name of inbox as sender email address name. Will construct RFC 5322 email address with `Inbox name <inbox@address.com>` if the inbox has a name. | [optional] +**add_tracking_pixel** | **bool** | Add tracking pixel to email | [optional] +**filter_bounced_recipients** | **bool** | Filter recipients to remove any bounced recipients from to, bcc, and cc before sending | [optional] +**validate_email_addresses** | **str** | Validate recipient email addresses before sending | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/SendSMTPEnvelopeOptions.md b/docs/SendSMTPEnvelopeOptions.md new file mode 100644 index 00000000..dc2b0729 --- /dev/null +++ b/docs/SendSMTPEnvelopeOptions.md @@ -0,0 +1,13 @@ +# SendSMTPEnvelopeOptions + +Options for the email envelope +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rcpt_to** | **list[str]** | | +**mail_from** | **str** | | +**data** | **str** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/SendWithQueueResult.md b/docs/SendWithQueueResult.md new file mode 100644 index 00000000..50a4c53b --- /dev/null +++ b/docs/SendWithQueueResult.md @@ -0,0 +1,20 @@ +# SendWithQueueResult + +Collection of items +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**user_id** | **str** | | +**subject** | **str** | | [optional] +**inbox_id** | **str** | | [optional] +**header_id** | **str** | | +**delivered** | **bool** | | +**exception_name** | **str** | | [optional] +**message** | **str** | | [optional] +**created_at** | **datetime** | | +**updated_at** | **datetime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/Sender.md b/docs/Sender.md new file mode 100644 index 00000000..0a1a3df9 --- /dev/null +++ b/docs/Sender.md @@ -0,0 +1,13 @@ +# Sender + +Sender object containing from email address and from personal name if provided in address +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**raw_value** | **str** | | +**email_address** | **str** | | +**name** | **str** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/SentEmailDto.md b/docs/SentEmailDto.md new file mode 100644 index 00000000..094e7479 --- /dev/null +++ b/docs/SentEmailDto.md @@ -0,0 +1,35 @@ +# SentEmailDto + +Sent email details +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | ID of sent email | +**user_id** | **str** | User ID | +**inbox_id** | **str** | Inbox ID email was sent from | +**domain_id** | **str** | Domain ID | [optional] +**to** | **list[str]** | Recipients email was sent to | [optional] +**_from** | **str** | | [optional] +**reply_to** | **str** | | [optional] +**cc** | **list[str]** | | [optional] +**bcc** | **list[str]** | | [optional] +**attachments** | **list[str]** | Array of IDs of attachments that were sent with this email | [optional] +**subject** | **str** | | [optional] +**body_md5_hash** | **str** | MD5 Hash | [optional] +**body** | **str** | | [optional] +**to_contacts** | **list[str]** | | [optional] +**to_group** | **str** | | [optional] +**charset** | **str** | | [optional] +**is_html** | **bool** | | [optional] +**sent_at** | **datetime** | | +**pixel_ids** | **list[str]** | | [optional] +**message_id** | **str** | | [optional] +**message_ids** | **list[str]** | | [optional] +**virtual_send** | **bool** | | [optional] +**template_id** | **str** | | [optional] +**template_variables** | **dict(str, object)** | | [optional] +**html** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/SentEmailProjection.md b/docs/SentEmailProjection.md new file mode 100644 index 00000000..ca8f1bf9 --- /dev/null +++ b/docs/SentEmailProjection.md @@ -0,0 +1,22 @@ +# SentEmailProjection + +Collection of items +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**_from** | **str** | | [optional] +**user_id** | **str** | | +**subject** | **str** | | [optional] +**body_md5_hash** | **str** | | [optional] +**bcc** | **list[str]** | | +**cc** | **list[str]** | | +**virtual_send** | **bool** | | +**inbox_id** | **str** | | +**attachments** | **list[str]** | | +**to** | **list[str]** | | +**created_at** | **datetime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/SentEmailsControllerApi.md b/docs/SentEmailsControllerApi.md new file mode 100644 index 00000000..7c2b03ad --- /dev/null +++ b/docs/SentEmailsControllerApi.md @@ -0,0 +1,1313 @@ +# mailslurp_client.SentEmailsControllerApi + +All URIs are relative to *https://python.api.mailslurp.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**delete_all_sent_emails**](SentEmailsControllerApi#delete_all_sent_emails) | **DELETE** /sent | Delete all sent email receipts +[**delete_sent_email**](SentEmailsControllerApi#delete_sent_email) | **DELETE** /sent/{id} | Delete sent email receipt +[**get_all_sent_tracking_pixels**](SentEmailsControllerApi#get_all_sent_tracking_pixels) | **GET** /sent/tracking-pixels | +[**get_raw_sent_email_contents**](SentEmailsControllerApi#get_raw_sent_email_contents) | **GET** /sent/{emailId}/raw | Get raw sent email string. Returns unparsed raw SMTP message with headers and body. +[**get_raw_sent_email_json**](SentEmailsControllerApi#get_raw_sent_email_json) | **GET** /sent/{emailId}/raw/json | Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format. +[**get_sent_delivery_status**](SentEmailsControllerApi#get_sent_delivery_status) | **GET** /sent/delivery-status/{deliveryId} | +[**get_sent_delivery_statuses**](SentEmailsControllerApi#get_sent_delivery_statuses) | **GET** /sent/delivery-status | +[**get_sent_delivery_statuses_by_sent_id**](SentEmailsControllerApi#get_sent_delivery_statuses_by_sent_id) | **GET** /sent/{sentId}/delivery-status | +[**get_sent_email**](SentEmailsControllerApi#get_sent_email) | **GET** /sent/{id} | Get sent email receipt +[**get_sent_email_html_content**](SentEmailsControllerApi#get_sent_email_html_content) | **GET** /sent/{id}/html | Get sent email HTML content +[**get_sent_email_preview_ur_ls**](SentEmailsControllerApi#get_sent_email_preview_ur_ls) | **GET** /sent/{id}/urls | Get sent email URL for viewing in browser or downloading +[**get_sent_email_tracking_pixels**](SentEmailsControllerApi#get_sent_email_tracking_pixels) | **GET** /sent/{id}/tracking-pixels | +[**get_sent_emails**](SentEmailsControllerApi#get_sent_emails) | **GET** /sent | Get all sent emails in paginated form +[**get_sent_emails_with_queue_results**](SentEmailsControllerApi#get_sent_emails_with_queue_results) | **GET** /sent/queue-results | Get results of email sent with queues in paginated form +[**get_sent_organization_emails**](SentEmailsControllerApi#get_sent_organization_emails) | **GET** /sent/organization | +[**wait_for_delivery_statuses**](SentEmailsControllerApi#wait_for_delivery_statuses) | **GET** /sent/delivery-status/wait-for | + + +# **delete_all_sent_emails** +> delete_all_sent_emails() + +Delete all sent email receipts + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.SentEmailsControllerApi(api_client) + + try: + # Delete all sent email receipts + api_instance.delete_all_sent_emails() + except ApiException as e: + print("Exception when calling SentEmailsControllerApi->delete_all_sent_emails: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **delete_sent_email** +> delete_sent_email(id) + +Delete sent email receipt + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.SentEmailsControllerApi(api_client) + id = 'id_example' # str | + + try: + # Delete sent email receipt + api_instance.delete_sent_email(id) + except ApiException as e: + print("Exception when calling SentEmailsControllerApi->delete_sent_email: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | [**str**]()| | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_all_sent_tracking_pixels** +> PageTrackingPixelProjection get_all_sent_tracking_pixels(page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before) + + + +Get all sent email tracking pixels in paginated form + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.SentEmailsControllerApi(api_client) + page = 0 # int | Optional page index in sent email tracking pixel list pagination (optional) (default to 0) +size = 20 # int | Optional page size in sent email tracking pixel list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +search_filter = 'search_filter_example' # str | Optional search filter (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) + + try: + api_response = api_instance.get_all_sent_tracking_pixels(page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling SentEmailsControllerApi->get_all_sent_tracking_pixels: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Optional page index in sent email tracking pixel list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in sent email tracking pixel list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **search_filter** | **str**| Optional search filter | [optional] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + +### Return type + +[**PageTrackingPixelProjection**](PageTrackingPixelProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_raw_sent_email_contents** +> str get_raw_sent_email_contents(email_id) + +Get raw sent email string. Returns unparsed raw SMTP message with headers and body. + +Returns a raw, unparsed, and unprocessed sent email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawSentEmailJson endpoint + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.SentEmailsControllerApi(api_client) + email_id = 'email_id_example' # str | ID of email + + try: + # Get raw sent email string. Returns unparsed raw SMTP message with headers and body. + api_response = api_instance.get_raw_sent_email_contents(email_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling SentEmailsControllerApi->get_raw_sent_email_contents: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email_id** | [**str**]()| ID of email | + +### Return type + +**str** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/plain + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_raw_sent_email_json** +> RawEmailJson get_raw_sent_email_json(email_id) + +Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format. + +Returns a raw, unparsed, and unprocessed sent email wrapped in a JSON response object for easier handling when compared with the getRawSentEmail text/plain response + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.SentEmailsControllerApi(api_client) + email_id = 'email_id_example' # str | ID of email + + try: + # Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format. + api_response = api_instance.get_raw_sent_email_json(email_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling SentEmailsControllerApi->get_raw_sent_email_json: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email_id** | [**str**]()| ID of email | + +### Return type + +[**RawEmailJson**](RawEmailJson) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_sent_delivery_status** +> DeliveryStatusDto get_sent_delivery_status(delivery_id) + + + +Get a sent email delivery status + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.SentEmailsControllerApi(api_client) + delivery_id = 'delivery_id_example' # str | + + try: + api_response = api_instance.get_sent_delivery_status(delivery_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling SentEmailsControllerApi->get_sent_delivery_status: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **delivery_id** | [**str**]()| | + +### Return type + +[**DeliveryStatusDto**](DeliveryStatusDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_sent_delivery_statuses** +> PageDeliveryStatus get_sent_delivery_statuses(page=page, size=size, sort=sort, since=since, before=before) + + + +Get all sent email delivery statuses + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.SentEmailsControllerApi(api_client) + page = 0 # int | Optional page index in delivery status list pagination (optional) (default to 0) +size = 20 # int | Optional page size in delivery status list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) + + try: + api_response = api_instance.get_sent_delivery_statuses(page=page, size=size, sort=sort, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling SentEmailsControllerApi->get_sent_delivery_statuses: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Optional page index in delivery status list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in delivery status list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + +### Return type + +[**PageDeliveryStatus**](PageDeliveryStatus) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_sent_delivery_statuses_by_sent_id** +> PageDeliveryStatus get_sent_delivery_statuses_by_sent_id(sent_id, page=page, size=size, sort=sort, since=since, before=before) + + + +Get all sent email delivery statuses + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.SentEmailsControllerApi(api_client) + sent_id = 'sent_id_example' # str | +page = 0 # int | Optional page index in delivery status list pagination (optional) (default to 0) +size = 20 # int | Optional page size in delivery status list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) + + try: + api_response = api_instance.get_sent_delivery_statuses_by_sent_id(sent_id, page=page, size=size, sort=sort, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling SentEmailsControllerApi->get_sent_delivery_statuses_by_sent_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sent_id** | [**str**]()| | + **page** | **int**| Optional page index in delivery status list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in delivery status list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + +### Return type + +[**PageDeliveryStatus**](PageDeliveryStatus) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_sent_email** +> SentEmailDto get_sent_email(id) + +Get sent email receipt + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.SentEmailsControllerApi(api_client) + id = 'id_example' # str | + + try: + # Get sent email receipt + api_response = api_instance.get_sent_email(id) + pprint(api_response) + except ApiException as e: + print("Exception when calling SentEmailsControllerApi->get_sent_email: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | [**str**]()| | + +### Return type + +[**SentEmailDto**](SentEmailDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_sent_email_html_content** +> str get_sent_email_html_content(id) + +Get sent email HTML content + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.SentEmailsControllerApi(api_client) + id = 'id_example' # str | + + try: + # Get sent email HTML content + api_response = api_instance.get_sent_email_html_content(id) + pprint(api_response) + except ApiException as e: + print("Exception when calling SentEmailsControllerApi->get_sent_email_html_content: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | [**str**]()| | + +### Return type + +**str** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/html + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_sent_email_preview_ur_ls** +> EmailPreviewUrls get_sent_email_preview_ur_ls(id) + +Get sent email URL for viewing in browser or downloading + +Get a list of URLs for sent email content as text/html or raw SMTP message for viewing the message in a browser. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.SentEmailsControllerApi(api_client) + id = 'id_example' # str | + + try: + # Get sent email URL for viewing in browser or downloading + api_response = api_instance.get_sent_email_preview_ur_ls(id) + pprint(api_response) + except ApiException as e: + print("Exception when calling SentEmailsControllerApi->get_sent_email_preview_ur_ls: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | [**str**]()| | + +### Return type + +[**EmailPreviewUrls**](EmailPreviewUrls) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_sent_email_tracking_pixels** +> PageTrackingPixelProjection get_sent_email_tracking_pixels(id, page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before) + + + +Get all tracking pixels for a sent email in paginated form + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.SentEmailsControllerApi(api_client) + id = 'id_example' # str | +page = 0 # int | Optional page index in sent email tracking pixel list pagination (optional) (default to 0) +size = 20 # int | Optional page size in sent email tracking pixel list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +search_filter = 'search_filter_example' # str | Optional search filter (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) + + try: + api_response = api_instance.get_sent_email_tracking_pixels(id, page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling SentEmailsControllerApi->get_sent_email_tracking_pixels: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | [**str**]()| | + **page** | **int**| Optional page index in sent email tracking pixel list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in sent email tracking pixel list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **search_filter** | **str**| Optional search filter | [optional] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + +### Return type + +[**PageTrackingPixelProjection**](PageTrackingPixelProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_sent_emails** +> PageSentEmailProjection get_sent_emails(inbox_id=inbox_id, page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before) + +Get all sent emails in paginated form + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.SentEmailsControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | Optional inboxId to filter sender of sent emails by (optional) +page = 0 # int | Optional page index in inbox sent email list pagination (optional) (default to 0) +size = 20 # int | Optional page size in inbox sent email list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +search_filter = 'search_filter_example' # str | Optional search filter (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) + + try: + # Get all sent emails in paginated form + api_response = api_instance.get_sent_emails(inbox_id=inbox_id, page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling SentEmailsControllerApi->get_sent_emails: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| Optional inboxId to filter sender of sent emails by | [optional] + **page** | **int**| Optional page index in inbox sent email list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in inbox sent email list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **search_filter** | **str**| Optional search filter | [optional] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + +### Return type + +[**PageSentEmailProjection**](PageSentEmailProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_sent_emails_with_queue_results** +> PageSentEmailWithQueueProjection get_sent_emails_with_queue_results(page=page, size=size, sort=sort, since=since, before=before) + +Get results of email sent with queues in paginated form + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.SentEmailsControllerApi(api_client) + page = 0 # int | Optional page index in inbox sent email list pagination (optional) (default to 0) +size = 20 # int | Optional page size in inbox sent email list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) + + try: + # Get results of email sent with queues in paginated form + api_response = api_instance.get_sent_emails_with_queue_results(page=page, size=size, sort=sort, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling SentEmailsControllerApi->get_sent_emails_with_queue_results: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Optional page index in inbox sent email list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in inbox sent email list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + +### Return type + +[**PageSentEmailWithQueueProjection**](PageSentEmailWithQueueProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_sent_organization_emails** +> PageSentEmailProjection get_sent_organization_emails(inbox_id=inbox_id, page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before) + + + +Get all sent organization emails in paginated form + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.SentEmailsControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | Optional inboxId to filter sender of sent emails by (optional) +page = 0 # int | Optional page index in sent email list pagination (optional) (default to 0) +size = 20 # int | Optional page size in sent email list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +search_filter = 'search_filter_example' # str | Optional search filter (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) + + try: + api_response = api_instance.get_sent_organization_emails(inbox_id=inbox_id, page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling SentEmailsControllerApi->get_sent_organization_emails: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| Optional inboxId to filter sender of sent emails by | [optional] + **page** | **int**| Optional page index in sent email list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in sent email list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **search_filter** | **str**| Optional search filter | [optional] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + +### Return type + +[**PageSentEmailProjection**](PageSentEmailProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **wait_for_delivery_statuses** +> DeliveryStatusDto wait_for_delivery_statuses(sent_id=sent_id, inbox_id=inbox_id, timeout=timeout, index=index, since=since, before=before) + + + +Wait for delivery statuses + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.SentEmailsControllerApi(api_client) + sent_id = 'sent_id_example' # str | Optional sent email ID filter (optional) +inbox_id = 'inbox_id_example' # str | Optional inbox ID filter (optional) +timeout = 56 # int | Optional timeout milliseconds (optional) +index = 56 # int | Zero based index of the delivery status to wait for. If 1 delivery status already and you want to wait for the 2nd pass index=1 (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) + + try: + api_response = api_instance.wait_for_delivery_statuses(sent_id=sent_id, inbox_id=inbox_id, timeout=timeout, index=index, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling SentEmailsControllerApi->wait_for_delivery_statuses: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sent_id** | [**str**]()| Optional sent email ID filter | [optional] + **inbox_id** | [**str**]()| Optional inbox ID filter | [optional] + **timeout** | **int**| Optional timeout milliseconds | [optional] + **index** | **int**| Zero based index of the delivery status to wait for. If 1 delivery status already and you want to wait for the 2nd pass index=1 | [optional] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + +### Return type + +[**DeliveryStatusDto**](DeliveryStatusDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/SetInboxFavouritedOptions.md b/docs/SetInboxFavouritedOptions.md new file mode 100644 index 00000000..a25464f0 --- /dev/null +++ b/docs/SetInboxFavouritedOptions.md @@ -0,0 +1,11 @@ +# SetInboxFavouritedOptions + +Options for setting inbox favourite state +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | **bool** | Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/SimpleSendEmailOptions.md b/docs/SimpleSendEmailOptions.md new file mode 100644 index 00000000..00ac9f8f --- /dev/null +++ b/docs/SimpleSendEmailOptions.md @@ -0,0 +1,14 @@ +# SimpleSendEmailOptions + +Simplified send email options +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sender_id** | **str** | ID of inbox to send from. If null an inbox will be created for sending | [optional] +**to** | **str** | Email address to send to | +**body** | **str** | Body of the email message. Supports HTML | [optional] +**subject** | **str** | Subject line of the email | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/SmsControllerApi.md b/docs/SmsControllerApi.md new file mode 100644 index 00000000..904a508a --- /dev/null +++ b/docs/SmsControllerApi.md @@ -0,0 +1,330 @@ +# mailslurp_client.SmsControllerApi + +All URIs are relative to *https://python.api.mailslurp.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**delete_sms_message**](SmsControllerApi#delete_sms_message) | **DELETE** /sms/{smsId} | Delete SMS message. +[**delete_sms_messages**](SmsControllerApi#delete_sms_messages) | **DELETE** /sms | Delete all SMS messages +[**get_sms_message**](SmsControllerApi#get_sms_message) | **GET** /sms/{smsId} | Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController. +[**get_sms_messages_paginated**](SmsControllerApi#get_sms_messages_paginated) | **GET** /sms | Get all SMS messages in all phone numbers in paginated form. . + + +# **delete_sms_message** +> delete_sms_message(sms_id) + +Delete SMS message. + +Delete an SMS message + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.SmsControllerApi(api_client) + sms_id = 'sms_id_example' # str | + + try: + # Delete SMS message. + api_instance.delete_sms_message(sms_id) + except ApiException as e: + print("Exception when calling SmsControllerApi->delete_sms_message: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sms_id** | [**str**]()| | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **delete_sms_messages** +> delete_sms_messages(phone_number_id=phone_number_id) + +Delete all SMS messages + +Delete all SMS messages or all messages for a given phone number + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.SmsControllerApi(api_client) + phone_number_id = 'phone_number_id_example' # str | (optional) + + try: + # Delete all SMS messages + api_instance.delete_sms_messages(phone_number_id=phone_number_id) + except ApiException as e: + print("Exception when calling SmsControllerApi->delete_sms_messages: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **phone_number_id** | [**str**]()| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_sms_message** +> SmsDto get_sms_message(sms_id) + +Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController. + +Returns a SMS summary object with content. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.SmsControllerApi(api_client) + sms_id = 'sms_id_example' # str | + + try: + # Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController. + api_response = api_instance.get_sms_message(sms_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling SmsControllerApi->get_sms_message: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sms_id** | [**str**]()| | + +### Return type + +[**SmsDto**](SmsDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_sms_messages_paginated** +> PageSmsProjection get_sms_messages_paginated(phone_number=phone_number, page=page, size=size, sort=sort, unread_only=unread_only, since=since, before=before) + +Get all SMS messages in all phone numbers in paginated form. . + +By default returns all SMS messages across all phone numbers sorted by ascending created at date. Responses are paginated. You can restrict results to a list of phone number IDs. You can also filter out read messages + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.SmsControllerApi(api_client) + phone_number = 'phone_number_example' # str | Optional receiving phone number to filter SMS messages for (optional) +page = 0 # int | Optional page index in SMS list pagination (optional) (default to 0) +size = 20 # int | Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +unread_only = False # bool | Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly (optional) (default to False) +since = '2013-10-20T19:20:30+01:00' # datetime | Optional filter SMSs received after given date time (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Optional filter SMSs received before given date time (optional) + + try: + # Get all SMS messages in all phone numbers in paginated form. . + api_response = api_instance.get_sms_messages_paginated(phone_number=phone_number, page=page, size=size, sort=sort, unread_only=unread_only, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling SmsControllerApi->get_sms_messages_paginated: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **phone_number** | [**str**]()| Optional receiving phone number to filter SMS messages for | [optional] + **page** | **int**| Optional page index in SMS list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **unread_only** | **bool**| Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly | [optional] [default to False] + **since** | **datetime**| Optional filter SMSs received after given date time | [optional] + **before** | **datetime**| Optional filter SMSs received before given date time | [optional] + +### Return type + +[**PageSmsProjection**](PageSmsProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/SmsDto.md b/docs/SmsDto.md new file mode 100644 index 00000000..a61e1c0d --- /dev/null +++ b/docs/SmsDto.md @@ -0,0 +1,17 @@ +# SmsDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**user_id** | **str** | | +**phone_number** | **str** | | +**from_number** | **str** | | +**body** | **str** | | +**read** | **bool** | | +**created_at** | **datetime** | | +**updated_at** | **datetime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/SmsMatchOption.md b/docs/SmsMatchOption.md new file mode 100644 index 00000000..ddb8249e --- /dev/null +++ b/docs/SmsMatchOption.md @@ -0,0 +1,13 @@ +# SmsMatchOption + +Options for matching SMS messages in a phone number. Each match option object contains a `field`, `should` and `value` property. Together they form logical conditions such as `BODY` should `CONTAIN` value. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**field** | **str** | Fields of an SMS object that can be used to filter results | +**should** | **str** | How the value of the email field specified should be compared to the value given in the match options. | +**value** | **str** | The value you wish to compare with the value of the field specified using the `should` value passed. For example `BODY` should `CONTAIN` a value passed. | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/SmsPreview.md b/docs/SmsPreview.md new file mode 100644 index 00000000..cae7a899 --- /dev/null +++ b/docs/SmsPreview.md @@ -0,0 +1,15 @@ +# SmsPreview + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**user_id** | **str** | | +**body** | **str** | | +**phone_number** | **str** | | +**from_number** | **str** | | +**created_at** | **datetime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/SmsProjection.md b/docs/SmsProjection.md new file mode 100644 index 00000000..8fc8f91d --- /dev/null +++ b/docs/SmsProjection.md @@ -0,0 +1,17 @@ +# SmsProjection + +SMS projection +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**body** | **str** | | +**user_id** | **str** | | +**phone_number** | **str** | | +**created_at** | **datetime** | | +**from_number** | **str** | | +**read** | **bool** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/Sort.md b/docs/Sort.md new file mode 100644 index 00000000..467ce617 --- /dev/null +++ b/docs/Sort.md @@ -0,0 +1,12 @@ +# Sort + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**empty** | **bool** | | [optional] +**sorted** | **bool** | | [optional] +**unsorted** | **bool** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/TemplateControllerApi.md b/docs/TemplateControllerApi.md new file mode 100644 index 00000000..7b1d55ed --- /dev/null +++ b/docs/TemplateControllerApi.md @@ -0,0 +1,637 @@ +# mailslurp_client.TemplateControllerApi + +All URIs are relative to *https://python.api.mailslurp.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_template**](TemplateControllerApi#create_template) | **POST** /templates | Create a Template +[**delete_template**](TemplateControllerApi#delete_template) | **DELETE** /templates/{templateId} | Delete email template +[**get_all_templates**](TemplateControllerApi#get_all_templates) | **GET** /templates/paginated | List templates +[**get_template**](TemplateControllerApi#get_template) | **GET** /templates/{templateId} | Get template +[**get_template_preview_html**](TemplateControllerApi#get_template_preview_html) | **GET** /templates/{templateId}/preview/html | Get template preview HTML +[**get_template_preview_json**](TemplateControllerApi#get_template_preview_json) | **GET** /templates/{templateId}/preview/json | Get template preview Json +[**get_templates**](TemplateControllerApi#get_templates) | **GET** /templates | List templates +[**update_template**](TemplateControllerApi#update_template) | **PUT** /templates/{templateId} | Update template + + +# **create_template** +> TemplateDto create_template(create_template_options) + +Create a Template + +Create an email template with variables for use with templated transactional emails. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.TemplateControllerApi(api_client) + create_template_options = mailslurp_client.CreateTemplateOptions() # CreateTemplateOptions | + + try: + # Create a Template + api_response = api_instance.create_template(create_template_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling TemplateControllerApi->create_template: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_template_options** | [**CreateTemplateOptions**](CreateTemplateOptions)| | + +### Return type + +[**TemplateDto**](TemplateDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **delete_template** +> delete_template(template_id) + +Delete email template + +Delete template + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.TemplateControllerApi(api_client) + template_id = 'template_id_example' # str | Template ID + + try: + # Delete email template + api_instance.delete_template(template_id) + except ApiException as e: + print("Exception when calling TemplateControllerApi->delete_template: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **template_id** | [**str**]()| Template ID | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_all_templates** +> PageTemplateProjection get_all_templates(page=page, size=size, sort=sort, since=since, before=before) + +List templates + +Get all templates in paginated format + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.TemplateControllerApi(api_client) + page = 0 # int | Optional page index in list pagination (optional) (default to 0) +size = 20 # int | Optional page size in list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) + + try: + # List templates + api_response = api_instance.get_all_templates(page=page, size=size, sort=sort, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling TemplateControllerApi->get_all_templates: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Optional page index in list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + +### Return type + +[**PageTemplateProjection**](PageTemplateProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_template** +> TemplateDto get_template(template_id) + +Get template + +Get email template + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.TemplateControllerApi(api_client) + template_id = 'template_id_example' # str | Template ID + + try: + # Get template + api_response = api_instance.get_template(template_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling TemplateControllerApi->get_template: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **template_id** | [**str**]()| Template ID | + +### Return type + +[**TemplateDto**](TemplateDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_template_preview_html** +> str get_template_preview_html(template_id) + +Get template preview HTML + +Get email template preview with passed template variables in HTML format for browsers. Pass template variables as query params. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.TemplateControllerApi(api_client) + template_id = 'template_id_example' # str | Template ID + + try: + # Get template preview HTML + api_response = api_instance.get_template_preview_html(template_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling TemplateControllerApi->get_template_preview_html: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **template_id** | [**str**]()| Template ID | + +### Return type + +**str** + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/html;charset=utf-8, text/html + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_template_preview_json** +> TemplatePreview get_template_preview_json(template_id) + +Get template preview Json + +Get email template preview with passed template variables in JSON format. Pass template variables as query params. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.TemplateControllerApi(api_client) + template_id = 'template_id_example' # str | Template ID + + try: + # Get template preview Json + api_response = api_instance.get_template_preview_json(template_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling TemplateControllerApi->get_template_preview_json: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **template_id** | [**str**]()| Template ID | + +### Return type + +[**TemplatePreview**](TemplatePreview) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_templates** +> list[TemplateProjection] get_templates() + +List templates + +Get all templates + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.TemplateControllerApi(api_client) + + try: + # List templates + api_response = api_instance.get_templates() + pprint(api_response) + except ApiException as e: + print("Exception when calling TemplateControllerApi->get_templates: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**list[TemplateProjection]**](TemplateProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **update_template** +> TemplateDto update_template(template_id, create_template_options) + +Update template + +Update email template + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.TemplateControllerApi(api_client) + template_id = 'template_id_example' # str | Template ID +create_template_options = mailslurp_client.CreateTemplateOptions() # CreateTemplateOptions | + + try: + # Update template + api_response = api_instance.update_template(template_id, create_template_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling TemplateControllerApi->update_template: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **template_id** | [**str**]()| Template ID | + **create_template_options** | [**CreateTemplateOptions**](CreateTemplateOptions)| | + +### Return type + +[**TemplateDto**](TemplateDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/TemplateDto.md b/docs/TemplateDto.md new file mode 100644 index 00000000..3ece1873 --- /dev/null +++ b/docs/TemplateDto.md @@ -0,0 +1,15 @@ +# TemplateDto + +Email template +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | ID of template | +**name** | **str** | Template name | +**variables** | [**list[TemplateVariable]**](TemplateVariable) | Variables available in template that can be replaced with values | +**content** | **str** | Content of the template | +**created_at** | **datetime** | Created at time | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/TemplatePreview.md b/docs/TemplatePreview.md new file mode 100644 index 00000000..f86831d4 --- /dev/null +++ b/docs/TemplatePreview.md @@ -0,0 +1,10 @@ +# TemplatePreview + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**preview** | **str** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/TemplateProjection.md b/docs/TemplateProjection.md new file mode 100644 index 00000000..2d69457f --- /dev/null +++ b/docs/TemplateProjection.md @@ -0,0 +1,15 @@ +# TemplateProjection + +Email template data +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | +**id** | **str** | | +**variables** | **list[str]** | | +**created_at** | **datetime** | | +**updated_at** | **datetime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/TemplateVariable.md b/docs/TemplateVariable.md new file mode 100644 index 00000000..e42efb46 --- /dev/null +++ b/docs/TemplateVariable.md @@ -0,0 +1,12 @@ +# TemplateVariable + +Variable for use with email template +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of variable. This can be used in a template as {{name}} | +**variable_type** | **str** | The type of variable | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/TestNewInboxForwarderOptions.md b/docs/TestNewInboxForwarderOptions.md new file mode 100644 index 00000000..d8bcfce2 --- /dev/null +++ b/docs/TestNewInboxForwarderOptions.md @@ -0,0 +1,12 @@ +# TestNewInboxForwarderOptions + +Options for testing new inbox forwarder rules +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inbox_forwarder_test_options** | [**InboxForwarderTestOptions**](InboxForwarderTestOptions) | | +**create_inbox_forwarder_options** | [**CreateInboxForwarderOptions**](CreateInboxForwarderOptions) | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/TestNewInboxRulesetOptions.md b/docs/TestNewInboxRulesetOptions.md new file mode 100644 index 00000000..4426f2ba --- /dev/null +++ b/docs/TestNewInboxRulesetOptions.md @@ -0,0 +1,12 @@ +# TestNewInboxRulesetOptions + +Test inbox ruleset options +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inbox_ruleset_test_options** | [**InboxRulesetTestOptions**](InboxRulesetTestOptions) | | +**create_inbox_ruleset_options** | [**CreateInboxRulesetOptions**](CreateInboxRulesetOptions) | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/TestPhoneNumberOptions.md b/docs/TestPhoneNumberOptions.md new file mode 100644 index 00000000..812c9f99 --- /dev/null +++ b/docs/TestPhoneNumberOptions.md @@ -0,0 +1,10 @@ +# TestPhoneNumberOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/ThreadProjection.md b/docs/ThreadProjection.md new file mode 100644 index 00000000..b66e507f --- /dev/null +++ b/docs/ThreadProjection.md @@ -0,0 +1,21 @@ +# ThreadProjection + +A thread is a message thread created for a message received by an alias +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of thread | [optional] +**id** | **str** | ID of email thread | +**subject** | **str** | Thread subject | [optional] +**inbox_id** | **str** | Inbox ID | +**user_id** | **str** | User ID | +**to** | **list[str]** | To recipients | +**bcc** | **list[str]** | BCC recipients | [optional] +**cc** | **list[str]** | CC recipients | [optional] +**created_at** | **datetime** | Created at DateTime | +**updated_at** | **datetime** | Updated at DateTime | +**alias_id** | **str** | Alias ID | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/TrackingControllerApi.md b/docs/TrackingControllerApi.md new file mode 100644 index 00000000..818df46b --- /dev/null +++ b/docs/TrackingControllerApi.md @@ -0,0 +1,250 @@ +# mailslurp_client.TrackingControllerApi + +All URIs are relative to *https://python.api.mailslurp.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_tracking_pixel**](TrackingControllerApi#create_tracking_pixel) | **POST** /tracking/pixels | Create tracking pixel +[**get_all_tracking_pixels**](TrackingControllerApi#get_all_tracking_pixels) | **GET** /tracking/pixels | Get tracking pixels +[**get_tracking_pixel**](TrackingControllerApi#get_tracking_pixel) | **GET** /tracking/pixels/{id} | Get pixel + + +# **create_tracking_pixel** +> TrackingPixelDto create_tracking_pixel(create_tracking_pixel_options) + +Create tracking pixel + +Create a tracking pixel. A tracking pixel is an image that can be embedded in an email. When the email is viewed and the image is seen MailSlurp will mark the pixel as seen. Use tracking pixels to monitor email open events. You can receive open notifications via webhook or by fetching the pixel. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.TrackingControllerApi(api_client) + create_tracking_pixel_options = mailslurp_client.CreateTrackingPixelOptions() # CreateTrackingPixelOptions | + + try: + # Create tracking pixel + api_response = api_instance.create_tracking_pixel(create_tracking_pixel_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling TrackingControllerApi->create_tracking_pixel: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_tracking_pixel_options** | [**CreateTrackingPixelOptions**](CreateTrackingPixelOptions)| | + +### Return type + +[**TrackingPixelDto**](TrackingPixelDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_all_tracking_pixels** +> PageTrackingPixelProjection get_all_tracking_pixels(page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before) + +Get tracking pixels + +List tracking pixels in paginated form + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.TrackingControllerApi(api_client) + page = 0 # int | Optional page index in list pagination (optional) (default to 0) +size = 20 # int | Optional page size in list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +search_filter = 'search_filter_example' # str | Optional search filter (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) + + try: + # Get tracking pixels + api_response = api_instance.get_all_tracking_pixels(page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling TrackingControllerApi->get_all_tracking_pixels: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Optional page index in list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **search_filter** | **str**| Optional search filter | [optional] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + +### Return type + +[**PageTrackingPixelProjection**](PageTrackingPixelProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_tracking_pixel** +> TrackingPixelDto get_tracking_pixel(id) + +Get pixel + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.TrackingControllerApi(api_client) + id = 'id_example' # str | + + try: + # Get pixel + api_response = api_instance.get_tracking_pixel(id) + pprint(api_response) + except ApiException as e: + print("Exception when calling TrackingControllerApi->get_tracking_pixel: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | [**str**]()| | + +### Return type + +[**TrackingPixelDto**](TrackingPixelDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/TrackingPixelDto.md b/docs/TrackingPixelDto.md new file mode 100644 index 00000000..79558c3b --- /dev/null +++ b/docs/TrackingPixelDto.md @@ -0,0 +1,19 @@ +# TrackingPixelDto + +Tracking pixel +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**seen** | **bool** | | +**recipient** | **str** | | [optional] +**html** | **str** | | +**url** | **str** | | +**inbox_id** | **str** | | [optional] +**sent_email_id** | **str** | | [optional] +**seen_at** | **datetime** | | [optional] +**created_at** | **datetime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/TrackingPixelProjection.md b/docs/TrackingPixelProjection.md new file mode 100644 index 00000000..a082a258 --- /dev/null +++ b/docs/TrackingPixelProjection.md @@ -0,0 +1,19 @@ +# TrackingPixelProjection + +Tracking pixel data +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**id** | **str** | | +**inbox_id** | **str** | | [optional] +**user_id** | **str** | | +**sent_email_id** | **str** | | [optional] +**created_at** | **datetime** | | +**recipient** | **str** | | [optional] +**seen** | **bool** | | +**seen_at** | **datetime** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/UnknownMissedEmailProjection.md b/docs/UnknownMissedEmailProjection.md new file mode 100644 index 00000000..eaccb187 --- /dev/null +++ b/docs/UnknownMissedEmailProjection.md @@ -0,0 +1,15 @@ +# UnknownMissedEmailProjection + +Unknown missed email projection +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**_from** | **str** | | [optional] +**subject** | **str** | | [optional] +**to** | **list[str]** | | [optional] +**created_at** | **datetime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/UnreadCount.md b/docs/UnreadCount.md new file mode 100644 index 00000000..4f5067c1 --- /dev/null +++ b/docs/UnreadCount.md @@ -0,0 +1,11 @@ +# UnreadCount + +Number of unread emails +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/UnseenErrorCountDto.md b/docs/UnseenErrorCountDto.md new file mode 100644 index 00000000..12fc229b --- /dev/null +++ b/docs/UnseenErrorCountDto.md @@ -0,0 +1,11 @@ +# UnseenErrorCountDto + +Number of unseen errors +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/UpdateAliasOptions.md b/docs/UpdateAliasOptions.md new file mode 100644 index 00000000..98788515 --- /dev/null +++ b/docs/UpdateAliasOptions.md @@ -0,0 +1,11 @@ +# UpdateAliasOptions + +Update an email alias +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Optional name for alias | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/UpdateDomainOptions.md b/docs/UpdateDomainOptions.md new file mode 100644 index 00000000..c17cbd34 --- /dev/null +++ b/docs/UpdateDomainOptions.md @@ -0,0 +1,11 @@ +# UpdateDomainOptions + +Options for creating a domain to use with MailSlurp. You must have ownership access to this domain in order to verify it. Domains will not functionally currently until the domain has been verified. See https://www.mailslurp.com/guides/custom-domains for help. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**catch_all_inbox_id** | **str** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/UpdateGroupContacts.md b/docs/UpdateGroupContacts.md new file mode 100644 index 00000000..6b8a7350 --- /dev/null +++ b/docs/UpdateGroupContacts.md @@ -0,0 +1,11 @@ +# UpdateGroupContacts + +Update group contacts options. Pass a list of contact ids to replace existing group contacts. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**contact_ids** | **list[str]** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/UpdateInboxOptions.md b/docs/UpdateInboxOptions.md new file mode 100644 index 00000000..c4329e73 --- /dev/null +++ b/docs/UpdateInboxOptions.md @@ -0,0 +1,15 @@ +# UpdateInboxOptions + +Options for updating inbox properties +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search | [optional] +**description** | **str** | Description of an inbox for labelling and searching purposes | [optional] +**tags** | **list[str]** | Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. | [optional] +**expires_at** | **datetime** | Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email. | [optional] +**favourite** | **bool** | Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/UploadAttachmentOptions.md b/docs/UploadAttachmentOptions.md new file mode 100644 index 00000000..c5852157 --- /dev/null +++ b/docs/UploadAttachmentOptions.md @@ -0,0 +1,13 @@ +# UploadAttachmentOptions + +Options for uploading files for attachments. When sending emails with the API that require attachments first upload each attachment. Then use the returned attachment ID in your `SendEmailOptions` when sending an email. This way you can use attachments multiple times once they have been uploaded. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content_type** | **str** | Optional contentType for file. For instance `application/pdf` | [optional] +**filename** | **str** | Optional filename to save upload with. Will be the name that is shown in email clients | [optional] +**base64_contents** | **str** | Base64 encoded string of file contents. Typically this means reading the bytes or string content of a file and then converting that to a base64 encoded string. For examples of how to do this see https://www.mailslurp.com/guides/base64-file-uploads/ | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/UserInfoDto.md b/docs/UserInfoDto.md new file mode 100644 index 00000000..81a35485 --- /dev/null +++ b/docs/UserInfoDto.md @@ -0,0 +1,15 @@ +# UserInfoDto + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**email_address** | **str** | | +**account_state** | **str** | | +**subscription_type** | **str** | | [optional] +**account_type** | **str** | | +**created_at** | **datetime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/ValidateEmailAddressListOptions.md b/docs/ValidateEmailAddressListOptions.md new file mode 100644 index 00000000..12d0fa95 --- /dev/null +++ b/docs/ValidateEmailAddressListOptions.md @@ -0,0 +1,11 @@ +# ValidateEmailAddressListOptions + +Options for validating a list of email addresses +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email_address_list** | **list[str]** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/ValidateEmailAddressListResult.md b/docs/ValidateEmailAddressListResult.md new file mode 100644 index 00000000..43861817 --- /dev/null +++ b/docs/ValidateEmailAddressListResult.md @@ -0,0 +1,13 @@ +# ValidateEmailAddressListResult + +Result of validating a list of email addresses +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**valid_email_addresses** | **list[str]** | | +**invalid_email_addresses** | **list[str]** | | +**result_map_email_address_is_valid** | **dict(str, bool)** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/ValidationDto.md b/docs/ValidationDto.md new file mode 100644 index 00000000..38731f78 --- /dev/null +++ b/docs/ValidationDto.md @@ -0,0 +1,12 @@ +# ValidationDto + +Response object for email validation operation +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email_id** | **str** | ID of the email validated | +**html** | [**HTMLValidationResult**](HTMLValidationResult) | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/ValidationMessage.md b/docs/ValidationMessage.md new file mode 100644 index 00000000..9d7721d0 --- /dev/null +++ b/docs/ValidationMessage.md @@ -0,0 +1,12 @@ +# ValidationMessage + +Optional warnings resulting from HTML validation +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**line_number** | **int** | | +**message** | **str** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/VerifyEmailAddressOptions.md b/docs/VerifyEmailAddressOptions.md new file mode 100644 index 00000000..6cd36383 --- /dev/null +++ b/docs/VerifyEmailAddressOptions.md @@ -0,0 +1,14 @@ +# VerifyEmailAddressOptions + +Options for verifying that an email address exists at a remote mail server. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mail_server_domain** | **str** | | [optional] +**email_address** | **str** | | +**sender_email_address** | **str** | | [optional] +**port** | **int** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/VerifyWebhookSignatureOptions.md b/docs/VerifyWebhookSignatureOptions.md new file mode 100644 index 00000000..5a3076e4 --- /dev/null +++ b/docs/VerifyWebhookSignatureOptions.md @@ -0,0 +1,11 @@ +# VerifyWebhookSignatureOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message_id** | **str** | | +**signature** | **str** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/VerifyWebhookSignatureResults.md b/docs/VerifyWebhookSignatureResults.md new file mode 100644 index 00000000..2a22af52 --- /dev/null +++ b/docs/VerifyWebhookSignatureResults.md @@ -0,0 +1,10 @@ +# VerifyWebhookSignatureResults + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**is_valid** | **bool** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/WaitForConditions.md b/docs/WaitForConditions.md new file mode 100644 index 00000000..9cbb2d05 --- /dev/null +++ b/docs/WaitForConditions.md @@ -0,0 +1,20 @@ +# WaitForConditions + +Conditions to apply to emails that you are waiting for +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**inbox_id** | **str** | ID of inbox to search within and apply conditions to. Essentially filtering the emails found to give a count. | +**count** | **int** | Number of results that should match conditions. Either exactly or at least this amount based on the `countType`. If count condition is not met and the timeout has not been reached the `waitFor` method will retry the operation. | [optional] +**delay_timeout** | **int** | Max time in milliseconds to wait between retries if a `timeout` is specified. | [optional] +**timeout** | **int** | Max time in milliseconds to retry the `waitFor` operation until conditions are met. | +**unread_only** | **bool** | Apply conditions only to **unread** emails. All emails begin with `read=false`. An email is marked `read=true` when an `EmailDto` representation of it has been returned to the user at least once. For example you have called `getEmail` or `waitForLatestEmail` etc., or you have viewed the email in the dashboard. | [optional] +**count_type** | **str** | How result size should be compared with the expected size. Exactly or at-least matching result? | [optional] +**matches** | [**list[MatchOption]**](MatchOption) | Conditions that should be matched for an email to qualify for results. Each condition will be applied in order to each email within an inbox to filter a result list of matching emails you are waiting for. | [optional] +**sort_direction** | **str** | Direction to sort matching emails by created time | [optional] +**since** | **datetime** | ISO Date Time earliest time of email to consider. Filter for matching emails that were received after this date | [optional] +**before** | **datetime** | ISO Date Time latest time of email to consider. Filter for matching emails that were received before this date | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/WaitForControllerApi.md b/docs/WaitForControllerApi.md new file mode 100644 index 00000000..11349182 --- /dev/null +++ b/docs/WaitForControllerApi.md @@ -0,0 +1,702 @@ +# mailslurp_client.WaitForControllerApi + +All URIs are relative to *https://python.api.mailslurp.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**wait_for**](WaitForControllerApi#wait_for) | **POST** /waitFor | Wait for an email to match the provided filter conditions such as subject contains keyword. +[**wait_for_email_count**](WaitForControllerApi#wait_for_email_count) | **GET** /waitForEmailCount | Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs +[**wait_for_latest_email**](WaitForControllerApi#wait_for_latest_email) | **GET** /waitForLatestEmail | Fetch inbox's latest email or if empty wait for an email to arrive +[**wait_for_latest_sms**](WaitForControllerApi#wait_for_latest_sms) | **POST** /waitForLatestSms | Wait for the latest SMS message to match the provided filter conditions such as body contains keyword. +[**wait_for_matching_emails**](WaitForControllerApi#wait_for_matching_emails) | **POST** /waitForMatchingEmails | Wait or return list of emails that match simple matching patterns +[**wait_for_matching_first_email**](WaitForControllerApi#wait_for_matching_first_email) | **POST** /waitForMatchingFirstEmail | Wait for or return the first email that matches provided MatchOptions array +[**wait_for_nth_email**](WaitForControllerApi#wait_for_nth_email) | **GET** /waitForNthEmail | Wait for or fetch the email with a given index in the inbox specified. If index doesn't exist waits for it to exist or timeout to occur. +[**wait_for_sms**](WaitForControllerApi#wait_for_sms) | **POST** /waitForSms | Wait for an SMS message to match the provided filter conditions such as body contains keyword. + + +# **wait_for** +> list[EmailPreview] wait_for(wait_for_conditions) + +Wait for an email to match the provided filter conditions such as subject contains keyword. + +Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WaitForControllerApi(api_client) + wait_for_conditions = mailslurp_client.WaitForConditions() # WaitForConditions | + + try: + # Wait for an email to match the provided filter conditions such as subject contains keyword. + api_response = api_instance.wait_for(wait_for_conditions) + pprint(api_response) + except ApiException as e: + print("Exception when calling WaitForControllerApi->wait_for: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **wait_for_conditions** | [**WaitForConditions**](WaitForConditions)| | + +### Return type + +[**list[EmailPreview]**](EmailPreview) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **wait_for_email_count** +> list[EmailPreview] wait_for_email_count(inbox_id, count, timeout=timeout, unread_only=unread_only, before=before, since=since, sort=sort, delay=delay) + +Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs + +If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WaitForControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | Id of the inbox we are fetching emails from +count = 56 # int | Number of emails to wait for. Must be greater that 1 +timeout = 56 # int | Max milliseconds to wait (optional) +unread_only = False # bool | Optional filter for unread only (optional) (default to False) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter for emails that were received before the given timestamp (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Filter for emails that were received after the given timestamp (optional) +sort = 'sort_example' # str | Sort direction (optional) +delay = 56 # int | Max milliseconds delay between calls (optional) + + try: + # Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs + api_response = api_instance.wait_for_email_count(inbox_id, count, timeout=timeout, unread_only=unread_only, before=before, since=since, sort=sort, delay=delay) + pprint(api_response) + except ApiException as e: + print("Exception when calling WaitForControllerApi->wait_for_email_count: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| Id of the inbox we are fetching emails from | + **count** | **int**| Number of emails to wait for. Must be greater that 1 | + **timeout** | **int**| Max milliseconds to wait | [optional] + **unread_only** | **bool**| Optional filter for unread only | [optional] [default to False] + **before** | **datetime**| Filter for emails that were received before the given timestamp | [optional] + **since** | **datetime**| Filter for emails that were received after the given timestamp | [optional] + **sort** | **str**| Sort direction | [optional] + **delay** | **int**| Max milliseconds delay between calls | [optional] + +### Return type + +[**list[EmailPreview]**](EmailPreview) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **wait_for_latest_email** +> Email wait_for_latest_email(inbox_id=inbox_id, timeout=timeout, unread_only=unread_only, before=before, since=since, sort=sort, delay=delay) + +Fetch inbox's latest email or if empty wait for an email to arrive + +Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox set `unreadOnly=true` or see the other receive methods such as `waitForNthEmail` or `waitForEmailCount`. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WaitForControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | Id of the inbox we are fetching emails from (optional) +timeout = 56 # int | Max milliseconds to wait (optional) +unread_only = False # bool | Optional filter for unread only. (optional) (default to False) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter for emails that were before after the given timestamp (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Filter for emails that were received after the given timestamp (optional) +sort = 'sort_example' # str | Sort direction (optional) +delay = 56 # int | Max milliseconds delay between calls (optional) + + try: + # Fetch inbox's latest email or if empty wait for an email to arrive + api_response = api_instance.wait_for_latest_email(inbox_id=inbox_id, timeout=timeout, unread_only=unread_only, before=before, since=since, sort=sort, delay=delay) + pprint(api_response) + except ApiException as e: + print("Exception when calling WaitForControllerApi->wait_for_latest_email: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| Id of the inbox we are fetching emails from | [optional] + **timeout** | **int**| Max milliseconds to wait | [optional] + **unread_only** | **bool**| Optional filter for unread only. | [optional] [default to False] + **before** | **datetime**| Filter for emails that were before after the given timestamp | [optional] + **since** | **datetime**| Filter for emails that were received after the given timestamp | [optional] + **sort** | **str**| Sort direction | [optional] + **delay** | **int**| Max milliseconds delay between calls | [optional] + +### Return type + +[**Email**](Email) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **wait_for_latest_sms** +> SmsDto wait_for_latest_sms(wait_for_single_sms_options) + +Wait for the latest SMS message to match the provided filter conditions such as body contains keyword. + +Wait until a phone number meets given conditions or return immediately if already met + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WaitForControllerApi(api_client) + wait_for_single_sms_options = mailslurp_client.WaitForSingleSmsOptions() # WaitForSingleSmsOptions | + + try: + # Wait for the latest SMS message to match the provided filter conditions such as body contains keyword. + api_response = api_instance.wait_for_latest_sms(wait_for_single_sms_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling WaitForControllerApi->wait_for_latest_sms: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **wait_for_single_sms_options** | [**WaitForSingleSmsOptions**](WaitForSingleSmsOptions)| | + +### Return type + +[**SmsDto**](SmsDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **wait_for_matching_emails** +> list[EmailPreview] wait_for_matching_emails(inbox_id, count, match_options, before=before, since=since, sort=sort, delay=delay, timeout=timeout, unread_only=unread_only) + +Wait or return list of emails that match simple matching patterns + +Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WaitForControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | Id of the inbox we are fetching emails from +count = 56 # int | Number of emails to wait for. Must be greater or equal to 1 +match_options = mailslurp_client.MatchOptions() # MatchOptions | +before = '2013-10-20T19:20:30+01:00' # datetime | Filter for emails that were received before the given timestamp (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Filter for emails that were received after the given timestamp (optional) +sort = 'sort_example' # str | Sort direction (optional) +delay = 56 # int | Max milliseconds delay between calls (optional) +timeout = 56 # int | Max milliseconds to wait (optional) +unread_only = False # bool | Optional filter for unread only (optional) (default to False) + + try: + # Wait or return list of emails that match simple matching patterns + api_response = api_instance.wait_for_matching_emails(inbox_id, count, match_options, before=before, since=since, sort=sort, delay=delay, timeout=timeout, unread_only=unread_only) + pprint(api_response) + except ApiException as e: + print("Exception when calling WaitForControllerApi->wait_for_matching_emails: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| Id of the inbox we are fetching emails from | + **count** | **int**| Number of emails to wait for. Must be greater or equal to 1 | + **match_options** | [**MatchOptions**](MatchOptions)| | + **before** | **datetime**| Filter for emails that were received before the given timestamp | [optional] + **since** | **datetime**| Filter for emails that were received after the given timestamp | [optional] + **sort** | **str**| Sort direction | [optional] + **delay** | **int**| Max milliseconds delay between calls | [optional] + **timeout** | **int**| Max milliseconds to wait | [optional] + **unread_only** | **bool**| Optional filter for unread only | [optional] [default to False] + +### Return type + +[**list[EmailPreview]**](EmailPreview) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **wait_for_matching_first_email** +> Email wait_for_matching_first_email(inbox_id, match_options, timeout=timeout, unread_only=unread_only, since=since, before=before, sort=sort, delay=delay) + +Wait for or return the first email that matches provided MatchOptions array + +Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WaitForControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | Id of the inbox we are matching an email for +match_options = mailslurp_client.MatchOptions() # MatchOptions | +timeout = 56 # int | Max milliseconds to wait (optional) +unread_only = False # bool | Optional filter for unread only (optional) (default to False) +since = '2013-10-20T19:20:30+01:00' # datetime | Filter for emails that were received after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter for emails that were received before the given timestamp (optional) +sort = 'sort_example' # str | Sort direction (optional) +delay = 56 # int | Max milliseconds delay between calls (optional) + + try: + # Wait for or return the first email that matches provided MatchOptions array + api_response = api_instance.wait_for_matching_first_email(inbox_id, match_options, timeout=timeout, unread_only=unread_only, since=since, before=before, sort=sort, delay=delay) + pprint(api_response) + except ApiException as e: + print("Exception when calling WaitForControllerApi->wait_for_matching_first_email: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| Id of the inbox we are matching an email for | + **match_options** | [**MatchOptions**](MatchOptions)| | + **timeout** | **int**| Max milliseconds to wait | [optional] + **unread_only** | **bool**| Optional filter for unread only | [optional] [default to False] + **since** | **datetime**| Filter for emails that were received after the given timestamp | [optional] + **before** | **datetime**| Filter for emails that were received before the given timestamp | [optional] + **sort** | **str**| Sort direction | [optional] + **delay** | **int**| Max milliseconds delay between calls | [optional] + +### Return type + +[**Email**](Email) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **wait_for_nth_email** +> Email wait_for_nth_email(inbox_id=inbox_id, index=index, timeout=timeout, unread_only=unread_only, since=since, before=before, sort=sort, delay=delay) + +Wait for or fetch the email with a given index in the inbox specified. If index doesn't exist waits for it to exist or timeout to occur. + +If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WaitForControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | Id of the inbox you are fetching emails from (optional) +index = 0 # int | Zero based index of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass index=1 (optional) (default to 0) +timeout = 56 # int | Max milliseconds to wait for the nth email if not already present (optional) +unread_only = False # bool | Optional filter for unread only (optional) (default to False) +since = '2013-10-20T19:20:30+01:00' # datetime | Filter for emails that were received after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter for emails that were received before the given timestamp (optional) +sort = 'sort_example' # str | Sort direction (optional) +delay = 56 # int | Max milliseconds delay between calls (optional) + + try: + # Wait for or fetch the email with a given index in the inbox specified. If index doesn't exist waits for it to exist or timeout to occur. + api_response = api_instance.wait_for_nth_email(inbox_id=inbox_id, index=index, timeout=timeout, unread_only=unread_only, since=since, before=before, sort=sort, delay=delay) + pprint(api_response) + except ApiException as e: + print("Exception when calling WaitForControllerApi->wait_for_nth_email: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| Id of the inbox you are fetching emails from | [optional] + **index** | **int**| Zero based index of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass index=1 | [optional] [default to 0] + **timeout** | **int**| Max milliseconds to wait for the nth email if not already present | [optional] + **unread_only** | **bool**| Optional filter for unread only | [optional] [default to False] + **since** | **datetime**| Filter for emails that were received after the given timestamp | [optional] + **before** | **datetime**| Filter for emails that were received before the given timestamp | [optional] + **sort** | **str**| Sort direction | [optional] + **delay** | **int**| Max milliseconds delay between calls | [optional] + +### Return type + +[**Email**](Email) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **wait_for_sms** +> list[SmsPreview] wait_for_sms(wait_for_sms_conditions) + +Wait for an SMS message to match the provided filter conditions such as body contains keyword. + +Generic waitFor method that will wait until a phone number meets given conditions or return immediately if already met + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WaitForControllerApi(api_client) + wait_for_sms_conditions = mailslurp_client.WaitForSmsConditions() # WaitForSmsConditions | + + try: + # Wait for an SMS message to match the provided filter conditions such as body contains keyword. + api_response = api_instance.wait_for_sms(wait_for_sms_conditions) + pprint(api_response) + except ApiException as e: + print("Exception when calling WaitForControllerApi->wait_for_sms: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **wait_for_sms_conditions** | [**WaitForSmsConditions**](WaitForSmsConditions)| | + +### Return type + +[**list[SmsPreview]**](SmsPreview) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/WaitForSingleSmsOptions.md b/docs/WaitForSingleSmsOptions.md new file mode 100644 index 00000000..7547c44d --- /dev/null +++ b/docs/WaitForSingleSmsOptions.md @@ -0,0 +1,16 @@ +# WaitForSingleSmsOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**phone_number_id** | **str** | | +**timeout** | **int** | | +**unread_only** | **bool** | | [optional] +**before** | **datetime** | | [optional] +**since** | **datetime** | | [optional] +**sort_direction** | **str** | | [optional] +**delay** | **int** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/WaitForSmsConditions.md b/docs/WaitForSmsConditions.md new file mode 100644 index 00000000..a2e88aa3 --- /dev/null +++ b/docs/WaitForSmsConditions.md @@ -0,0 +1,21 @@ +# WaitForSmsConditions + +Conditions to apply to emails that you are waiting for +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**phone_number_id** | **str** | ID of phone number to search within and apply conditions to. Essentially filtering the SMS found to give a count. | +**limit** | **int** | Limit results | [optional] +**count** | **int** | Number of results that should match conditions. Either exactly or at least this amount based on the `countType`. If count condition is not met and the timeout has not been reached the `waitFor` method will retry the operation. | +**delay_timeout** | **int** | Max time in milliseconds to wait between retries if a `timeout` is specified. | [optional] +**timeout** | **int** | Max time in milliseconds to retry the `waitFor` operation until conditions are met. | +**unread_only** | **bool** | Apply conditions only to **unread** SMS. All SMS messages begin with `read=false`. An SMS is marked `read=true` when an `SMS` has been returned to the user at least once. For example you have called `getSms` or `waitForSms` etc., or you have viewed the SMS in the dashboard. | [optional] +**count_type** | **str** | How result size should be compared with the expected size. Exactly or at-least matching result? | [optional] +**matches** | [**list[SmsMatchOption]**](SmsMatchOption) | Conditions that should be matched for an SMS to qualify for results. Each condition will be applied in order to each SMS within a phone number to filter a result list of matching SMSs you are waiting for. | [optional] +**sort_direction** | **str** | Direction to sort matching SMSs by created time | [optional] +**since** | **datetime** | ISO Date Time earliest time of SMS to consider. Filter for matching SMSs that were received after this date | [optional] +**before** | **datetime** | ISO Date Time latest time of SMS to consider. Filter for matching SMSs that were received before this date | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/WebhookBouncePayload.md b/docs/WebhookBouncePayload.md new file mode 100644 index 00000000..6d9619a2 --- /dev/null +++ b/docs/WebhookBouncePayload.md @@ -0,0 +1,18 @@ +# WebhookBouncePayload + +BOUNCE webhook payload. Sent to your webhook url endpoint via HTTP POST when an email bounced or was rejected by a recipient. Save the recipients to a ban list on your server and avoid emailing them again. It is recommended you also listen to the BOUNCE_RECIPIENT payload. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message_id** | **str** | Idempotent message ID. Store this ID locally or in a database to prevent message duplication. | +**webhook_id** | **str** | ID of webhook entity being triggered | +**event_name** | **str** | Name of the event type webhook is being triggered for. | +**webhook_name** | **str** | Name of the webhook being triggered | [optional] +**bounce_id** | **str** | ID of the bounce email record. Use the ID with the bounce controller to view more information | +**sent_to_recipients** | **list[str]** | Email sent to recipients | [optional] +**sender** | **str** | Sender causing bounce | +**bounce_recipients** | **list[str]** | Email addresses that resulted in a bounce or email being rejected. Please save these recipients and avoid emailing them in the future to maintain your reputation. | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/WebhookBounceRecipientPayload.md b/docs/WebhookBounceRecipientPayload.md new file mode 100644 index 00000000..5392ab61 --- /dev/null +++ b/docs/WebhookBounceRecipientPayload.md @@ -0,0 +1,15 @@ +# WebhookBounceRecipientPayload + +BOUNCE_RECIPIENT webhook payload. Sent to your webhook url endpoint via HTTP POST when an email caused a bounce to occur for a recipient. Save the recipient to a ban list of your server and avoid email them again. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message_id** | **str** | Idempotent message ID. Store this ID locally or in a database to prevent message duplication. | +**webhook_id** | **str** | ID of webhook entity being triggered | +**event_name** | **str** | Name of the event type webhook is being triggered for. | +**webhook_name** | **str** | Name of the webhook being triggered | [optional] +**recipient** | **str** | Email address that caused a bounce. Make note of the address and try not to message it again to preserve your reputation. | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/WebhookControllerApi.md b/docs/WebhookControllerApi.md new file mode 100644 index 00000000..2e917def --- /dev/null +++ b/docs/WebhookControllerApi.md @@ -0,0 +1,2487 @@ +# mailslurp_client.WebhookControllerApi + +All URIs are relative to *https://python.api.mailslurp.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_account_webhook**](WebhookControllerApi#create_account_webhook) | **POST** /webhooks | Attach a WebHook URL to an inbox +[**create_webhook**](WebhookControllerApi#create_webhook) | **POST** /inboxes/{inboxId}/webhooks | Attach a WebHook URL to an inbox +[**create_webhook_for_phone_number**](WebhookControllerApi#create_webhook_for_phone_number) | **POST** /phone/numbers/{phoneNumberId}/webhooks | Attach a WebHook URL to a phone number +[**delete_all_webhooks**](WebhookControllerApi#delete_all_webhooks) | **DELETE** /webhooks | Delete all webhooks +[**delete_webhook**](WebhookControllerApi#delete_webhook) | **DELETE** /inboxes/{inboxId}/webhooks/{webhookId} | Delete and disable a Webhook for an Inbox +[**delete_webhook_by_id**](WebhookControllerApi#delete_webhook_by_id) | **DELETE** /webhooks/{webhookId} | Delete a webhook +[**get_all_webhook_results**](WebhookControllerApi#get_all_webhook_results) | **GET** /webhooks/results | Get results for all webhooks +[**get_all_webhooks**](WebhookControllerApi#get_all_webhooks) | **GET** /webhooks/paginated | List Webhooks Paginated +[**get_inbox_webhooks_paginated**](WebhookControllerApi#get_inbox_webhooks_paginated) | **GET** /inboxes/{inboxId}/webhooks/paginated | Get paginated webhooks for an Inbox +[**get_json_schema_for_webhook_event**](WebhookControllerApi#get_json_schema_for_webhook_event) | **POST** /webhooks/schema | +[**get_json_schema_for_webhook_payload**](WebhookControllerApi#get_json_schema_for_webhook_payload) | **POST** /webhooks/{webhookId}/schema | +[**get_phone_number_webhooks_paginated**](WebhookControllerApi#get_phone_number_webhooks_paginated) | **GET** /phone/numbers/{phoneId}/webhooks/paginated | Get paginated webhooks for a phone number +[**get_test_webhook_payload**](WebhookControllerApi#get_test_webhook_payload) | **GET** /webhooks/test | +[**get_test_webhook_payload_bounce**](WebhookControllerApi#get_test_webhook_payload_bounce) | **GET** /webhooks/test/email-bounce-payload | +[**get_test_webhook_payload_bounce_recipient**](WebhookControllerApi#get_test_webhook_payload_bounce_recipient) | **GET** /webhooks/test/email-bounce-recipient-payload | +[**get_test_webhook_payload_delivery_status**](WebhookControllerApi#get_test_webhook_payload_delivery_status) | **GET** /webhooks/test/delivery-status-payload | Get webhook test payload for delivery status event +[**get_test_webhook_payload_email_opened**](WebhookControllerApi#get_test_webhook_payload_email_opened) | **GET** /webhooks/test/email-opened-payload | +[**get_test_webhook_payload_email_read**](WebhookControllerApi#get_test_webhook_payload_email_read) | **GET** /webhooks/test/email-read-payload | +[**get_test_webhook_payload_for_webhook**](WebhookControllerApi#get_test_webhook_payload_for_webhook) | **POST** /webhooks/{webhookId}/example | +[**get_test_webhook_payload_new_attachment**](WebhookControllerApi#get_test_webhook_payload_new_attachment) | **GET** /webhooks/test/new-attachment-payload | Get webhook test payload for new attachment event +[**get_test_webhook_payload_new_contact**](WebhookControllerApi#get_test_webhook_payload_new_contact) | **GET** /webhooks/test/new-contact-payload | Get webhook test payload for new contact event +[**get_test_webhook_payload_new_email**](WebhookControllerApi#get_test_webhook_payload_new_email) | **GET** /webhooks/test/new-email-payload | Get webhook test payload for new email event +[**get_test_webhook_payload_new_sms**](WebhookControllerApi#get_test_webhook_payload_new_sms) | **GET** /webhooks/test/new-sms-payload | Get webhook test payload for new sms event +[**get_webhook**](WebhookControllerApi#get_webhook) | **GET** /webhooks/{webhookId} | Get a webhook +[**get_webhook_result**](WebhookControllerApi#get_webhook_result) | **GET** /webhooks/results/{webhookResultId} | Get a webhook result for a webhook +[**get_webhook_results**](WebhookControllerApi#get_webhook_results) | **GET** /webhooks/{webhookId}/results | Get a webhook results for a webhook +[**get_webhook_results_unseen_error_count**](WebhookControllerApi#get_webhook_results_unseen_error_count) | **GET** /webhooks/results/unseen-count | Get count of unseen webhook results with error status +[**get_webhooks**](WebhookControllerApi#get_webhooks) | **GET** /inboxes/{inboxId}/webhooks | Get all webhooks for an Inbox +[**redrive_webhook_result**](WebhookControllerApi#redrive_webhook_result) | **POST** /webhooks/results/{webhookResultId}/redrive | Get a webhook result and try to resend the original webhook payload +[**send_test_data**](WebhookControllerApi#send_test_data) | **POST** /webhooks/{webhookId}/test | Send webhook test data +[**update_webhook_headers**](WebhookControllerApi#update_webhook_headers) | **PUT** /webhooks/{webhookId}/headers | Update a webhook request headers +[**verify_webhook_signature**](WebhookControllerApi#verify_webhook_signature) | **POST** /webhooks/verify | Verify a webhook payload signature + + +# **create_account_webhook** +> WebhookDto create_account_webhook(create_webhook_options) + +Attach a WebHook URL to an inbox + +Get notified of account level events such as bounce and bounce recipient. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + create_webhook_options = mailslurp_client.CreateWebhookOptions() # CreateWebhookOptions | + + try: + # Attach a WebHook URL to an inbox + api_response = api_instance.create_account_webhook(create_webhook_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling WebhookControllerApi->create_account_webhook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_webhook_options** | [**CreateWebhookOptions**](CreateWebhookOptions)| | + +### Return type + +[**WebhookDto**](WebhookDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **create_webhook** +> WebhookDto create_webhook(inbox_id, create_webhook_options) + +Attach a WebHook URL to an inbox + +Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | +create_webhook_options = mailslurp_client.CreateWebhookOptions() # CreateWebhookOptions | + + try: + # Attach a WebHook URL to an inbox + api_response = api_instance.create_webhook(inbox_id, create_webhook_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling WebhookControllerApi->create_webhook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| | + **create_webhook_options** | [**CreateWebhookOptions**](CreateWebhookOptions)| | + +### Return type + +[**WebhookDto**](WebhookDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **create_webhook_for_phone_number** +> WebhookDto create_webhook_for_phone_number(phone_number_id, create_webhook_options) + +Attach a WebHook URL to a phone number + +Get notified whenever a phone number receives an SMS via a WebHook URL. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + phone_number_id = 'phone_number_id_example' # str | +create_webhook_options = mailslurp_client.CreateWebhookOptions() # CreateWebhookOptions | + + try: + # Attach a WebHook URL to a phone number + api_response = api_instance.create_webhook_for_phone_number(phone_number_id, create_webhook_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling WebhookControllerApi->create_webhook_for_phone_number: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **phone_number_id** | [**str**]()| | + **create_webhook_options** | [**CreateWebhookOptions**](CreateWebhookOptions)| | + +### Return type + +[**WebhookDto**](WebhookDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **delete_all_webhooks** +> delete_all_webhooks(before=before) + +Delete all webhooks + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + before = '2013-10-20T19:20:30+01:00' # datetime | before (optional) + + try: + # Delete all webhooks + api_instance.delete_all_webhooks(before=before) + except ApiException as e: + print("Exception when calling WebhookControllerApi->delete_all_webhooks: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **before** | **datetime**| before | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **delete_webhook** +> delete_webhook(inbox_id, webhook_id) + +Delete and disable a Webhook for an Inbox + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | +webhook_id = 'webhook_id_example' # str | + + try: + # Delete and disable a Webhook for an Inbox + api_instance.delete_webhook(inbox_id, webhook_id) + except ApiException as e: + print("Exception when calling WebhookControllerApi->delete_webhook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| | + **webhook_id** | [**str**]()| | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **delete_webhook_by_id** +> delete_webhook_by_id(webhook_id) + +Delete a webhook + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + webhook_id = 'webhook_id_example' # str | + + try: + # Delete a webhook + api_instance.delete_webhook_by_id(webhook_id) + except ApiException as e: + print("Exception when calling WebhookControllerApi->delete_webhook_by_id: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_id** | [**str**]()| | + +### Return type + +void (empty response body) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_all_webhook_results** +> PageWebhookResult get_all_webhook_results(page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before, unseen_only=unseen_only) + +Get results for all webhooks + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + page = 0 # int | Optional page index in list pagination (optional) (default to 0) +size = 20 # int | Optional page size in list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +search_filter = 'search_filter_example' # str | Optional search filter (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) +unseen_only = True # bool | Filter for unseen exceptions only (optional) + + try: + # Get results for all webhooks + api_response = api_instance.get_all_webhook_results(page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before, unseen_only=unseen_only) + pprint(api_response) + except ApiException as e: + print("Exception when calling WebhookControllerApi->get_all_webhook_results: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Optional page index in list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **search_filter** | **str**| Optional search filter | [optional] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + **unseen_only** | **bool**| Filter for unseen exceptions only | [optional] + +### Return type + +[**PageWebhookResult**](PageWebhookResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_all_webhooks** +> PageWebhookProjection get_all_webhooks(page=page, size=size, sort=sort, search_filter=search_filter, since=since, inbox_id=inbox_id, phone_id=phone_id, before=before) + +List Webhooks Paginated + +List webhooks in paginated form. Allows for page index, page size, and sort direction. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + page = 0 # int | Optional page index in list pagination (optional) (default to 0) +size = 20 # int | Optional page size for paginated result list. (optional) (default to 20) +sort = 'DESC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'DESC') +search_filter = 'search_filter_example' # str | Optional search filter (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +inbox_id = 'inbox_id_example' # str | Filter by inboxId (optional) +phone_id = 'phone_id_example' # str | Filter by phoneId (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) + + try: + # List Webhooks Paginated + api_response = api_instance.get_all_webhooks(page=page, size=size, sort=sort, search_filter=search_filter, since=since, inbox_id=inbox_id, phone_id=phone_id, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling WebhookControllerApi->get_all_webhooks: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| Optional page index in list pagination | [optional] [default to 0] + **size** | **int**| Optional page size for paginated result list. | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'DESC'] + **search_filter** | **str**| Optional search filter | [optional] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **inbox_id** | [**str**]()| Filter by inboxId | [optional] + **phone_id** | [**str**]()| Filter by phoneId | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + +### Return type + +[**PageWebhookProjection**](PageWebhookProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_inbox_webhooks_paginated** +> PageWebhookProjection get_inbox_webhooks_paginated(inbox_id, page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before) + +Get paginated webhooks for an Inbox + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | +page = 0 # int | Optional page index in list pagination (optional) (default to 0) +size = 20 # int | Optional page size in list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +search_filter = 'search_filter_example' # str | Optional search filter (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) + + try: + # Get paginated webhooks for an Inbox + api_response = api_instance.get_inbox_webhooks_paginated(inbox_id, page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling WebhookControllerApi->get_inbox_webhooks_paginated: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| | + **page** | **int**| Optional page index in list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **search_filter** | **str**| Optional search filter | [optional] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + +### Return type + +[**PageWebhookProjection**](PageWebhookProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_json_schema_for_webhook_event** +> JSONSchemaDto get_json_schema_for_webhook_event(event) + + + +Get JSON Schema definition for webhook payload by event + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + event = 'event_example' # str | + + try: + api_response = api_instance.get_json_schema_for_webhook_event(event) + pprint(api_response) + except ApiException as e: + print("Exception when calling WebhookControllerApi->get_json_schema_for_webhook_event: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **event** | **str**| | + +### Return type + +[**JSONSchemaDto**](JSONSchemaDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_json_schema_for_webhook_payload** +> JSONSchemaDto get_json_schema_for_webhook_payload(webhook_id) + + + +Get JSON Schema definition for webhook payload + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + webhook_id = 'webhook_id_example' # str | + + try: + api_response = api_instance.get_json_schema_for_webhook_payload(webhook_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling WebhookControllerApi->get_json_schema_for_webhook_payload: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_id** | [**str**]()| | + +### Return type + +[**JSONSchemaDto**](JSONSchemaDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_phone_number_webhooks_paginated** +> PageWebhookProjection get_phone_number_webhooks_paginated(phone_id, page=page, size=size, sort=sort, since=since, before=before) + +Get paginated webhooks for a phone number + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + phone_id = 'phone_id_example' # str | +page = 0 # int | Optional page index in list pagination (optional) (default to 0) +size = 20 # int | Optional page size in list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) + + try: + # Get paginated webhooks for a phone number + api_response = api_instance.get_phone_number_webhooks_paginated(phone_id, page=page, size=size, sort=sort, since=since, before=before) + pprint(api_response) + except ApiException as e: + print("Exception when calling WebhookControllerApi->get_phone_number_webhooks_paginated: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **phone_id** | [**str**]()| | + **page** | **int**| Optional page index in list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + +### Return type + +[**PageWebhookProjection**](PageWebhookProjection) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_test_webhook_payload** +> AbstractWebhookPayload get_test_webhook_payload(event_name=event_name) + + + +Get test webhook payload example. Response content depends on eventName passed. Uses `EMAIL_RECEIVED` as default. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + event_name = 'event_name_example' # str | (optional) + + try: + api_response = api_instance.get_test_webhook_payload(event_name=event_name) + pprint(api_response) + except ApiException as e: + print("Exception when calling WebhookControllerApi->get_test_webhook_payload: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **event_name** | **str**| | [optional] + +### Return type + +[**AbstractWebhookPayload**](AbstractWebhookPayload) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_test_webhook_payload_bounce** +> WebhookBouncePayload get_test_webhook_payload_bounce() + + + +Get webhook test payload for bounce + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + + try: + api_response = api_instance.get_test_webhook_payload_bounce() + pprint(api_response) + except ApiException as e: + print("Exception when calling WebhookControllerApi->get_test_webhook_payload_bounce: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**WebhookBouncePayload**](WebhookBouncePayload) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_test_webhook_payload_bounce_recipient** +> WebhookBounceRecipientPayload get_test_webhook_payload_bounce_recipient() + + + +Get webhook test payload for bounce recipient + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + + try: + api_response = api_instance.get_test_webhook_payload_bounce_recipient() + pprint(api_response) + except ApiException as e: + print("Exception when calling WebhookControllerApi->get_test_webhook_payload_bounce_recipient: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**WebhookBounceRecipientPayload**](WebhookBounceRecipientPayload) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_test_webhook_payload_delivery_status** +> WebhookDeliveryStatusPayload get_test_webhook_payload_delivery_status() + +Get webhook test payload for delivery status event + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + + try: + # Get webhook test payload for delivery status event + api_response = api_instance.get_test_webhook_payload_delivery_status() + pprint(api_response) + except ApiException as e: + print("Exception when calling WebhookControllerApi->get_test_webhook_payload_delivery_status: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**WebhookDeliveryStatusPayload**](WebhookDeliveryStatusPayload) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_test_webhook_payload_email_opened** +> WebhookEmailOpenedPayload get_test_webhook_payload_email_opened() + + + +Get webhook test payload for email opened event + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + + try: + api_response = api_instance.get_test_webhook_payload_email_opened() + pprint(api_response) + except ApiException as e: + print("Exception when calling WebhookControllerApi->get_test_webhook_payload_email_opened: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**WebhookEmailOpenedPayload**](WebhookEmailOpenedPayload) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_test_webhook_payload_email_read** +> WebhookEmailReadPayload get_test_webhook_payload_email_read() + + + +Get webhook test payload for email opened event + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + + try: + api_response = api_instance.get_test_webhook_payload_email_read() + pprint(api_response) + except ApiException as e: + print("Exception when calling WebhookControllerApi->get_test_webhook_payload_email_read: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**WebhookEmailReadPayload**](WebhookEmailReadPayload) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_test_webhook_payload_for_webhook** +> AbstractWebhookPayload get_test_webhook_payload_for_webhook(webhook_id) + + + +Get example payload for webhook + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + webhook_id = 'webhook_id_example' # str | + + try: + api_response = api_instance.get_test_webhook_payload_for_webhook(webhook_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling WebhookControllerApi->get_test_webhook_payload_for_webhook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_id** | [**str**]()| | + +### Return type + +[**AbstractWebhookPayload**](AbstractWebhookPayload) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_test_webhook_payload_new_attachment** +> WebhookNewAttachmentPayload get_test_webhook_payload_new_attachment() + +Get webhook test payload for new attachment event + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + + try: + # Get webhook test payload for new attachment event + api_response = api_instance.get_test_webhook_payload_new_attachment() + pprint(api_response) + except ApiException as e: + print("Exception when calling WebhookControllerApi->get_test_webhook_payload_new_attachment: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**WebhookNewAttachmentPayload**](WebhookNewAttachmentPayload) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_test_webhook_payload_new_contact** +> WebhookNewContactPayload get_test_webhook_payload_new_contact() + +Get webhook test payload for new contact event + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + + try: + # Get webhook test payload for new contact event + api_response = api_instance.get_test_webhook_payload_new_contact() + pprint(api_response) + except ApiException as e: + print("Exception when calling WebhookControllerApi->get_test_webhook_payload_new_contact: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**WebhookNewContactPayload**](WebhookNewContactPayload) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_test_webhook_payload_new_email** +> WebhookNewEmailPayload get_test_webhook_payload_new_email() + +Get webhook test payload for new email event + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + + try: + # Get webhook test payload for new email event + api_response = api_instance.get_test_webhook_payload_new_email() + pprint(api_response) + except ApiException as e: + print("Exception when calling WebhookControllerApi->get_test_webhook_payload_new_email: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**WebhookNewEmailPayload**](WebhookNewEmailPayload) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_test_webhook_payload_new_sms** +> WebhookNewSmsPayload get_test_webhook_payload_new_sms() + +Get webhook test payload for new sms event + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + + try: + # Get webhook test payload for new sms event + api_response = api_instance.get_test_webhook_payload_new_sms() + pprint(api_response) + except ApiException as e: + print("Exception when calling WebhookControllerApi->get_test_webhook_payload_new_sms: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**WebhookNewSmsPayload**](WebhookNewSmsPayload) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_webhook** +> WebhookDto get_webhook(webhook_id) + +Get a webhook + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + webhook_id = 'webhook_id_example' # str | + + try: + # Get a webhook + api_response = api_instance.get_webhook(webhook_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling WebhookControllerApi->get_webhook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_id** | [**str**]()| | + +### Return type + +[**WebhookDto**](WebhookDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_webhook_result** +> WebhookResultDto get_webhook_result(webhook_result_id) + +Get a webhook result for a webhook + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + webhook_result_id = 'webhook_result_id_example' # str | Webhook Result ID + + try: + # Get a webhook result for a webhook + api_response = api_instance.get_webhook_result(webhook_result_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling WebhookControllerApi->get_webhook_result: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_result_id** | [**str**]()| Webhook Result ID | + +### Return type + +[**WebhookResultDto**](WebhookResultDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_webhook_results** +> PageWebhookResult get_webhook_results(webhook_id, page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before, unseen_only=unseen_only) + +Get a webhook results for a webhook + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + webhook_id = 'webhook_id_example' # str | ID of webhook to get results for +page = 0 # int | Optional page index in list pagination (optional) (default to 0) +size = 20 # int | Optional page size in list pagination (optional) (default to 20) +sort = 'ASC' # str | Optional createdAt sort direction ASC or DESC (optional) (default to 'ASC') +search_filter = 'search_filter_example' # str | Optional search filter (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at after the given timestamp (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Filter by created at before the given timestamp (optional) +unseen_only = True # bool | Filter for unseen exceptions only (optional) + + try: + # Get a webhook results for a webhook + api_response = api_instance.get_webhook_results(webhook_id, page=page, size=size, sort=sort, search_filter=search_filter, since=since, before=before, unseen_only=unseen_only) + pprint(api_response) + except ApiException as e: + print("Exception when calling WebhookControllerApi->get_webhook_results: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_id** | [**str**]()| ID of webhook to get results for | + **page** | **int**| Optional page index in list pagination | [optional] [default to 0] + **size** | **int**| Optional page size in list pagination | [optional] [default to 20] + **sort** | **str**| Optional createdAt sort direction ASC or DESC | [optional] [default to 'ASC'] + **search_filter** | **str**| Optional search filter | [optional] + **since** | **datetime**| Filter by created at after the given timestamp | [optional] + **before** | **datetime**| Filter by created at before the given timestamp | [optional] + **unseen_only** | **bool**| Filter for unseen exceptions only | [optional] + +### Return type + +[**PageWebhookResult**](PageWebhookResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_webhook_results_unseen_error_count** +> UnseenErrorCountDto get_webhook_results_unseen_error_count() + +Get count of unseen webhook results with error status + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + + try: + # Get count of unseen webhook results with error status + api_response = api_instance.get_webhook_results_unseen_error_count() + pprint(api_response) + except ApiException as e: + print("Exception when calling WebhookControllerApi->get_webhook_results_unseen_error_count: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**UnseenErrorCountDto**](UnseenErrorCountDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **get_webhooks** +> list[WebhookDto] get_webhooks(inbox_id) + +Get all webhooks for an Inbox + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + inbox_id = 'inbox_id_example' # str | + + try: + # Get all webhooks for an Inbox + api_response = api_instance.get_webhooks(inbox_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling WebhookControllerApi->get_webhooks: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **inbox_id** | [**str**]()| | + +### Return type + +[**list[WebhookDto]**](WebhookDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **redrive_webhook_result** +> WebhookRedriveResult redrive_webhook_result(webhook_result_id) + +Get a webhook result and try to resend the original webhook payload + +Allows you to resend a webhook payload that was already sent. Webhooks that fail are retried automatically for 24 hours and then put in a dead letter queue. You can retry results manually using this method. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + webhook_result_id = 'webhook_result_id_example' # str | Webhook Result ID + + try: + # Get a webhook result and try to resend the original webhook payload + api_response = api_instance.redrive_webhook_result(webhook_result_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling WebhookControllerApi->redrive_webhook_result: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_result_id** | [**str**]()| Webhook Result ID | + +### Return type + +[**WebhookRedriveResult**](WebhookRedriveResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **send_test_data** +> WebhookTestResult send_test_data(webhook_id) + +Send webhook test data + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + webhook_id = 'webhook_id_example' # str | + + try: + # Send webhook test data + api_response = api_instance.send_test_data(webhook_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling WebhookControllerApi->send_test_data: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_id** | [**str**]()| | + +### Return type + +[**WebhookTestResult**](WebhookTestResult) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Created | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **update_webhook_headers** +> WebhookDto update_webhook_headers(webhook_id, webhook_headers) + +Update a webhook request headers + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + webhook_id = 'webhook_id_example' # str | +webhook_headers = mailslurp_client.WebhookHeaders() # WebhookHeaders | + + try: + # Update a webhook request headers + api_response = api_instance.update_webhook_headers(webhook_id, webhook_headers) + pprint(api_response) + except ApiException as e: + print("Exception when calling WebhookControllerApi->update_webhook_headers: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **webhook_id** | [**str**]()| | + **webhook_headers** | [**WebhookHeaders**](WebhookHeaders)| | + +### Return type + +[**WebhookDto**](WebhookDto) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + +# **verify_webhook_signature** +> VerifyWebhookSignatureResults verify_webhook_signature(verify_webhook_signature_options) + +Verify a webhook payload signature + +Verify a webhook payload using the messageId and signature. This allows you to be sure that MailSlurp sent the payload and not another server. + +### Example + +* Api Key Authentication (API_KEY): +```python +from __future__ import print_function +import time +import mailslurp_client +from mailslurp_client.rest import ApiException +from pprint import pprint +# Defining the host is optional and defaults to https://python.api.mailslurp.com +# See configuration.py for a list of all supported configuration parameters. +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: API_KEY +configuration = mailslurp_client.Configuration( + host = "https://python.api.mailslurp.com", + api_key = { + 'x-api-key': 'YOUR_API_KEY' + } +) +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['x-api-key'] = 'Bearer' + +# Enter a context with an instance of the API client +with mailslurp_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = mailslurp_client.WebhookControllerApi(api_client) + verify_webhook_signature_options = mailslurp_client.VerifyWebhookSignatureOptions() # VerifyWebhookSignatureOptions | + + try: + # Verify a webhook payload signature + api_response = api_instance.verify_webhook_signature(verify_webhook_signature_options) + pprint(api_response) + except ApiException as e: + print("Exception when calling WebhookControllerApi->verify_webhook_signature: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **verify_webhook_signature_options** | [**VerifyWebhookSignatureOptions**](VerifyWebhookSignatureOptions)| | + +### Return type + +[**VerifyWebhookSignatureResults**](VerifyWebhookSignatureResults) + +### Authorization + +[API_KEY](../README#API_KEY) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | + +[[Back to top]](#) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to Model list]](../README#documentation-for-models) [[Back to README]](../README) + diff --git a/docs/WebhookDeliveryStatusPayload.md b/docs/WebhookDeliveryStatusPayload.md new file mode 100644 index 00000000..148b573c --- /dev/null +++ b/docs/WebhookDeliveryStatusPayload.md @@ -0,0 +1,26 @@ +# WebhookDeliveryStatusPayload + +DELIVERY_STATUS webhook payload. Sent to your webhook url endpoint via HTTP POST when an email delivery status is created. This could be a successful delivery or a delivery failure. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message_id** | **str** | Idempotent message ID. Store this ID locally or in a database to prevent message duplication. | +**webhook_id** | **str** | ID of webhook entity being triggered | +**event_name** | **str** | Name of the event type webhook is being triggered for. | +**webhook_name** | **str** | Name of the webhook being triggered | [optional] +**id** | **str** | ID of delivery status | +**user_id** | **str** | User ID of event | +**sent_id** | **str** | ID of sent email | [optional] +**remote_mta_ip** | **str** | IP address of the remote Mail Transfer Agent | [optional] +**inbox_id** | **str** | Id of the inbox | [optional] +**reporting_mta** | **str** | Mail Transfer Agent reporting delivery status | [optional] +**recipients** | **list[str]** | Recipients for delivery | [optional] +**smtp_response** | **str** | SMTP server response message | [optional] +**smtp_status_code** | **int** | SMTP server status | [optional] +**processing_time_millis** | **int** | Time in milliseconds for delivery processing | [optional] +**received** | **datetime** | Time event was received | [optional] +**subject** | **str** | Email subject | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/WebhookDto.md b/docs/WebhookDto.md new file mode 100644 index 00000000..ba7916cd --- /dev/null +++ b/docs/WebhookDto.md @@ -0,0 +1,23 @@ +# WebhookDto + +Representation of a webhook for an inbox. The URL specified will be using by MailSlurp whenever an email is received by the attached inbox. A webhook entity should have a URL that points to your server. Your server should accept HTTP/S POST requests and return a success 200. MailSlurp will retry your webhooks if they fail. See https://python.api.mailslurp.com/schemas/webhook-payload for the payload schema. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | ID of the Webhook | +**user_id** | **str** | User ID of the Webhook | +**basic_auth** | **bool** | Does webhook expect basic authentication? If true it means you created this webhook with a username and password. MailSlurp will use these in the URL to authenticate itself. | +**name** | **str** | Name of the webhook | [optional] +**phone_id** | **str** | The phoneNumberId that the Webhook will be triggered by. If null then webhook triggered at account level or inbox level if inboxId set | [optional] +**inbox_id** | **str** | The inbox that the Webhook will be triggered by. If null then webhook triggered at account level or phone level if phoneId set | [optional] +**url** | **str** | URL of your server that the webhook will be sent to. The schema of the JSON that is sent is described by the payloadJsonSchema. | +**method** | **str** | HTTP method that your server endpoint must listen for | +**payload_json_schema** | **str** | Deprecated. Fetch JSON Schema for webhook using the getJsonSchemaForWebhookPayload method | +**created_at** | **datetime** | When the webhook was created | +**updated_at** | **datetime** | | +**event_name** | **str** | Webhook trigger event name | [optional] +**request_headers** | [**WebhookHeaders**](WebhookHeaders) | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/WebhookEmailOpenedPayload.md b/docs/WebhookEmailOpenedPayload.md new file mode 100644 index 00000000..0d3d1738 --- /dev/null +++ b/docs/WebhookEmailOpenedPayload.md @@ -0,0 +1,19 @@ +# WebhookEmailOpenedPayload + +EMAIL_OPENED webhook payload. Sent to your webhook url endpoint via HTTP POST when an email containing a tracking pixel is opened and the pixel image is loaded by a reader. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message_id** | **str** | Idempotent message ID. Store this ID locally or in a database to prevent message duplication. | +**webhook_id** | **str** | ID of webhook entity being triggered | +**event_name** | **str** | Name of the event type webhook is being triggered for. | +**webhook_name** | **str** | Name of the webhook being triggered | [optional] +**inbox_id** | **str** | Id of the inbox | +**pixel_id** | **str** | ID of the tracking pixel | +**sent_email_id** | **str** | ID of sent email | +**recipient** | **str** | Email address for the recipient of the tracking pixel | +**created_at** | **datetime** | Date time of event creation | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/WebhookEmailReadPayload.md b/docs/WebhookEmailReadPayload.md new file mode 100644 index 00000000..a4236a05 --- /dev/null +++ b/docs/WebhookEmailReadPayload.md @@ -0,0 +1,18 @@ +# WebhookEmailReadPayload + +EMAIL_READ webhook payload. Sent to your webhook url endpoint via HTTP POST when an email is read. This happens when an email is requested in full from the API or a user views the email in the dashboard. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message_id** | **str** | Idempotent message ID. Store this ID locally or in a database to prevent message duplication. | +**webhook_id** | **str** | ID of webhook entity being triggered | +**event_name** | **str** | Name of the event type webhook is being triggered for. | +**webhook_name** | **str** | Name of the webhook being triggered | [optional] +**email_id** | **str** | ID of the email that was received. Use this ID for fetching the email with the `EmailController`. | +**inbox_id** | **str** | Id of the inbox | +**email_is_read** | **bool** | Is the email read | +**created_at** | **datetime** | Date time of event creation | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/WebhookHeaderNameValue.md b/docs/WebhookHeaderNameValue.md new file mode 100644 index 00000000..5859edbd --- /dev/null +++ b/docs/WebhookHeaderNameValue.md @@ -0,0 +1,12 @@ +# WebhookHeaderNameValue + +Name value pair for webhook header +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of header | +**value** | **str** | Value of header | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/WebhookHeaders.md b/docs/WebhookHeaders.md new file mode 100644 index 00000000..f5e46174 --- /dev/null +++ b/docs/WebhookHeaders.md @@ -0,0 +1,11 @@ +# WebhookHeaders + +Webhook HTTP headers to include with each request from MailSlurp to your server +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**headers** | [**list[WebhookHeaderNameValue]**](WebhookHeaderNameValue) | List of header name value pairs to include with webhook requests | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/WebhookNewAttachmentPayload.md b/docs/WebhookNewAttachmentPayload.md new file mode 100644 index 00000000..ad90200b --- /dev/null +++ b/docs/WebhookNewAttachmentPayload.md @@ -0,0 +1,18 @@ +# WebhookNewAttachmentPayload + +NEW_ATTACHMENT webhook payload. Sent to your webhook url endpoint via HTTP POST when an email is received by the inbox that your webhook is attached to that contains an attachment. You can use the attachmentId to download the attachment. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message_id** | **str** | Idempotent message ID. Store this ID locally or in a database to prevent message duplication. | +**webhook_id** | **str** | ID of webhook entity being triggered | +**webhook_name** | **str** | Name of the webhook being triggered | [optional] +**event_name** | **str** | Name of the event type webhook is being triggered for. | +**attachment_id** | **str** | ID of attachment. Use the `AttachmentController` to | +**name** | **str** | Filename of the attachment if present | +**content_type** | **str** | Content type of attachment such as 'image/png' or 'application/pdf | +**content_length** | **int** | Size of attachment in bytes | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/WebhookNewContactPayload.md b/docs/WebhookNewContactPayload.md new file mode 100644 index 00000000..8b76d9bc --- /dev/null +++ b/docs/WebhookNewContactPayload.md @@ -0,0 +1,25 @@ +# WebhookNewContactPayload + +NEW_CONTACT webhook payload. Sent to your webhook url endpoint via HTTP POST when an email is received by the inbox that your webhook is attached to that contains a recipient that has not been saved as a contact. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message_id** | **str** | Idempotent message ID. Store this ID locally or in a database to prevent message duplication. | +**webhook_id** | **str** | ID of webhook entity being triggered | +**webhook_name** | **str** | Name of the webhook being triggered | [optional] +**event_name** | **str** | Name of the event type webhook is being triggered for. | +**contact_id** | **str** | Contact ID | +**group_id** | **str** | Contact group ID | [optional] +**first_name** | **str** | Contact first name | [optional] +**last_name** | **str** | Contact last name | [optional] +**company** | **str** | Contact company name | [optional] +**primary_email_address** | **str** | Primary email address for contact | [optional] +**email_addresses** | **list[str]** | Email addresses for contact | +**tags** | **list[str]** | Tags for contact | +**meta_data** | [**object**]() | | [optional] +**opt_out** | **bool** | Has contact opted out of emails | +**created_at** | **datetime** | Date time of event creation | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/WebhookNewEmailPayload.md b/docs/WebhookNewEmailPayload.md new file mode 100644 index 00000000..762a08e3 --- /dev/null +++ b/docs/WebhookNewEmailPayload.md @@ -0,0 +1,24 @@ +# WebhookNewEmailPayload + +NEW_EMAIL webhook payload. Sent to your webhook url endpoint via HTTP POST when an email is received by the inbox that your webhook is attached to. Use the email ID to fetch the full email body or attachments. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message_id** | **str** | Idempotent message ID. Store this ID locally or in a database to prevent message duplication. | +**webhook_id** | **str** | ID of webhook entity being triggered | +**event_name** | **str** | Name of the event type webhook is being triggered for. | +**webhook_name** | **str** | Name of the webhook being triggered | [optional] +**inbox_id** | **str** | Id of the inbox | +**domain_id** | **str** | Id of the domain that received an email | [optional] +**email_id** | **str** | ID of the email that was received. Use this ID for fetching the email with the `EmailController`. | +**created_at** | **datetime** | Date time of event creation | +**to** | **list[str]** | List of `To` recipient email addresses that the email was addressed to. See recipients object for names. | +**_from** | **str** | Who the email was sent from. An email address - see fromName for the sender name. | +**cc** | **list[str]** | List of `CC` recipients email addresses that the email was addressed to. See recipients object for names. | +**bcc** | **list[str]** | List of `BCC` recipients email addresses that the email was addressed to. See recipients object for names. | +**subject** | **str** | The subject line of the email message as specified by SMTP subject header | [optional] +**attachment_meta_datas** | [**list[AttachmentMetaData]**](AttachmentMetaData) | List of attachment meta data objects if attachments present | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/WebhookNewSmsPayload.md b/docs/WebhookNewSmsPayload.md new file mode 100644 index 00000000..1c11837d --- /dev/null +++ b/docs/WebhookNewSmsPayload.md @@ -0,0 +1,21 @@ +# WebhookNewSmsPayload + +NEW_SMS webhook payload. Sent to your webhook url endpoint via HTTP POST when an sms is received by the phone number that your webhook is attached to. Use the SMS ID to fetch the full SMS details. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message_id** | **str** | Idempotent message ID. Store this ID locally or in a database to prevent message duplication. | +**webhook_id** | **str** | ID of webhook entity being triggered | +**event_name** | **str** | Name of the event type webhook is being triggered for. | +**webhook_name** | **str** | Name of the webhook being triggered | [optional] +**sms_id** | **str** | ID of SMS message | +**user_id** | **str** | User ID of event | +**phone_number** | **str** | ID of phone number receiving SMS | +**to_number** | **str** | Recipient phone number | +**from_number** | **str** | Sender phone number | +**body** | **str** | SMS message body | +**read** | **bool** | SMS has been read | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/WebhookProjection.md b/docs/WebhookProjection.md new file mode 100644 index 00000000..963c43cd --- /dev/null +++ b/docs/WebhookProjection.md @@ -0,0 +1,18 @@ +# WebhookProjection + +Representation of a webhook +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**id** | **str** | | +**url** | **str** | | +**inbox_id** | **str** | | [optional] +**event_name** | **str** | | [optional] +**created_at** | **datetime** | | +**phone_number_id** | **str** | | [optional] +**updated_at** | **datetime** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/WebhookRedriveResult.md b/docs/WebhookRedriveResult.md new file mode 100644 index 00000000..55cb70f5 --- /dev/null +++ b/docs/WebhookRedriveResult.md @@ -0,0 +1,13 @@ +# WebhookRedriveResult + +Result of retrying webhook +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**webhook_result_id** | **str** | | +**success** | **bool** | | +**message** | **str** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/WebhookResultDto.md b/docs/WebhookResultDto.md new file mode 100644 index 00000000..8f685135 --- /dev/null +++ b/docs/WebhookResultDto.md @@ -0,0 +1,26 @@ +# WebhookResultDto + +Result of a webhook notification +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**user_id** | **str** | | +**inbox_id** | **str** | | [optional] +**webhook_id** | **str** | | +**webhook_url** | **str** | | +**message_id** | **str** | | +**redrive_id** | **str** | | [optional] +**http_method** | **str** | | +**webhook_event** | **str** | | +**response_status** | **int** | | [optional] +**response_time_millis** | **int** | | +**response_body_extract** | **str** | | [optional] +**result_type** | **str** | | [optional] +**created_at** | **datetime** | | +**updated_at** | **datetime** | | +**seen** | **bool** | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/WebhookTestRequest.md b/docs/WebhookTestRequest.md new file mode 100644 index 00000000..91a0498c --- /dev/null +++ b/docs/WebhookTestRequest.md @@ -0,0 +1,14 @@ +# WebhookTestRequest + +Result of webhook test request +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **str** | | +**method** | **str** | | +**headers** | **dict(str, str)** | | +**payload** | **str** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/WebhookTestResponse.md b/docs/WebhookTestResponse.md new file mode 100644 index 00000000..b629c3dc --- /dev/null +++ b/docs/WebhookTestResponse.md @@ -0,0 +1,12 @@ +# WebhookTestResponse + +Response from webhook test request +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status_code** | **int** | | [optional] +**message** | **str** | | [optional] + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/docs/WebhookTestResult.md b/docs/WebhookTestResult.md new file mode 100644 index 00000000..e14d76f1 --- /dev/null +++ b/docs/WebhookTestResult.md @@ -0,0 +1,13 @@ +# WebhookTestResult + +Results of testing a webhook +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | | [optional] +**response** | [**WebhookTestResponse**](WebhookTestResponse) | | +**request** | [**WebhookTestRequest**](WebhookTestRequest) | | + +[[Back to Model list]](../README#documentation-for-models) [[Back to API list]](../README#documentation-for-api-endpoints) [[Back to README]](../README) + + diff --git a/git_push.sh b/git_push.sh new file mode 100644 index 00000000..ced3be2b --- /dev/null +++ b/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/mailslurp_client/__init__.py b/mailslurp_client/__init__.py new file mode 100644 index 00000000..0376ed97 --- /dev/null +++ b/mailslurp_client/__init__.py @@ -0,0 +1,245 @@ +# coding: utf-8 + +# flake8: noqa + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +__version__ = "15.13.26" + +# import apis into sdk package +from mailslurp_client.api.alias_controller_api import AliasControllerApi +from mailslurp_client.api.attachment_controller_api import AttachmentControllerApi +from mailslurp_client.api.bounce_controller_api import BounceControllerApi +from mailslurp_client.api.bulk_actions_controller_api import BulkActionsControllerApi +from mailslurp_client.api.common_actions_controller_api import CommonActionsControllerApi +from mailslurp_client.api.contact_controller_api import ContactControllerApi +from mailslurp_client.api.domain_controller_api import DomainControllerApi +from mailslurp_client.api.email_controller_api import EmailControllerApi +from mailslurp_client.api.email_verification_controller_api import EmailVerificationControllerApi +from mailslurp_client.api.expired_controller_api import ExpiredControllerApi +from mailslurp_client.api.export_controller_api import ExportControllerApi +from mailslurp_client.api.form_controller_api import FormControllerApi +from mailslurp_client.api.group_controller_api import GroupControllerApi +from mailslurp_client.api.inbox_controller_api import InboxControllerApi +from mailslurp_client.api.inbox_forwarder_controller_api import InboxForwarderControllerApi +from mailslurp_client.api.inbox_ruleset_controller_api import InboxRulesetControllerApi +from mailslurp_client.api.mail_server_controller_api import MailServerControllerApi +from mailslurp_client.api.missed_email_controller_api import MissedEmailControllerApi +from mailslurp_client.api.phone_controller_api import PhoneControllerApi +from mailslurp_client.api.sent_emails_controller_api import SentEmailsControllerApi +from mailslurp_client.api.sms_controller_api import SmsControllerApi +from mailslurp_client.api.template_controller_api import TemplateControllerApi +from mailslurp_client.api.tracking_controller_api import TrackingControllerApi +from mailslurp_client.api.wait_for_controller_api import WaitForControllerApi +from mailslurp_client.api.webhook_controller_api import WebhookControllerApi +from mailslurp_client.api.api_user_controller_api import ApiUserControllerApi + +# import ApiClient +from mailslurp_client.api_client import ApiClient +from mailslurp_client.configuration import Configuration +from mailslurp_client.exceptions import OpenApiException +from mailslurp_client.exceptions import ApiTypeError +from mailslurp_client.exceptions import ApiValueError +from mailslurp_client.exceptions import ApiKeyError +from mailslurp_client.exceptions import ApiException +# import models into sdk package +from mailslurp_client.models.abstract_webhook_payload import AbstractWebhookPayload +from mailslurp_client.models.alias_dto import AliasDto +from mailslurp_client.models.alias_projection import AliasProjection +from mailslurp_client.models.attachment_entity import AttachmentEntity +from mailslurp_client.models.attachment_meta_data import AttachmentMetaData +from mailslurp_client.models.attachment_projection import AttachmentProjection +from mailslurp_client.models.basic_auth_options import BasicAuthOptions +from mailslurp_client.models.bounce_projection import BounceProjection +from mailslurp_client.models.bounce_recipient_projection import BounceRecipientProjection +from mailslurp_client.models.bounced_email_dto import BouncedEmailDto +from mailslurp_client.models.bounced_recipient_dto import BouncedRecipientDto +from mailslurp_client.models.bulk_send_email_options import BulkSendEmailOptions +from mailslurp_client.models.complaint import Complaint +from mailslurp_client.models.condition_option import ConditionOption +from mailslurp_client.models.contact_dto import ContactDto +from mailslurp_client.models.contact_projection import ContactProjection +from mailslurp_client.models.content_match_options import ContentMatchOptions +from mailslurp_client.models.count_dto import CountDto +from mailslurp_client.models.create_alias_options import CreateAliasOptions +from mailslurp_client.models.create_contact_options import CreateContactOptions +from mailslurp_client.models.create_domain_options import CreateDomainOptions +from mailslurp_client.models.create_emergency_address_options import CreateEmergencyAddressOptions +from mailslurp_client.models.create_group_options import CreateGroupOptions +from mailslurp_client.models.create_inbox_dto import CreateInboxDto +from mailslurp_client.models.create_inbox_forwarder_options import CreateInboxForwarderOptions +from mailslurp_client.models.create_inbox_ruleset_options import CreateInboxRulesetOptions +from mailslurp_client.models.create_template_options import CreateTemplateOptions +from mailslurp_client.models.create_tracking_pixel_options import CreateTrackingPixelOptions +from mailslurp_client.models.create_webhook_options import CreateWebhookOptions +from mailslurp_client.models.dns_lookup_options import DNSLookupOptions +from mailslurp_client.models.dns_lookup_result import DNSLookupResult +from mailslurp_client.models.dns_lookup_results import DNSLookupResults +from mailslurp_client.models.delivery_status_dto import DeliveryStatusDto +from mailslurp_client.models.describe_domain_options import DescribeDomainOptions +from mailslurp_client.models.describe_mail_server_domain_result import DescribeMailServerDomainResult +from mailslurp_client.models.domain_dto import DomainDto +from mailslurp_client.models.domain_name_record import DomainNameRecord +from mailslurp_client.models.domain_preview import DomainPreview +from mailslurp_client.models.download_attachment_dto import DownloadAttachmentDto +from mailslurp_client.models.email import Email +from mailslurp_client.models.email_analysis import EmailAnalysis +from mailslurp_client.models.email_content_match_result import EmailContentMatchResult +from mailslurp_client.models.email_html_dto import EmailHtmlDto +from mailslurp_client.models.email_links_result import EmailLinksResult +from mailslurp_client.models.email_preview import EmailPreview +from mailslurp_client.models.email_preview_urls import EmailPreviewUrls +from mailslurp_client.models.email_projection import EmailProjection +from mailslurp_client.models.email_recipients import EmailRecipients +from mailslurp_client.models.email_text_lines_result import EmailTextLinesResult +from mailslurp_client.models.email_validation_request import EmailValidationRequest +from mailslurp_client.models.email_verification_result import EmailVerificationResult +from mailslurp_client.models.emergency_address import EmergencyAddress +from mailslurp_client.models.emergency_address_dto import EmergencyAddressDto +from mailslurp_client.models.empty_response_dto import EmptyResponseDto +from mailslurp_client.models.expiration_defaults import ExpirationDefaults +from mailslurp_client.models.expired_inbox_dto import ExpiredInboxDto +from mailslurp_client.models.expired_inbox_record_projection import ExpiredInboxRecordProjection +from mailslurp_client.models.export_link import ExportLink +from mailslurp_client.models.export_options import ExportOptions +from mailslurp_client.models.filter_bounced_recipients_options import FilterBouncedRecipientsOptions +from mailslurp_client.models.filter_bounced_recipients_result import FilterBouncedRecipientsResult +from mailslurp_client.models.flush_expired_inboxes_result import FlushExpiredInboxesResult +from mailslurp_client.models.forward_email_options import ForwardEmailOptions +from mailslurp_client.models.gravatar_url import GravatarUrl +from mailslurp_client.models.group_contacts_dto import GroupContactsDto +from mailslurp_client.models.group_dto import GroupDto +from mailslurp_client.models.group_projection import GroupProjection +from mailslurp_client.models.html_validation_result import HTMLValidationResult +from mailslurp_client.models.ip_address_result import IPAddressResult +from mailslurp_client.models.imap_flag_operation_options import ImapFlagOperationOptions +from mailslurp_client.models.imap_smtp_access_details import ImapSmtpAccessDetails +from mailslurp_client.models.inbox_by_email_address_result import InboxByEmailAddressResult +from mailslurp_client.models.inbox_by_name_result import InboxByNameResult +from mailslurp_client.models.inbox_dto import InboxDto +from mailslurp_client.models.inbox_exists_dto import InboxExistsDto +from mailslurp_client.models.inbox_forwarder_dto import InboxForwarderDto +from mailslurp_client.models.inbox_forwarder_test_options import InboxForwarderTestOptions +from mailslurp_client.models.inbox_forwarder_test_result import InboxForwarderTestResult +from mailslurp_client.models.inbox_id_item import InboxIdItem +from mailslurp_client.models.inbox_ids_result import InboxIdsResult +from mailslurp_client.models.inbox_preview import InboxPreview +from mailslurp_client.models.inbox_ruleset_dto import InboxRulesetDto +from mailslurp_client.models.inbox_ruleset_test_options import InboxRulesetTestOptions +from mailslurp_client.models.inbox_ruleset_test_result import InboxRulesetTestResult +from mailslurp_client.models.inline_object import InlineObject +from mailslurp_client.models.inline_object1 import InlineObject1 +from mailslurp_client.models.json_schema_dto import JSONSchemaDto +from mailslurp_client.models.match_option import MatchOption +from mailslurp_client.models.match_options import MatchOptions +from mailslurp_client.models.missed_email import MissedEmail +from mailslurp_client.models.missed_email_projection import MissedEmailProjection +from mailslurp_client.models.name_server_record import NameServerRecord +from mailslurp_client.models.organization_inbox_projection import OrganizationInboxProjection +from mailslurp_client.models.page_alias import PageAlias +from mailslurp_client.models.page_attachment_entity import PageAttachmentEntity +from mailslurp_client.models.page_bounced_email import PageBouncedEmail +from mailslurp_client.models.page_bounced_recipients import PageBouncedRecipients +from mailslurp_client.models.page_complaint import PageComplaint +from mailslurp_client.models.page_contact_projection import PageContactProjection +from mailslurp_client.models.page_delivery_status import PageDeliveryStatus +from mailslurp_client.models.page_email_preview import PageEmailPreview +from mailslurp_client.models.page_email_projection import PageEmailProjection +from mailslurp_client.models.page_email_validation_request import PageEmailValidationRequest +from mailslurp_client.models.page_expired_inbox_record_projection import PageExpiredInboxRecordProjection +from mailslurp_client.models.page_group_projection import PageGroupProjection +from mailslurp_client.models.page_inbox_forwarder_dto import PageInboxForwarderDto +from mailslurp_client.models.page_inbox_projection import PageInboxProjection +from mailslurp_client.models.page_inbox_ruleset_dto import PageInboxRulesetDto +from mailslurp_client.models.page_missed_email_projection import PageMissedEmailProjection +from mailslurp_client.models.page_organization_inbox_projection import PageOrganizationInboxProjection +from mailslurp_client.models.page_phone_number_projection import PagePhoneNumberProjection +from mailslurp_client.models.page_sent_email_projection import PageSentEmailProjection +from mailslurp_client.models.page_sent_email_with_queue_projection import PageSentEmailWithQueueProjection +from mailslurp_client.models.page_sms_projection import PageSmsProjection +from mailslurp_client.models.page_template_projection import PageTemplateProjection +from mailslurp_client.models.page_thread_projection import PageThreadProjection +from mailslurp_client.models.page_tracking_pixel_projection import PageTrackingPixelProjection +from mailslurp_client.models.page_unknown_missed_email_projection import PageUnknownMissedEmailProjection +from mailslurp_client.models.page_webhook_projection import PageWebhookProjection +from mailslurp_client.models.page_webhook_result import PageWebhookResult +from mailslurp_client.models.pageable_object import PageableObject +from mailslurp_client.models.phone_number_dto import PhoneNumberDto +from mailslurp_client.models.phone_number_projection import PhoneNumberProjection +from mailslurp_client.models.phone_plan_dto import PhonePlanDto +from mailslurp_client.models.raw_email_json import RawEmailJson +from mailslurp_client.models.recipient import Recipient +from mailslurp_client.models.reply_to_alias_email_options import ReplyToAliasEmailOptions +from mailslurp_client.models.reply_to_email_options import ReplyToEmailOptions +from mailslurp_client.models.send_email_options import SendEmailOptions +from mailslurp_client.models.send_smtp_envelope_options import SendSMTPEnvelopeOptions +from mailslurp_client.models.send_with_queue_result import SendWithQueueResult +from mailslurp_client.models.sender import Sender +from mailslurp_client.models.sent_email_dto import SentEmailDto +from mailslurp_client.models.sent_email_projection import SentEmailProjection +from mailslurp_client.models.set_inbox_favourited_options import SetInboxFavouritedOptions +from mailslurp_client.models.simple_send_email_options import SimpleSendEmailOptions +from mailslurp_client.models.sms_dto import SmsDto +from mailslurp_client.models.sms_match_option import SmsMatchOption +from mailslurp_client.models.sms_preview import SmsPreview +from mailslurp_client.models.sms_projection import SmsProjection +from mailslurp_client.models.sort import Sort +from mailslurp_client.models.template_dto import TemplateDto +from mailslurp_client.models.template_preview import TemplatePreview +from mailslurp_client.models.template_projection import TemplateProjection +from mailslurp_client.models.template_variable import TemplateVariable +from mailslurp_client.models.test_new_inbox_forwarder_options import TestNewInboxForwarderOptions +from mailslurp_client.models.test_new_inbox_ruleset_options import TestNewInboxRulesetOptions +from mailslurp_client.models.test_phone_number_options import TestPhoneNumberOptions +from mailslurp_client.models.thread_projection import ThreadProjection +from mailslurp_client.models.tracking_pixel_dto import TrackingPixelDto +from mailslurp_client.models.tracking_pixel_projection import TrackingPixelProjection +from mailslurp_client.models.unknown_missed_email_projection import UnknownMissedEmailProjection +from mailslurp_client.models.unread_count import UnreadCount +from mailslurp_client.models.unseen_error_count_dto import UnseenErrorCountDto +from mailslurp_client.models.update_alias_options import UpdateAliasOptions +from mailslurp_client.models.update_domain_options import UpdateDomainOptions +from mailslurp_client.models.update_group_contacts import UpdateGroupContacts +from mailslurp_client.models.update_inbox_options import UpdateInboxOptions +from mailslurp_client.models.upload_attachment_options import UploadAttachmentOptions +from mailslurp_client.models.user_info_dto import UserInfoDto +from mailslurp_client.models.validate_email_address_list_options import ValidateEmailAddressListOptions +from mailslurp_client.models.validate_email_address_list_result import ValidateEmailAddressListResult +from mailslurp_client.models.validation_dto import ValidationDto +from mailslurp_client.models.validation_message import ValidationMessage +from mailslurp_client.models.verify_email_address_options import VerifyEmailAddressOptions +from mailslurp_client.models.verify_webhook_signature_options import VerifyWebhookSignatureOptions +from mailslurp_client.models.verify_webhook_signature_results import VerifyWebhookSignatureResults +from mailslurp_client.models.wait_for_conditions import WaitForConditions +from mailslurp_client.models.wait_for_single_sms_options import WaitForSingleSmsOptions +from mailslurp_client.models.wait_for_sms_conditions import WaitForSmsConditions +from mailslurp_client.models.webhook_bounce_payload import WebhookBouncePayload +from mailslurp_client.models.webhook_bounce_recipient_payload import WebhookBounceRecipientPayload +from mailslurp_client.models.webhook_delivery_status_payload import WebhookDeliveryStatusPayload +from mailslurp_client.models.webhook_dto import WebhookDto +from mailslurp_client.models.webhook_email_opened_payload import WebhookEmailOpenedPayload +from mailslurp_client.models.webhook_email_read_payload import WebhookEmailReadPayload +from mailslurp_client.models.webhook_header_name_value import WebhookHeaderNameValue +from mailslurp_client.models.webhook_headers import WebhookHeaders +from mailslurp_client.models.webhook_new_attachment_payload import WebhookNewAttachmentPayload +from mailslurp_client.models.webhook_new_contact_payload import WebhookNewContactPayload +from mailslurp_client.models.webhook_new_email_payload import WebhookNewEmailPayload +from mailslurp_client.models.webhook_new_sms_payload import WebhookNewSmsPayload +from mailslurp_client.models.webhook_projection import WebhookProjection +from mailslurp_client.models.webhook_redrive_result import WebhookRedriveResult +from mailslurp_client.models.webhook_result_dto import WebhookResultDto +from mailslurp_client.models.webhook_test_request import WebhookTestRequest +from mailslurp_client.models.webhook_test_response import WebhookTestResponse +from mailslurp_client.models.webhook_test_result import WebhookTestResult + diff --git a/mailslurp_client/api/__init__.py b/mailslurp_client/api/__init__.py new file mode 100644 index 00000000..c2aa256e --- /dev/null +++ b/mailslurp_client/api/__init__.py @@ -0,0 +1,31 @@ +from __future__ import absolute_import + +# flake8: noqa + +# import apis into api package +from mailslurp_client.api.alias_controller_api import AliasControllerApi +from mailslurp_client.api.attachment_controller_api import AttachmentControllerApi +from mailslurp_client.api.bounce_controller_api import BounceControllerApi +from mailslurp_client.api.bulk_actions_controller_api import BulkActionsControllerApi +from mailslurp_client.api.common_actions_controller_api import CommonActionsControllerApi +from mailslurp_client.api.contact_controller_api import ContactControllerApi +from mailslurp_client.api.domain_controller_api import DomainControllerApi +from mailslurp_client.api.email_controller_api import EmailControllerApi +from mailslurp_client.api.email_verification_controller_api import EmailVerificationControllerApi +from mailslurp_client.api.expired_controller_api import ExpiredControllerApi +from mailslurp_client.api.export_controller_api import ExportControllerApi +from mailslurp_client.api.form_controller_api import FormControllerApi +from mailslurp_client.api.group_controller_api import GroupControllerApi +from mailslurp_client.api.inbox_controller_api import InboxControllerApi +from mailslurp_client.api.inbox_forwarder_controller_api import InboxForwarderControllerApi +from mailslurp_client.api.inbox_ruleset_controller_api import InboxRulesetControllerApi +from mailslurp_client.api.mail_server_controller_api import MailServerControllerApi +from mailslurp_client.api.missed_email_controller_api import MissedEmailControllerApi +from mailslurp_client.api.phone_controller_api import PhoneControllerApi +from mailslurp_client.api.sent_emails_controller_api import SentEmailsControllerApi +from mailslurp_client.api.sms_controller_api import SmsControllerApi +from mailslurp_client.api.template_controller_api import TemplateControllerApi +from mailslurp_client.api.tracking_controller_api import TrackingControllerApi +from mailslurp_client.api.wait_for_controller_api import WaitForControllerApi +from mailslurp_client.api.webhook_controller_api import WebhookControllerApi +from mailslurp_client.api.api_user_controller_api import ApiUserControllerApi diff --git a/mailslurp_client/api/alias_controller_api.py b/mailslurp_client/api/alias_controller_api.py new file mode 100644 index 00000000..955f7003 --- /dev/null +++ b/mailslurp_client/api/alias_controller_api.py @@ -0,0 +1,1174 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from mailslurp_client.api_client import ApiClient +from mailslurp_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class AliasControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_alias(self, create_alias_options, **kwargs): # noqa: E501 + """Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active. # noqa: E501 + + Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_alias(create_alias_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param CreateAliasOptions create_alias_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: AliasDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_alias_with_http_info(create_alias_options, **kwargs) # noqa: E501 + + def create_alias_with_http_info(self, create_alias_options, **kwargs): # noqa: E501 + """Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active. # noqa: E501 + + Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_alias_with_http_info(create_alias_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param CreateAliasOptions create_alias_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(AliasDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'create_alias_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_alias" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'create_alias_options' is set + if self.api_client.client_side_validation and ('create_alias_options' not in local_var_params or # noqa: E501 + local_var_params['create_alias_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `create_alias_options` when calling `create_alias`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'create_alias_options' in local_var_params: + body_params = local_var_params['create_alias_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/aliases', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AliasDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_alias(self, alias_id, **kwargs): # noqa: E501 + """Delete an email alias # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_alias(alias_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str alias_id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_alias_with_http_info(alias_id, **kwargs) # noqa: E501 + + def delete_alias_with_http_info(self, alias_id, **kwargs): # noqa: E501 + """Delete an email alias # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_alias_with_http_info(alias_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str alias_id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'alias_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_alias" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'alias_id' is set + if self.api_client.client_side_validation and ('alias_id' not in local_var_params or # noqa: E501 + local_var_params['alias_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `alias_id` when calling `delete_alias`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'alias_id' in local_var_params: + path_params['aliasId'] = local_var_params['alias_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/aliases/{aliasId}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_alias(self, alias_id, **kwargs): # noqa: E501 + """Get an email alias # noqa: E501 + + Get an email alias by ID # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_alias(alias_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str alias_id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: AliasDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_alias_with_http_info(alias_id, **kwargs) # noqa: E501 + + def get_alias_with_http_info(self, alias_id, **kwargs): # noqa: E501 + """Get an email alias # noqa: E501 + + Get an email alias by ID # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_alias_with_http_info(alias_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str alias_id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(AliasDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'alias_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_alias" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'alias_id' is set + if self.api_client.client_side_validation and ('alias_id' not in local_var_params or # noqa: E501 + local_var_params['alias_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `alias_id` when calling `get_alias`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'alias_id' in local_var_params: + path_params['aliasId'] = local_var_params['alias_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/aliases/{aliasId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AliasDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_alias_emails(self, alias_id, **kwargs): # noqa: E501 + """Get emails for an alias # noqa: E501 + + Get paginated emails for an alias by ID # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_alias_emails(alias_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str alias_id: (required) + :param int page: Optional page index alias email list pagination + :param int size: Optional page size alias email list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Optional filter by sent after given date time + :param datetime before: Optional filter by sent before given date time + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageEmailProjection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_alias_emails_with_http_info(alias_id, **kwargs) # noqa: E501 + + def get_alias_emails_with_http_info(self, alias_id, **kwargs): # noqa: E501 + """Get emails for an alias # noqa: E501 + + Get paginated emails for an alias by ID # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_alias_emails_with_http_info(alias_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str alias_id: (required) + :param int page: Optional page index alias email list pagination + :param int size: Optional page size alias email list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Optional filter by sent after given date time + :param datetime before: Optional filter by sent before given date time + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageEmailProjection, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'alias_id', + 'page', + 'size', + 'sort', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_alias_emails" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'alias_id' is set + if self.api_client.client_side_validation and ('alias_id' not in local_var_params or # noqa: E501 + local_var_params['alias_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `alias_id` when calling `get_alias_emails`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'alias_id' in local_var_params: + path_params['aliasId'] = local_var_params['alias_id'] # noqa: E501 + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/aliases/{aliasId}/emails', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageEmailProjection', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_alias_threads(self, alias_id, **kwargs): # noqa: E501 + """Get threads created for an alias # noqa: E501 + + Returns threads created for an email alias in paginated form # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_alias_threads(alias_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str alias_id: (required) + :param int page: Optional page index in thread list pagination + :param int size: Optional page size in thread list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Optional filter by sent after given date time + :param datetime before: Optional filter by sent before given date time + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageThreadProjection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_alias_threads_with_http_info(alias_id, **kwargs) # noqa: E501 + + def get_alias_threads_with_http_info(self, alias_id, **kwargs): # noqa: E501 + """Get threads created for an alias # noqa: E501 + + Returns threads created for an email alias in paginated form # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_alias_threads_with_http_info(alias_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str alias_id: (required) + :param int page: Optional page index in thread list pagination + :param int size: Optional page size in thread list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Optional filter by sent after given date time + :param datetime before: Optional filter by sent before given date time + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageThreadProjection, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'alias_id', + 'page', + 'size', + 'sort', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_alias_threads" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'alias_id' is set + if self.api_client.client_side_validation and ('alias_id' not in local_var_params or # noqa: E501 + local_var_params['alias_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `alias_id` when calling `get_alias_threads`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'alias_id' in local_var_params: + path_params['aliasId'] = local_var_params['alias_id'] # noqa: E501 + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/aliases/{aliasId}/threads', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageThreadProjection', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_aliases(self, **kwargs): # noqa: E501 + """Get all email aliases you have created # noqa: E501 + + Get all email aliases in paginated form # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_aliases(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in alias list pagination + :param int size: Optional page size in alias list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageAlias + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_aliases_with_http_info(**kwargs) # noqa: E501 + + def get_aliases_with_http_info(self, **kwargs): # noqa: E501 + """Get all email aliases you have created # noqa: E501 + + Get all email aliases in paginated form # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_aliases_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in alias list pagination + :param int size: Optional page size in alias list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageAlias, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page', + 'size', + 'sort', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_aliases" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/aliases', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageAlias', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def reply_to_alias_email(self, alias_id, email_id, reply_to_alias_email_options, **kwargs): # noqa: E501 + """Reply to an email # noqa: E501 + + Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.reply_to_alias_email(alias_id, email_id, reply_to_alias_email_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str alias_id: ID of the alias that email belongs to (required) + :param str email_id: ID of the email that should be replied to (required) + :param ReplyToAliasEmailOptions reply_to_alias_email_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: SentEmailDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.reply_to_alias_email_with_http_info(alias_id, email_id, reply_to_alias_email_options, **kwargs) # noqa: E501 + + def reply_to_alias_email_with_http_info(self, alias_id, email_id, reply_to_alias_email_options, **kwargs): # noqa: E501 + """Reply to an email # noqa: E501 + + Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.reply_to_alias_email_with_http_info(alias_id, email_id, reply_to_alias_email_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str alias_id: ID of the alias that email belongs to (required) + :param str email_id: ID of the email that should be replied to (required) + :param ReplyToAliasEmailOptions reply_to_alias_email_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(SentEmailDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'alias_id', + 'email_id', + 'reply_to_alias_email_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method reply_to_alias_email" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'alias_id' is set + if self.api_client.client_side_validation and ('alias_id' not in local_var_params or # noqa: E501 + local_var_params['alias_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `alias_id` when calling `reply_to_alias_email`") # noqa: E501 + # verify the required parameter 'email_id' is set + if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 + local_var_params['email_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `email_id` when calling `reply_to_alias_email`") # noqa: E501 + # verify the required parameter 'reply_to_alias_email_options' is set + if self.api_client.client_side_validation and ('reply_to_alias_email_options' not in local_var_params or # noqa: E501 + local_var_params['reply_to_alias_email_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `reply_to_alias_email_options` when calling `reply_to_alias_email`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'alias_id' in local_var_params: + path_params['aliasId'] = local_var_params['alias_id'] # noqa: E501 + if 'email_id' in local_var_params: + path_params['emailId'] = local_var_params['email_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'reply_to_alias_email_options' in local_var_params: + body_params = local_var_params['reply_to_alias_email_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/aliases/{aliasId}/emails/{emailId}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SentEmailDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def send_alias_email(self, alias_id, send_email_options, **kwargs): # noqa: E501 + """Send an email from an alias inbox # noqa: E501 + + Send an email from an alias. Replies to the email will be forwarded to the alias masked email address # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.send_alias_email(alias_id, send_email_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str alias_id: (required) + :param SendEmailOptions send_email_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: SentEmailDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.send_alias_email_with_http_info(alias_id, send_email_options, **kwargs) # noqa: E501 + + def send_alias_email_with_http_info(self, alias_id, send_email_options, **kwargs): # noqa: E501 + """Send an email from an alias inbox # noqa: E501 + + Send an email from an alias. Replies to the email will be forwarded to the alias masked email address # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.send_alias_email_with_http_info(alias_id, send_email_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str alias_id: (required) + :param SendEmailOptions send_email_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(SentEmailDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'alias_id', + 'send_email_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method send_alias_email" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'alias_id' is set + if self.api_client.client_side_validation and ('alias_id' not in local_var_params or # noqa: E501 + local_var_params['alias_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `alias_id` when calling `send_alias_email`") # noqa: E501 + # verify the required parameter 'send_email_options' is set + if self.api_client.client_side_validation and ('send_email_options' not in local_var_params or # noqa: E501 + local_var_params['send_email_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `send_email_options` when calling `send_alias_email`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'alias_id' in local_var_params: + path_params['aliasId'] = local_var_params['alias_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'send_email_options' in local_var_params: + body_params = local_var_params['send_email_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/aliases/{aliasId}/emails', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SentEmailDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def update_alias(self, alias_id, update_alias_options, **kwargs): # noqa: E501 + """Update an email alias # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_alias(alias_id, update_alias_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str alias_id: (required) + :param UpdateAliasOptions update_alias_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: AliasDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.update_alias_with_http_info(alias_id, update_alias_options, **kwargs) # noqa: E501 + + def update_alias_with_http_info(self, alias_id, update_alias_options, **kwargs): # noqa: E501 + """Update an email alias # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_alias_with_http_info(alias_id, update_alias_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str alias_id: (required) + :param UpdateAliasOptions update_alias_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(AliasDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'alias_id', + 'update_alias_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_alias" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'alias_id' is set + if self.api_client.client_side_validation and ('alias_id' not in local_var_params or # noqa: E501 + local_var_params['alias_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `alias_id` when calling `update_alias`") # noqa: E501 + # verify the required parameter 'update_alias_options' is set + if self.api_client.client_side_validation and ('update_alias_options' not in local_var_params or # noqa: E501 + local_var_params['update_alias_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `update_alias_options` when calling `update_alias`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'alias_id' in local_var_params: + path_params['aliasId'] = local_var_params['alias_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'update_alias_options' in local_var_params: + body_params = local_var_params['update_alias_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/aliases/{aliasId}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AliasDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/mailslurp_client/api/api_user_controller_api.py b/mailslurp_client/api/api_user_controller_api.py new file mode 100644 index 00000000..e51a49b9 --- /dev/null +++ b/mailslurp_client/api/api_user_controller_api.py @@ -0,0 +1,268 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from mailslurp_client.api_client import ApiClient +from mailslurp_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class ApiUserControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def get_json_property_as_string(self, _property, body, **kwargs): # noqa: E501 + """get_json_property_as_string # noqa: E501 + + Utility function to extract properties from JSON objects in language where this is cumbersome. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_json_property_as_string(_property, body, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str _property: JSON property name or dot separated path selector such as `a.b.c` (required) + :param object body: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_json_property_as_string_with_http_info(_property, body, **kwargs) # noqa: E501 + + def get_json_property_as_string_with_http_info(self, _property, body, **kwargs): # noqa: E501 + """get_json_property_as_string # noqa: E501 + + Utility function to extract properties from JSON objects in language where this is cumbersome. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_json_property_as_string_with_http_info(_property, body, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str _property: JSON property name or dot separated path selector such as `a.b.c` (required) + :param object body: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + '_property', + 'body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_json_property_as_string" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter '_property' is set + if self.api_client.client_side_validation and ('_property' not in local_var_params or # noqa: E501 + local_var_params['_property'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `_property` when calling `get_json_property_as_string`") # noqa: E501 + # verify the required parameter 'body' is set + if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501 + local_var_params['body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `body` when calling `get_json_property_as_string`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if '_property' in local_var_params and local_var_params['_property'] is not None: # noqa: E501 + query_params.append(('property', local_var_params['_property'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/user/json/pluck', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_user_info(self, **kwargs): # noqa: E501 + """get_user_info # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: UserInfoDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_user_info_with_http_info(**kwargs) # noqa: E501 + + def get_user_info_with_http_info(self, **kwargs): # noqa: E501 + """get_user_info # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_user_info_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(UserInfoDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_user_info" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/user/info', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UserInfoDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/mailslurp_client/api/attachment_controller_api.py b/mailslurp_client/api/attachment_controller_api.py new file mode 100644 index 00000000..d4142a62 --- /dev/null +++ b/mailslurp_client/api/attachment_controller_api.py @@ -0,0 +1,1203 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from mailslurp_client.api_client import ApiClient +from mailslurp_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class AttachmentControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def delete_all_attachments(self, **kwargs): # noqa: E501 + """Delete all attachments # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_all_attachments(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_all_attachments_with_http_info(**kwargs) # noqa: E501 + + def delete_all_attachments_with_http_info(self, **kwargs): # noqa: E501 + """Delete all attachments # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_all_attachments_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_all_attachments" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/attachments', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_attachment(self, attachment_id, **kwargs): # noqa: E501 + """Delete an attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_attachment(attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str attachment_id: ID of attachment (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_attachment_with_http_info(attachment_id, **kwargs) # noqa: E501 + + def delete_attachment_with_http_info(self, attachment_id, **kwargs): # noqa: E501 + """Delete an attachment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_attachment_with_http_info(attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str attachment_id: ID of attachment (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'attachment_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_attachment" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'attachment_id' is set + if self.api_client.client_side_validation and ('attachment_id' not in local_var_params or # noqa: E501 + local_var_params['attachment_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `attachment_id` when calling `delete_attachment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'attachment_id' in local_var_params: + path_params['attachmentId'] = local_var_params['attachment_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/attachments/{attachmentId}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def download_attachment_as_base64_encoded(self, attachment_id, **kwargs): # noqa: E501 + """Get email attachment as base64 encoded string as alternative to binary responses. To read the content decode the Base64 encoded contents. # noqa: E501 + + Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.download_attachment_as_base64_encoded(attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str attachment_id: ID of attachment (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: DownloadAttachmentDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.download_attachment_as_base64_encoded_with_http_info(attachment_id, **kwargs) # noqa: E501 + + def download_attachment_as_base64_encoded_with_http_info(self, attachment_id, **kwargs): # noqa: E501 + """Get email attachment as base64 encoded string as alternative to binary responses. To read the content decode the Base64 encoded contents. # noqa: E501 + + Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.download_attachment_as_base64_encoded_with_http_info(attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str attachment_id: ID of attachment (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(DownloadAttachmentDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'attachment_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method download_attachment_as_base64_encoded" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'attachment_id' is set + if self.api_client.client_side_validation and ('attachment_id' not in local_var_params or # noqa: E501 + local_var_params['attachment_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `attachment_id` when calling `download_attachment_as_base64_encoded`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'attachment_id' in local_var_params: + path_params['attachmentId'] = local_var_params['attachment_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/attachments/{attachmentId}/base64', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DownloadAttachmentDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def download_attachment_as_bytes(self, attachment_id, **kwargs): # noqa: E501 + """Download attachments. Get email attachment bytes. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints. # noqa: E501 + + Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.download_attachment_as_bytes(attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str attachment_id: ID of attachment (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.download_attachment_as_bytes_with_http_info(attachment_id, **kwargs) # noqa: E501 + + def download_attachment_as_bytes_with_http_info(self, attachment_id, **kwargs): # noqa: E501 + """Download attachments. Get email attachment bytes. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints. # noqa: E501 + + Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.download_attachment_as_bytes_with_http_info(attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str attachment_id: ID of attachment (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'attachment_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method download_attachment_as_bytes" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'attachment_id' is set + if self.api_client.client_side_validation and ('attachment_id' not in local_var_params or # noqa: E501 + local_var_params['attachment_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `attachment_id` when calling `download_attachment_as_bytes`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'attachment_id' in local_var_params: + path_params['attachmentId'] = local_var_params['attachment_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/octet-stream']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/attachments/{attachmentId}/bytes', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_attachment(self, attachment_id, **kwargs): # noqa: E501 + """Get an attachment entity # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_attachment(attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str attachment_id: ID of attachment (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: AttachmentEntity + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_attachment_with_http_info(attachment_id, **kwargs) # noqa: E501 + + def get_attachment_with_http_info(self, attachment_id, **kwargs): # noqa: E501 + """Get an attachment entity # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_attachment_with_http_info(attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str attachment_id: ID of attachment (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(AttachmentEntity, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'attachment_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_attachment" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'attachment_id' is set + if self.api_client.client_side_validation and ('attachment_id' not in local_var_params or # noqa: E501 + local_var_params['attachment_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `attachment_id` when calling `get_attachment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'attachment_id' in local_var_params: + path_params['attachmentId'] = local_var_params['attachment_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/attachments/{attachmentId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AttachmentEntity', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_attachment_info(self, attachment_id, **kwargs): # noqa: E501 + """Get email attachment metadata information # noqa: E501 + + Returns the metadata for an attachment. It is saved separately to the content of the attachment. Contains properties `name` and `content-type` and `content-length` in bytes for a given attachment. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_attachment_info(attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str attachment_id: ID of attachment (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: AttachmentMetaData + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_attachment_info_with_http_info(attachment_id, **kwargs) # noqa: E501 + + def get_attachment_info_with_http_info(self, attachment_id, **kwargs): # noqa: E501 + """Get email attachment metadata information # noqa: E501 + + Returns the metadata for an attachment. It is saved separately to the content of the attachment. Contains properties `name` and `content-type` and `content-length` in bytes for a given attachment. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_attachment_info_with_http_info(attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str attachment_id: ID of attachment (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(AttachmentMetaData, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'attachment_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_attachment_info" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'attachment_id' is set + if self.api_client.client_side_validation and ('attachment_id' not in local_var_params or # noqa: E501 + local_var_params['attachment_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `attachment_id` when calling `get_attachment_info`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'attachment_id' in local_var_params: + path_params['attachmentId'] = local_var_params['attachment_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/attachments/{attachmentId}/metadata', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AttachmentMetaData', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_attachments(self, **kwargs): # noqa: E501 + """Get email attachments # noqa: E501 + + Get all attachments in paginated response. Each entity contains meta data for the attachment such as `name` and `content-type`. Use the `attachmentId` and the download endpoints to get the file contents. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_attachments(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index for list pagination + :param int size: Optional page size for list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str file_name_filter: Optional file name and content type search filter + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageAttachmentEntity + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_attachments_with_http_info(**kwargs) # noqa: E501 + + def get_attachments_with_http_info(self, **kwargs): # noqa: E501 + """Get email attachments # noqa: E501 + + Get all attachments in paginated response. Each entity contains meta data for the attachment such as `name` and `content-type`. Use the `attachmentId` and the download endpoints to get the file contents. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_attachments_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index for list pagination + :param int size: Optional page size for list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str file_name_filter: Optional file name and content type search filter + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageAttachmentEntity, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page', + 'size', + 'sort', + 'file_name_filter', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_attachments" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'file_name_filter' in local_var_params and local_var_params['file_name_filter'] is not None: # noqa: E501 + query_params.append(('fileNameFilter', local_var_params['file_name_filter'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/attachments', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageAttachmentEntity', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def upload_attachment(self, upload_attachment_options, **kwargs): # noqa: E501 + """Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.upload_attachment(upload_attachment_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param UploadAttachmentOptions upload_attachment_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: list[str] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.upload_attachment_with_http_info(upload_attachment_options, **kwargs) # noqa: E501 + + def upload_attachment_with_http_info(self, upload_attachment_options, **kwargs): # noqa: E501 + """Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.upload_attachment_with_http_info(upload_attachment_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param UploadAttachmentOptions upload_attachment_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[str], status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'upload_attachment_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method upload_attachment" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'upload_attachment_options' is set + if self.api_client.client_side_validation and ('upload_attachment_options' not in local_var_params or # noqa: E501 + local_var_params['upload_attachment_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `upload_attachment_options` when calling `upload_attachment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'upload_attachment_options' in local_var_params: + body_params = local_var_params['upload_attachment_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/attachments', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[str]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def upload_attachment_bytes(self, inline_object1, **kwargs): # noqa: E501 + """Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.upload_attachment_bytes(inline_object1, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param InlineObject1 inline_object1: (required) + :param str content_type: Optional contentType for file. For instance `application/pdf` + :param str filename: Optional filename to save upload with + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: list[str] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.upload_attachment_bytes_with_http_info(inline_object1, **kwargs) # noqa: E501 + + def upload_attachment_bytes_with_http_info(self, inline_object1, **kwargs): # noqa: E501 + """Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.upload_attachment_bytes_with_http_info(inline_object1, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param InlineObject1 inline_object1: (required) + :param str content_type: Optional contentType for file. For instance `application/pdf` + :param str filename: Optional filename to save upload with + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[str], status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inline_object1', + 'content_type', + 'filename' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method upload_attachment_bytes" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inline_object1' is set + if self.api_client.client_side_validation and ('inline_object1' not in local_var_params or # noqa: E501 + local_var_params['inline_object1'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inline_object1` when calling `upload_attachment_bytes`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'filename' in local_var_params and local_var_params['filename'] is not None: # noqa: E501 + query_params.append(('filename', local_var_params['filename'])) # noqa: E501 + + header_params = {} + if 'content_type' in local_var_params: + header_params['contentType'] = local_var_params['content_type'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + if 'inline_object1' in local_var_params: + body_params = local_var_params['inline_object1'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/octet-stream']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/attachments/bytes', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[str]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def upload_multipart_form(self, **kwargs): # noqa: E501 + """Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.upload_multipart_form(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str content_type: Optional content type of attachment + :param str filename: Optional name of file + :param str x_filename: Optional content type header of attachment + :param InlineObject inline_object: + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: list[str] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.upload_multipart_form_with_http_info(**kwargs) # noqa: E501 + + def upload_multipart_form_with_http_info(self, **kwargs): # noqa: E501 + """Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.upload_multipart_form_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str content_type: Optional content type of attachment + :param str filename: Optional name of file + :param str x_filename: Optional content type header of attachment + :param InlineObject inline_object: + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[str], status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'content_type', + 'filename', + 'x_filename', + 'inline_object' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method upload_multipart_form" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'content_type' in local_var_params and local_var_params['content_type'] is not None: # noqa: E501 + query_params.append(('contentType', local_var_params['content_type'])) # noqa: E501 + if 'filename' in local_var_params and local_var_params['filename'] is not None: # noqa: E501 + query_params.append(('filename', local_var_params['filename'])) # noqa: E501 + if 'x_filename' in local_var_params and local_var_params['x_filename'] is not None: # noqa: E501 + query_params.append(('x-filename', local_var_params['x_filename'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'inline_object' in local_var_params: + body_params = local_var_params['inline_object'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/attachments/multipart', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[str]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/mailslurp_client/api/bounce_controller_api.py b/mailslurp_client/api/bounce_controller_api.py new file mode 100644 index 00000000..47ea2b55 --- /dev/null +++ b/mailslurp_client/api/bounce_controller_api.py @@ -0,0 +1,780 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from mailslurp_client.api_client import ApiClient +from mailslurp_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class BounceControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def filter_bounced_recipient(self, filter_bounced_recipients_options, **kwargs): # noqa: E501 + """Filter a list of email recipients and remove those who have bounced # noqa: E501 + + Prevent email sending errors by remove recipients who have resulted in past email bounces or complaints # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.filter_bounced_recipient(filter_bounced_recipients_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param FilterBouncedRecipientsOptions filter_bounced_recipients_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: FilterBouncedRecipientsResult + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.filter_bounced_recipient_with_http_info(filter_bounced_recipients_options, **kwargs) # noqa: E501 + + def filter_bounced_recipient_with_http_info(self, filter_bounced_recipients_options, **kwargs): # noqa: E501 + """Filter a list of email recipients and remove those who have bounced # noqa: E501 + + Prevent email sending errors by remove recipients who have resulted in past email bounces or complaints # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.filter_bounced_recipient_with_http_info(filter_bounced_recipients_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param FilterBouncedRecipientsOptions filter_bounced_recipients_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(FilterBouncedRecipientsResult, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'filter_bounced_recipients_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method filter_bounced_recipient" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'filter_bounced_recipients_options' is set + if self.api_client.client_side_validation and ('filter_bounced_recipients_options' not in local_var_params or # noqa: E501 + local_var_params['filter_bounced_recipients_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `filter_bounced_recipients_options` when calling `filter_bounced_recipient`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'filter_bounced_recipients_options' in local_var_params: + body_params = local_var_params['filter_bounced_recipients_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/bounce/filter-recipients', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FilterBouncedRecipientsResult', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_bounced_email(self, id, **kwargs): # noqa: E501 + """Get a bounced email. # noqa: E501 + + Bounced emails are email you have sent that were rejected by a recipient # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_bounced_email(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: ID of the bounced email to fetch (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: BouncedEmailDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_bounced_email_with_http_info(id, **kwargs) # noqa: E501 + + def get_bounced_email_with_http_info(self, id, **kwargs): # noqa: E501 + """Get a bounced email. # noqa: E501 + + Bounced emails are email you have sent that were rejected by a recipient # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_bounced_email_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: ID of the bounced email to fetch (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(BouncedEmailDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_bounced_email" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `get_bounced_email`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/bounce/emails/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BouncedEmailDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_bounced_emails(self, **kwargs): # noqa: E501 + """Get paginated list of bounced emails. # noqa: E501 + + Bounced emails are email you have sent that were rejected by a recipient # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_bounced_emails(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index + :param int size: Optional page size + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageBouncedEmail + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_bounced_emails_with_http_info(**kwargs) # noqa: E501 + + def get_bounced_emails_with_http_info(self, **kwargs): # noqa: E501 + """Get paginated list of bounced emails. # noqa: E501 + + Bounced emails are email you have sent that were rejected by a recipient # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_bounced_emails_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index + :param int size: Optional page size + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageBouncedEmail, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page', + 'size', + 'sort', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_bounced_emails" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `size` when calling `get_bounced_emails`, must be a value less than or equal to `100`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/bounce/emails', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageBouncedEmail', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_bounced_recipient(self, id, **kwargs): # noqa: E501 + """Get a bounced email. # noqa: E501 + + Bounced emails are email you have sent that were rejected by a recipient # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_bounced_recipient(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: ID of the bounced recipient (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: BouncedRecipientDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_bounced_recipient_with_http_info(id, **kwargs) # noqa: E501 + + def get_bounced_recipient_with_http_info(self, id, **kwargs): # noqa: E501 + """Get a bounced email. # noqa: E501 + + Bounced emails are email you have sent that were rejected by a recipient # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_bounced_recipient_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: ID of the bounced recipient (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(BouncedRecipientDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_bounced_recipient" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `get_bounced_recipient`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/bounce/recipients/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BouncedRecipientDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_bounced_recipients(self, **kwargs): # noqa: E501 + """Get paginated list of bounced recipients. # noqa: E501 + + Bounced recipients are email addresses that you have sent emails to that did not accept the sent email. Once a recipient is bounced you cannot send emails to that address. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_bounced_recipients(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index + :param int size: Optional page size + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageBouncedRecipients + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_bounced_recipients_with_http_info(**kwargs) # noqa: E501 + + def get_bounced_recipients_with_http_info(self, **kwargs): # noqa: E501 + """Get paginated list of bounced recipients. # noqa: E501 + + Bounced recipients are email addresses that you have sent emails to that did not accept the sent email. Once a recipient is bounced you cannot send emails to that address. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_bounced_recipients_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index + :param int size: Optional page size + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageBouncedRecipients, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page', + 'size', + 'sort', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_bounced_recipients" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `size` when calling `get_bounced_recipients`, must be a value less than or equal to `100`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/bounce/recipients', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageBouncedRecipients', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_complaints(self, **kwargs): # noqa: E501 + """Get paginated list of complaints. # noqa: E501 + + SMTP complaints made against your account # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_complaints(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index + :param int size: Optional page size + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageComplaint + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_complaints_with_http_info(**kwargs) # noqa: E501 + + def get_complaints_with_http_info(self, **kwargs): # noqa: E501 + """Get paginated list of complaints. # noqa: E501 + + SMTP complaints made against your account # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_complaints_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index + :param int size: Optional page size + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageComplaint, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page', + 'size', + 'sort', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_complaints" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `size` when calling `get_complaints`, must be a value less than or equal to `100`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/bounce/complaints', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageComplaint', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/mailslurp_client/api/bulk_actions_controller_api.py b/mailslurp_client/api/bulk_actions_controller_api.py new file mode 100644 index 00000000..ad2fc020 --- /dev/null +++ b/mailslurp_client/api/bulk_actions_controller_api.py @@ -0,0 +1,374 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from mailslurp_client.api_client import ApiClient +from mailslurp_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class BulkActionsControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def bulk_create_inboxes(self, count, **kwargs): # noqa: E501 + """Bulk create Inboxes (email addresses) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.bulk_create_inboxes(count, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int count: Number of inboxes to be created in bulk (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: list[InboxDto] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.bulk_create_inboxes_with_http_info(count, **kwargs) # noqa: E501 + + def bulk_create_inboxes_with_http_info(self, count, **kwargs): # noqa: E501 + """Bulk create Inboxes (email addresses) # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.bulk_create_inboxes_with_http_info(count, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int count: Number of inboxes to be created in bulk (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[InboxDto], status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'count' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method bulk_create_inboxes" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'count' is set + if self.api_client.client_side_validation and ('count' not in local_var_params or # noqa: E501 + local_var_params['count'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `count` when calling `bulk_create_inboxes`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'count' in local_var_params and local_var_params['count'] is not None: # noqa: E501 + query_params.append(('count', local_var_params['count'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/bulk/inboxes', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[InboxDto]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def bulk_delete_inboxes(self, request_body, **kwargs): # noqa: E501 + """Bulk Delete Inboxes # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.bulk_delete_inboxes(request_body, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param list[str] request_body: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.bulk_delete_inboxes_with_http_info(request_body, **kwargs) # noqa: E501 + + def bulk_delete_inboxes_with_http_info(self, request_body, **kwargs): # noqa: E501 + """Bulk Delete Inboxes # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.bulk_delete_inboxes_with_http_info(request_body, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param list[str] request_body: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'request_body' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method bulk_delete_inboxes" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'request_body' is set + if self.api_client.client_side_validation and ('request_body' not in local_var_params or # noqa: E501 + local_var_params['request_body'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `request_body` when calling `bulk_delete_inboxes`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'request_body' in local_var_params: + body_params = local_var_params['request_body'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/bulk/inboxes', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def bulk_send_emails(self, bulk_send_email_options, **kwargs): # noqa: E501 + """Bulk Send Emails # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.bulk_send_emails(bulk_send_email_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param BulkSendEmailOptions bulk_send_email_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.bulk_send_emails_with_http_info(bulk_send_email_options, **kwargs) # noqa: E501 + + def bulk_send_emails_with_http_info(self, bulk_send_email_options, **kwargs): # noqa: E501 + """Bulk Send Emails # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.bulk_send_emails_with_http_info(bulk_send_email_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param BulkSendEmailOptions bulk_send_email_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'bulk_send_email_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method bulk_send_emails" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'bulk_send_email_options' is set + if self.api_client.client_side_validation and ('bulk_send_email_options' not in local_var_params or # noqa: E501 + local_var_params['bulk_send_email_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `bulk_send_email_options` when calling `bulk_send_emails`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'bulk_send_email_options' in local_var_params: + body_params = local_var_params['bulk_send_email_options'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/bulk/send', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/mailslurp_client/api/common_actions_controller_api.py b/mailslurp_client/api/common_actions_controller_api.py new file mode 100644 index 00000000..ed782edb --- /dev/null +++ b/mailslurp_client/api/common_actions_controller_api.py @@ -0,0 +1,694 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from mailslurp_client.api_client import ApiClient +from mailslurp_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class CommonActionsControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_new_email_address(self, **kwargs): # noqa: E501 + """Create new random inbox # noqa: E501 + + Returns an Inbox with an `id` and an `emailAddress` # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_new_email_address(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param bool allow_team_access: + :param bool use_domain_pool: + :param datetime expires_at: + :param int expires_in: + :param str email_address: + :param str inbox_type: + :param str description: + :param str name: + :param list[str] tags: + :param bool favourite: + :param bool virtual_inbox: + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: InboxDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_new_email_address_with_http_info(**kwargs) # noqa: E501 + + def create_new_email_address_with_http_info(self, **kwargs): # noqa: E501 + """Create new random inbox # noqa: E501 + + Returns an Inbox with an `id` and an `emailAddress` # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_new_email_address_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param bool allow_team_access: + :param bool use_domain_pool: + :param datetime expires_at: + :param int expires_in: + :param str email_address: + :param str inbox_type: + :param str description: + :param str name: + :param list[str] tags: + :param bool favourite: + :param bool virtual_inbox: + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(InboxDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'allow_team_access', + 'use_domain_pool', + 'expires_at', + 'expires_in', + 'email_address', + 'inbox_type', + 'description', + 'name', + 'tags', + 'favourite', + 'virtual_inbox' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_new_email_address" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'allow_team_access' in local_var_params and local_var_params['allow_team_access'] is not None: # noqa: E501 + query_params.append(('allowTeamAccess', local_var_params['allow_team_access'])) # noqa: E501 + if 'use_domain_pool' in local_var_params and local_var_params['use_domain_pool'] is not None: # noqa: E501 + query_params.append(('useDomainPool', local_var_params['use_domain_pool'])) # noqa: E501 + if 'expires_at' in local_var_params and local_var_params['expires_at'] is not None: # noqa: E501 + query_params.append(('expiresAt', local_var_params['expires_at'])) # noqa: E501 + if 'expires_in' in local_var_params and local_var_params['expires_in'] is not None: # noqa: E501 + query_params.append(('expiresIn', local_var_params['expires_in'])) # noqa: E501 + if 'email_address' in local_var_params and local_var_params['email_address'] is not None: # noqa: E501 + query_params.append(('emailAddress', local_var_params['email_address'])) # noqa: E501 + if 'inbox_type' in local_var_params and local_var_params['inbox_type'] is not None: # noqa: E501 + query_params.append(('inboxType', local_var_params['inbox_type'])) # noqa: E501 + if 'description' in local_var_params and local_var_params['description'] is not None: # noqa: E501 + query_params.append(('description', local_var_params['description'])) # noqa: E501 + if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 + query_params.append(('name', local_var_params['name'])) # noqa: E501 + if 'tags' in local_var_params and local_var_params['tags'] is not None: # noqa: E501 + query_params.append(('tags', local_var_params['tags'])) # noqa: E501 + collection_formats['tags'] = 'multi' # noqa: E501 + if 'favourite' in local_var_params and local_var_params['favourite'] is not None: # noqa: E501 + query_params.append(('favourite', local_var_params['favourite'])) # noqa: E501 + if 'virtual_inbox' in local_var_params and local_var_params['virtual_inbox'] is not None: # noqa: E501 + query_params.append(('virtualInbox', local_var_params['virtual_inbox'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/newEmailAddress', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InboxDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_random_inbox(self, **kwargs): # noqa: E501 + """Create new random inbox # noqa: E501 + + Returns an Inbox with an `id` and an `emailAddress` # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_random_inbox(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param bool allow_team_access: + :param bool use_domain_pool: + :param datetime expires_at: + :param int expires_in: + :param str email_address: + :param str inbox_type: + :param str description: + :param str name: + :param list[str] tags: + :param bool favourite: + :param bool virtual_inbox: + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: InboxDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_random_inbox_with_http_info(**kwargs) # noqa: E501 + + def create_random_inbox_with_http_info(self, **kwargs): # noqa: E501 + """Create new random inbox # noqa: E501 + + Returns an Inbox with an `id` and an `emailAddress` # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_random_inbox_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param bool allow_team_access: + :param bool use_domain_pool: + :param datetime expires_at: + :param int expires_in: + :param str email_address: + :param str inbox_type: + :param str description: + :param str name: + :param list[str] tags: + :param bool favourite: + :param bool virtual_inbox: + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(InboxDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'allow_team_access', + 'use_domain_pool', + 'expires_at', + 'expires_in', + 'email_address', + 'inbox_type', + 'description', + 'name', + 'tags', + 'favourite', + 'virtual_inbox' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_random_inbox" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'allow_team_access' in local_var_params and local_var_params['allow_team_access'] is not None: # noqa: E501 + query_params.append(('allowTeamAccess', local_var_params['allow_team_access'])) # noqa: E501 + if 'use_domain_pool' in local_var_params and local_var_params['use_domain_pool'] is not None: # noqa: E501 + query_params.append(('useDomainPool', local_var_params['use_domain_pool'])) # noqa: E501 + if 'expires_at' in local_var_params and local_var_params['expires_at'] is not None: # noqa: E501 + query_params.append(('expiresAt', local_var_params['expires_at'])) # noqa: E501 + if 'expires_in' in local_var_params and local_var_params['expires_in'] is not None: # noqa: E501 + query_params.append(('expiresIn', local_var_params['expires_in'])) # noqa: E501 + if 'email_address' in local_var_params and local_var_params['email_address'] is not None: # noqa: E501 + query_params.append(('emailAddress', local_var_params['email_address'])) # noqa: E501 + if 'inbox_type' in local_var_params and local_var_params['inbox_type'] is not None: # noqa: E501 + query_params.append(('inboxType', local_var_params['inbox_type'])) # noqa: E501 + if 'description' in local_var_params and local_var_params['description'] is not None: # noqa: E501 + query_params.append(('description', local_var_params['description'])) # noqa: E501 + if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 + query_params.append(('name', local_var_params['name'])) # noqa: E501 + if 'tags' in local_var_params and local_var_params['tags'] is not None: # noqa: E501 + query_params.append(('tags', local_var_params['tags'])) # noqa: E501 + collection_formats['tags'] = 'multi' # noqa: E501 + if 'favourite' in local_var_params and local_var_params['favourite'] is not None: # noqa: E501 + query_params.append(('favourite', local_var_params['favourite'])) # noqa: E501 + if 'virtual_inbox' in local_var_params and local_var_params['virtual_inbox'] is not None: # noqa: E501 + query_params.append(('virtualInbox', local_var_params['virtual_inbox'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/createInbox', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InboxDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_email_address(self, inbox_id, **kwargs): # noqa: E501 + """Delete inbox email address by inbox id # noqa: E501 + + Deletes inbox email address # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_email_address(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_email_address_with_http_info(inbox_id, **kwargs) # noqa: E501 + + def delete_email_address_with_http_info(self, inbox_id, **kwargs): # noqa: E501 + """Delete inbox email address by inbox id # noqa: E501 + + Deletes inbox email address # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_email_address_with_http_info(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_email_address" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `delete_email_address`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 + query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/deleteEmailAddress', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def empty_inbox(self, inbox_id, **kwargs): # noqa: E501 + """Delete all emails in an inbox # noqa: E501 + + Deletes all emails # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.empty_inbox(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.empty_inbox_with_http_info(inbox_id, **kwargs) # noqa: E501 + + def empty_inbox_with_http_info(self, inbox_id, **kwargs): # noqa: E501 + """Delete all emails in an inbox # noqa: E501 + + Deletes all emails # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.empty_inbox_with_http_info(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method empty_inbox" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `empty_inbox`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 + query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emptyInbox', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def send_email_simple(self, simple_send_email_options, **kwargs): # noqa: E501 + """Send an email # noqa: E501 + + If no senderId or inboxId provided a random email address will be used to send from. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.send_email_simple(simple_send_email_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param SimpleSendEmailOptions simple_send_email_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.send_email_simple_with_http_info(simple_send_email_options, **kwargs) # noqa: E501 + + def send_email_simple_with_http_info(self, simple_send_email_options, **kwargs): # noqa: E501 + """Send an email # noqa: E501 + + If no senderId or inboxId provided a random email address will be used to send from. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.send_email_simple_with_http_info(simple_send_email_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param SimpleSendEmailOptions simple_send_email_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'simple_send_email_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method send_email_simple" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'simple_send_email_options' is set + if self.api_client.client_side_validation and ('simple_send_email_options' not in local_var_params or # noqa: E501 + local_var_params['simple_send_email_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `simple_send_email_options` when calling `send_email_simple`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'simple_send_email_options' in local_var_params: + body_params = local_var_params['simple_send_email_options'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/sendEmail', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/mailslurp_client/api/contact_controller_api.py b/mailslurp_client/api/contact_controller_api.py new file mode 100644 index 00000000..bab9acd4 --- /dev/null +++ b/mailslurp_client/api/contact_controller_api.py @@ -0,0 +1,717 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from mailslurp_client.api_client import ApiClient +from mailslurp_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class ContactControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_contact(self, create_contact_options, **kwargs): # noqa: E501 + """Create a contact # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_contact(create_contact_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param CreateContactOptions create_contact_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: ContactDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_contact_with_http_info(create_contact_options, **kwargs) # noqa: E501 + + def create_contact_with_http_info(self, create_contact_options, **kwargs): # noqa: E501 + """Create a contact # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_contact_with_http_info(create_contact_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param CreateContactOptions create_contact_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ContactDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'create_contact_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_contact" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'create_contact_options' is set + if self.api_client.client_side_validation and ('create_contact_options' not in local_var_params or # noqa: E501 + local_var_params['create_contact_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `create_contact_options` when calling `create_contact`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'create_contact_options' in local_var_params: + body_params = local_var_params['create_contact_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/contacts', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ContactDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_contact(self, contact_id, **kwargs): # noqa: E501 + """Delete contact # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_contact(contact_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str contact_id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_contact_with_http_info(contact_id, **kwargs) # noqa: E501 + + def delete_contact_with_http_info(self, contact_id, **kwargs): # noqa: E501 + """Delete contact # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_contact_with_http_info(contact_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str contact_id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'contact_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_contact" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'contact_id' is set + if self.api_client.client_side_validation and ('contact_id' not in local_var_params or # noqa: E501 + local_var_params['contact_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contact_id` when calling `delete_contact`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'contact_id' in local_var_params: + path_params['contactId'] = local_var_params['contact_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/contacts/{contactId}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_all_contacts(self, **kwargs): # noqa: E501 + """Get all contacts # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_contacts(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in list pagination + :param int size: Optional page size in list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageContactProjection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_all_contacts_with_http_info(**kwargs) # noqa: E501 + + def get_all_contacts_with_http_info(self, **kwargs): # noqa: E501 + """Get all contacts # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_contacts_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in list pagination + :param int size: Optional page size in list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageContactProjection, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page', + 'size', + 'sort', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_contacts" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/contacts/paginated', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageContactProjection', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_contact(self, contact_id, **kwargs): # noqa: E501 + """Get contact # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_contact(contact_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str contact_id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: ContactDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_contact_with_http_info(contact_id, **kwargs) # noqa: E501 + + def get_contact_with_http_info(self, contact_id, **kwargs): # noqa: E501 + """Get contact # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_contact_with_http_info(contact_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str contact_id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ContactDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'contact_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_contact" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'contact_id' is set + if self.api_client.client_side_validation and ('contact_id' not in local_var_params or # noqa: E501 + local_var_params['contact_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contact_id` when calling `get_contact`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'contact_id' in local_var_params: + path_params['contactId'] = local_var_params['contact_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/contacts/{contactId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ContactDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_contact_v_card(self, contact_id, **kwargs): # noqa: E501 + """Get contact vCard vcf file # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_contact_v_card(contact_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str contact_id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: list[str] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_contact_v_card_with_http_info(contact_id, **kwargs) # noqa: E501 + + def get_contact_v_card_with_http_info(self, contact_id, **kwargs): # noqa: E501 + """Get contact vCard vcf file # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_contact_v_card_with_http_info(contact_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str contact_id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[str], status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'contact_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_contact_v_card" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'contact_id' is set + if self.api_client.client_side_validation and ('contact_id' not in local_var_params or # noqa: E501 + local_var_params['contact_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `contact_id` when calling `get_contact_v_card`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'contact_id' in local_var_params: + path_params['contactId'] = local_var_params['contact_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/contacts/{contactId}/download', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[str]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_contacts(self, **kwargs): # noqa: E501 + """Get all contacts # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_contacts(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: list[ContactProjection] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_contacts_with_http_info(**kwargs) # noqa: E501 + + def get_contacts_with_http_info(self, **kwargs): # noqa: E501 + """Get all contacts # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_contacts_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[ContactProjection], status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_contacts" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/contacts', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[ContactProjection]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/mailslurp_client/api/domain_controller_api.py b/mailslurp_client/api/domain_controller_api.py new file mode 100644 index 00000000..656462dc --- /dev/null +++ b/mailslurp_client/api/domain_controller_api.py @@ -0,0 +1,730 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from mailslurp_client.api_client import ApiClient +from mailslurp_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class DomainControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def add_domain_wildcard_catch_all(self, id, **kwargs): # noqa: E501 + """Add catch all wild card inbox to domain # noqa: E501 + + Add a catch all inbox to a domain so that any emails sent to it that cannot be matched will be sent to the catch all inbox generated # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_domain_wildcard_catch_all(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: DomainDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.add_domain_wildcard_catch_all_with_http_info(id, **kwargs) # noqa: E501 + + def add_domain_wildcard_catch_all_with_http_info(self, id, **kwargs): # noqa: E501 + """Add catch all wild card inbox to domain # noqa: E501 + + Add a catch all inbox to a domain so that any emails sent to it that cannot be matched will be sent to the catch all inbox generated # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_domain_wildcard_catch_all_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(DomainDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method add_domain_wildcard_catch_all" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `add_domain_wildcard_catch_all`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/domains/{id}/wildcard', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DomainDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_domain(self, create_domain_options, **kwargs): # noqa: E501 + """Create Domain # noqa: E501 + + Link a domain that you own with MailSlurp so you can create email addresses using it. Endpoint returns DNS records used for validation. You must add these verification records to your host provider's DNS setup to verify the domain. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_domain(create_domain_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param CreateDomainOptions create_domain_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: DomainDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_domain_with_http_info(create_domain_options, **kwargs) # noqa: E501 + + def create_domain_with_http_info(self, create_domain_options, **kwargs): # noqa: E501 + """Create Domain # noqa: E501 + + Link a domain that you own with MailSlurp so you can create email addresses using it. Endpoint returns DNS records used for validation. You must add these verification records to your host provider's DNS setup to verify the domain. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_domain_with_http_info(create_domain_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param CreateDomainOptions create_domain_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(DomainDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'create_domain_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_domain" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'create_domain_options' is set + if self.api_client.client_side_validation and ('create_domain_options' not in local_var_params or # noqa: E501 + local_var_params['create_domain_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `create_domain_options` when calling `create_domain`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'create_domain_options' in local_var_params: + body_params = local_var_params['create_domain_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/domains', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DomainDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_domain(self, id, **kwargs): # noqa: E501 + """Delete a domain # noqa: E501 + + Delete a domain. This will disable any existing inboxes that use this domain. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_domain(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: list[str] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_domain_with_http_info(id, **kwargs) # noqa: E501 + + def delete_domain_with_http_info(self, id, **kwargs): # noqa: E501 + """Delete a domain # noqa: E501 + + Delete a domain. This will disable any existing inboxes that use this domain. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_domain_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[str], status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_domain" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `delete_domain`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/domains/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[str]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_domain(self, id, **kwargs): # noqa: E501 + """Get a domain # noqa: E501 + + Returns domain verification status and tokens for a given domain # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_domain(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: DomainDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_domain_with_http_info(id, **kwargs) # noqa: E501 + + def get_domain_with_http_info(self, id, **kwargs): # noqa: E501 + """Get a domain # noqa: E501 + + Returns domain verification status and tokens for a given domain # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_domain_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(DomainDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_domain" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `get_domain`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/domains/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DomainDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_domains(self, **kwargs): # noqa: E501 + """Get domains # noqa: E501 + + List all custom domains you have created # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_domains(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: list[DomainPreview] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_domains_with_http_info(**kwargs) # noqa: E501 + + def get_domains_with_http_info(self, **kwargs): # noqa: E501 + """Get domains # noqa: E501 + + List all custom domains you have created # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_domains_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[DomainPreview], status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_domains" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/domains', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[DomainPreview]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def update_domain(self, id, update_domain_options, **kwargs): # noqa: E501 + """Update a domain # noqa: E501 + + Update values on a domain. Note you cannot change the domain name as it is immutable. Recreate the domain if you need to alter this. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_domain(id, update_domain_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: (required) + :param UpdateDomainOptions update_domain_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: DomainDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.update_domain_with_http_info(id, update_domain_options, **kwargs) # noqa: E501 + + def update_domain_with_http_info(self, id, update_domain_options, **kwargs): # noqa: E501 + """Update a domain # noqa: E501 + + Update values on a domain. Note you cannot change the domain name as it is immutable. Recreate the domain if you need to alter this. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_domain_with_http_info(id, update_domain_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: (required) + :param UpdateDomainOptions update_domain_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(DomainDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id', + 'update_domain_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_domain" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `update_domain`") # noqa: E501 + # verify the required parameter 'update_domain_options' is set + if self.api_client.client_side_validation and ('update_domain_options' not in local_var_params or # noqa: E501 + local_var_params['update_domain_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `update_domain_options` when calling `update_domain`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'update_domain_options' in local_var_params: + body_params = local_var_params['update_domain_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/domains/{id}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DomainDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/mailslurp_client/api/email_controller_api.py b/mailslurp_client/api/email_controller_api.py new file mode 100644 index 00000000..eceee221 --- /dev/null +++ b/mailslurp_client/api/email_controller_api.py @@ -0,0 +1,3743 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from mailslurp_client.api_client import ApiClient +from mailslurp_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class EmailControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def apply_imap_flag_operation(self, email_id, imap_flag_operation_options, **kwargs): # noqa: E501 + """Set IMAP flags associated with a message. Only supports '\\Seen' flag. # noqa: E501 + + Apply RFC3501 section-2.3.2 IMAP flag operations on an email # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.apply_imap_flag_operation(email_id, imap_flag_operation_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: (required) + :param ImapFlagOperationOptions imap_flag_operation_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: EmailPreview + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.apply_imap_flag_operation_with_http_info(email_id, imap_flag_operation_options, **kwargs) # noqa: E501 + + def apply_imap_flag_operation_with_http_info(self, email_id, imap_flag_operation_options, **kwargs): # noqa: E501 + """Set IMAP flags associated with a message. Only supports '\\Seen' flag. # noqa: E501 + + Apply RFC3501 section-2.3.2 IMAP flag operations on an email # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.apply_imap_flag_operation_with_http_info(email_id, imap_flag_operation_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: (required) + :param ImapFlagOperationOptions imap_flag_operation_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(EmailPreview, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'email_id', + 'imap_flag_operation_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method apply_imap_flag_operation" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'email_id' is set + if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 + local_var_params['email_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `email_id` when calling `apply_imap_flag_operation`") # noqa: E501 + # verify the required parameter 'imap_flag_operation_options' is set + if self.api_client.client_side_validation and ('imap_flag_operation_options' not in local_var_params or # noqa: E501 + local_var_params['imap_flag_operation_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `imap_flag_operation_options` when calling `apply_imap_flag_operation`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'email_id' in local_var_params: + path_params['emailId'] = local_var_params['email_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'imap_flag_operation_options' in local_var_params: + body_params = local_var_params['imap_flag_operation_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails/{emailId}/imap-flag-operation', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='EmailPreview', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_all_emails(self, **kwargs): # noqa: E501 + """Delete all emails in all inboxes. # noqa: E501 + + Deletes all emails in your account. Be careful as emails cannot be recovered # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_all_emails(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_all_emails_with_http_info(**kwargs) # noqa: E501 + + def delete_all_emails_with_http_info(self, **kwargs): # noqa: E501 + """Delete all emails in all inboxes. # noqa: E501 + + Deletes all emails in your account. Be careful as emails cannot be recovered # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_all_emails_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_all_emails" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_email(self, email_id, **kwargs): # noqa: E501 + """Delete an email # noqa: E501 + + Deletes an email and removes it from the inbox. Deleted emails cannot be recovered. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_email(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email to delete (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_email_with_http_info(email_id, **kwargs) # noqa: E501 + + def delete_email_with_http_info(self, email_id, **kwargs): # noqa: E501 + """Delete an email # noqa: E501 + + Deletes an email and removes it from the inbox. Deleted emails cannot be recovered. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_email_with_http_info(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email to delete (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'email_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_email" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'email_id' is set + if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 + local_var_params['email_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `email_id` when calling `delete_email`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'email_id' in local_var_params: + path_params['emailId'] = local_var_params['email_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails/{emailId}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def download_attachment(self, email_id, attachment_id, **kwargs): # noqa: E501 + """Get email attachment bytes. Returned as `octet-stream` with content type header. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints and convert the base 64 encoded content to a file or string. # noqa: E501 + + Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.download_attachment(email_id, attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email (required) + :param str attachment_id: ID of attachment (required) + :param str api_key: Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.download_attachment_with_http_info(email_id, attachment_id, **kwargs) # noqa: E501 + + def download_attachment_with_http_info(self, email_id, attachment_id, **kwargs): # noqa: E501 + """Get email attachment bytes. Returned as `octet-stream` with content type header. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints and convert the base 64 encoded content to a file or string. # noqa: E501 + + Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.download_attachment_with_http_info(email_id, attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email (required) + :param str attachment_id: ID of attachment (required) + :param str api_key: Can pass apiKey in url for this request if you wish to download the file in a browser. Content type will be set to original content type of the attachment file. This is so that browsers can download the file correctly. + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'email_id', + 'attachment_id', + 'api_key' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method download_attachment" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'email_id' is set + if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 + local_var_params['email_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `email_id` when calling `download_attachment`") # noqa: E501 + # verify the required parameter 'attachment_id' is set + if self.api_client.client_side_validation and ('attachment_id' not in local_var_params or # noqa: E501 + local_var_params['attachment_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `attachment_id` when calling `download_attachment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'email_id' in local_var_params: + path_params['emailId'] = local_var_params['email_id'] # noqa: E501 + if 'attachment_id' in local_var_params: + path_params['attachmentId'] = local_var_params['attachment_id'] # noqa: E501 + + query_params = [] + if 'api_key' in local_var_params and local_var_params['api_key'] is not None: # noqa: E501 + query_params.append(('apiKey', local_var_params['api_key'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/octet-stream']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails/{emailId}/attachments/{attachmentId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def download_attachment_base64(self, email_id, attachment_id, **kwargs): # noqa: E501 + """Get email attachment as base64 encoded string as an alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`. # noqa: E501 + + Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.download_attachment_base64(email_id, attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email (required) + :param str attachment_id: ID of attachment (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: DownloadAttachmentDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.download_attachment_base64_with_http_info(email_id, attachment_id, **kwargs) # noqa: E501 + + def download_attachment_base64_with_http_info(self, email_id, attachment_id, **kwargs): # noqa: E501 + """Get email attachment as base64 encoded string as an alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`. # noqa: E501 + + Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.download_attachment_base64_with_http_info(email_id, attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email (required) + :param str attachment_id: ID of attachment (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(DownloadAttachmentDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'email_id', + 'attachment_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method download_attachment_base64" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'email_id' is set + if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 + local_var_params['email_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `email_id` when calling `download_attachment_base64`") # noqa: E501 + # verify the required parameter 'attachment_id' is set + if self.api_client.client_side_validation and ('attachment_id' not in local_var_params or # noqa: E501 + local_var_params['attachment_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `attachment_id` when calling `download_attachment_base64`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'email_id' in local_var_params: + path_params['emailId'] = local_var_params['email_id'] # noqa: E501 + if 'attachment_id' in local_var_params: + path_params['attachmentId'] = local_var_params['attachment_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails/{emailId}/attachments/{attachmentId}/base64', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DownloadAttachmentDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def download_body(self, email_id, **kwargs): # noqa: E501 + """Get email body as string. Returned as `plain/text` with content type header. # noqa: E501 + + Returns the specified email body for a given email as a string # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.download_body(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.download_body_with_http_info(email_id, **kwargs) # noqa: E501 + + def download_body_with_http_info(self, email_id, **kwargs): # noqa: E501 + """Get email body as string. Returned as `plain/text` with content type header. # noqa: E501 + + Returns the specified email body for a given email as a string # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.download_body_with_http_info(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'email_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method download_body" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'email_id' is set + if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 + local_var_params['email_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `email_id` when calling `download_body`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'email_id' in local_var_params: + path_params['emailId'] = local_var_params['email_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['text/plain', 'text/html']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails/{emailId}/body', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def download_body_bytes(self, email_id, **kwargs): # noqa: E501 + """Get email body in bytes. Returned as `octet-stream` with content type header. # noqa: E501 + + Returns the specified email body for a given email as a stream / array of bytes. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.download_body_bytes(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.download_body_bytes_with_http_info(email_id, **kwargs) # noqa: E501 + + def download_body_bytes_with_http_info(self, email_id, **kwargs): # noqa: E501 + """Get email body in bytes. Returned as `octet-stream` with content type header. # noqa: E501 + + Returns the specified email body for a given email as a stream / array of bytes. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.download_body_bytes_with_http_info(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'email_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method download_body_bytes" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'email_id' is set + if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 + local_var_params['email_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `email_id` when calling `download_body_bytes`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'email_id' in local_var_params: + path_params['emailId'] = local_var_params['email_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/octet-stream']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails/{emailId}/body-bytes', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def forward_email(self, email_id, forward_email_options, **kwargs): # noqa: E501 + """Forward email to recipients # noqa: E501 + + Forward an existing email to new recipients. The sender of the email will be the inbox that received the email you are forwarding. You can override the sender with the `from` option. Note you must have access to the from address in MailSlurp to use the override. For more control consider fetching the email and sending it a new using the send email endpoints. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.forward_email(email_id, forward_email_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email (required) + :param ForwardEmailOptions forward_email_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: SentEmailDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.forward_email_with_http_info(email_id, forward_email_options, **kwargs) # noqa: E501 + + def forward_email_with_http_info(self, email_id, forward_email_options, **kwargs): # noqa: E501 + """Forward email to recipients # noqa: E501 + + Forward an existing email to new recipients. The sender of the email will be the inbox that received the email you are forwarding. You can override the sender with the `from` option. Note you must have access to the from address in MailSlurp to use the override. For more control consider fetching the email and sending it a new using the send email endpoints. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.forward_email_with_http_info(email_id, forward_email_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email (required) + :param ForwardEmailOptions forward_email_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(SentEmailDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'email_id', + 'forward_email_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method forward_email" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'email_id' is set + if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 + local_var_params['email_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `email_id` when calling `forward_email`") # noqa: E501 + # verify the required parameter 'forward_email_options' is set + if self.api_client.client_side_validation and ('forward_email_options' not in local_var_params or # noqa: E501 + local_var_params['forward_email_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `forward_email_options` when calling `forward_email`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'email_id' in local_var_params: + path_params['emailId'] = local_var_params['email_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'forward_email_options' in local_var_params: + body_params = local_var_params['forward_email_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails/{emailId}/forward', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SentEmailDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_attachment_meta_data(self, email_id, attachment_id, **kwargs): # noqa: E501 + """Get email attachment metadata. This is the `contentType` and `contentLength` of an attachment. To get the individual attachments use the `downloadAttachment` methods. # noqa: E501 + + Returns the metadata such as name and content-type for a given attachment and email. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_attachment_meta_data(email_id, attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email (required) + :param str attachment_id: ID of attachment (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: AttachmentMetaData + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_attachment_meta_data_with_http_info(email_id, attachment_id, **kwargs) # noqa: E501 + + def get_attachment_meta_data_with_http_info(self, email_id, attachment_id, **kwargs): # noqa: E501 + """Get email attachment metadata. This is the `contentType` and `contentLength` of an attachment. To get the individual attachments use the `downloadAttachment` methods. # noqa: E501 + + Returns the metadata such as name and content-type for a given attachment and email. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_attachment_meta_data_with_http_info(email_id, attachment_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email (required) + :param str attachment_id: ID of attachment (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(AttachmentMetaData, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'email_id', + 'attachment_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_attachment_meta_data" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'email_id' is set + if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 + local_var_params['email_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `email_id` when calling `get_attachment_meta_data`") # noqa: E501 + # verify the required parameter 'attachment_id' is set + if self.api_client.client_side_validation and ('attachment_id' not in local_var_params or # noqa: E501 + local_var_params['attachment_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `attachment_id` when calling `get_attachment_meta_data`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'email_id' in local_var_params: + path_params['emailId'] = local_var_params['email_id'] # noqa: E501 + if 'attachment_id' in local_var_params: + path_params['attachmentId'] = local_var_params['attachment_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails/{emailId}/attachments/{attachmentId}/metadata', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AttachmentMetaData', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_email(self, email_id, **kwargs): # noqa: E501 + """Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController. # noqa: E501 + + Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_email(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: (required) + :param bool decode: Decode email body quoted-printable encoding to plain text. SMTP servers often encode text using quoted-printable format (for instance `=D7`). This can be a pain for testing + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Email + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_email_with_http_info(email_id, **kwargs) # noqa: E501 + + def get_email_with_http_info(self, email_id, **kwargs): # noqa: E501 + """Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController. # noqa: E501 + + Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_email_with_http_info(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: (required) + :param bool decode: Decode email body quoted-printable encoding to plain text. SMTP servers often encode text using quoted-printable format (for instance `=D7`). This can be a pain for testing + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(Email, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'email_id', + 'decode' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_email" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'email_id' is set + if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 + local_var_params['email_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `email_id` when calling `get_email`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'email_id' in local_var_params: + path_params['emailId'] = local_var_params['email_id'] # noqa: E501 + + query_params = [] + if 'decode' in local_var_params and local_var_params['decode'] is not None: # noqa: E501 + query_params.append(('decode', local_var_params['decode'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails/{emailId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Email', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_email_attachments(self, email_id, **kwargs): # noqa: E501 + """Get all email attachment metadata. Metadata includes name and size of attachments. # noqa: E501 + + Returns an array of attachment metadata such as name and content-type for a given email if present. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_email_attachments(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: list[AttachmentMetaData] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_email_attachments_with_http_info(email_id, **kwargs) # noqa: E501 + + def get_email_attachments_with_http_info(self, email_id, **kwargs): # noqa: E501 + """Get all email attachment metadata. Metadata includes name and size of attachments. # noqa: E501 + + Returns an array of attachment metadata such as name and content-type for a given email if present. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_email_attachments_with_http_info(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[AttachmentMetaData], status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'email_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_email_attachments" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'email_id' is set + if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 + local_var_params['email_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `email_id` when calling `get_email_attachments`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'email_id' in local_var_params: + path_params['emailId'] = local_var_params['email_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails/{emailId}/attachments', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[AttachmentMetaData]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_email_content_match(self, email_id, content_match_options, **kwargs): # noqa: E501 + """Get email content regex pattern match results. Runs regex against email body and returns match groups. # noqa: E501 + + Return the matches for a given Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_email_content_match(email_id, content_match_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email to match against (required) + :param ContentMatchOptions content_match_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: EmailContentMatchResult + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_email_content_match_with_http_info(email_id, content_match_options, **kwargs) # noqa: E501 + + def get_email_content_match_with_http_info(self, email_id, content_match_options, **kwargs): # noqa: E501 + """Get email content regex pattern match results. Runs regex against email body and returns match groups. # noqa: E501 + + Return the matches for a given Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_email_content_match_with_http_info(email_id, content_match_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email to match against (required) + :param ContentMatchOptions content_match_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(EmailContentMatchResult, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'email_id', + 'content_match_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_email_content_match" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'email_id' is set + if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 + local_var_params['email_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `email_id` when calling `get_email_content_match`") # noqa: E501 + # verify the required parameter 'content_match_options' is set + if self.api_client.client_side_validation and ('content_match_options' not in local_var_params or # noqa: E501 + local_var_params['content_match_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `content_match_options` when calling `get_email_content_match`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'email_id' in local_var_params: + path_params['emailId'] = local_var_params['email_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'content_match_options' in local_var_params: + body_params = local_var_params['content_match_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails/{emailId}/contentMatch', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='EmailContentMatchResult', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_email_count(self, **kwargs): # noqa: E501 + """Get email count # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_email_count(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: CountDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_email_count_with_http_info(**kwargs) # noqa: E501 + + def get_email_count_with_http_info(self, **kwargs): # noqa: E501 + """Get email count # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_email_count_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(CountDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_email_count" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails/emails/count', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CountDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_email_html(self, email_id, **kwargs): # noqa: E501 + """Get email content as HTML. For displaying emails in browser context. # noqa: E501 + + Retrieve email content as HTML response for viewing in browsers. Decodes quoted-printable entities and converts charset to UTF-8. Pass your API KEY as a request parameter when viewing in a browser: `?apiKey=xxx`. Returns content-type `text/html;charset=utf-8` so you must call expecting that content response not JSON. For JSON response see the `getEmailHTMLJson` method. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_email_html(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: (required) + :param bool decode: + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_email_html_with_http_info(email_id, **kwargs) # noqa: E501 + + def get_email_html_with_http_info(self, email_id, **kwargs): # noqa: E501 + """Get email content as HTML. For displaying emails in browser context. # noqa: E501 + + Retrieve email content as HTML response for viewing in browsers. Decodes quoted-printable entities and converts charset to UTF-8. Pass your API KEY as a request parameter when viewing in a browser: `?apiKey=xxx`. Returns content-type `text/html;charset=utf-8` so you must call expecting that content response not JSON. For JSON response see the `getEmailHTMLJson` method. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_email_html_with_http_info(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: (required) + :param bool decode: + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'email_id', + 'decode' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_email_html" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'email_id' is set + if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 + local_var_params['email_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `email_id` when calling `get_email_html`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'email_id' in local_var_params: + path_params['emailId'] = local_var_params['email_id'] # noqa: E501 + + query_params = [] + if 'decode' in local_var_params and local_var_params['decode'] is not None: # noqa: E501 + query_params.append(('decode', local_var_params['decode'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['text/html;charset=utf-8', 'text/html']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails/{emailId}/html', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_email_html_json(self, email_id, **kwargs): # noqa: E501 + """Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content # noqa: E501 + + Retrieve email content as HTML response. Decodes quoted-printable entities and converts charset to UTF-8. Returns content-type `application/json;charset=utf-8` so you must call expecting that content response not JSON. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_email_html_json(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: (required) + :param bool decode: + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: EmailHtmlDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_email_html_json_with_http_info(email_id, **kwargs) # noqa: E501 + + def get_email_html_json_with_http_info(self, email_id, **kwargs): # noqa: E501 + """Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content # noqa: E501 + + Retrieve email content as HTML response. Decodes quoted-printable entities and converts charset to UTF-8. Returns content-type `application/json;charset=utf-8` so you must call expecting that content response not JSON. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_email_html_json_with_http_info(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: (required) + :param bool decode: + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(EmailHtmlDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'email_id', + 'decode' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_email_html_json" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'email_id' is set + if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 + local_var_params['email_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `email_id` when calling `get_email_html_json`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'email_id' in local_var_params: + path_params['emailId'] = local_var_params['email_id'] # noqa: E501 + + query_params = [] + if 'decode' in local_var_params and local_var_params['decode'] is not None: # noqa: E501 + query_params.append(('decode', local_var_params['decode'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails/{emailId}/html/json', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='EmailHtmlDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_email_html_query(self, email_id, html_selector, **kwargs): # noqa: E501 + """Parse and return text from an email, stripping HTML and decoding encoded characters # noqa: E501 + + Parse an email body and return the content as an array of text. HTML parsing uses JSoup which supports JQuery/CSS style selectors # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_email_html_query(email_id, html_selector, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email to perform HTML query on (required) + :param str html_selector: HTML selector to search for. Uses JQuery/JSoup/CSS style selector like '.my-div' to match content. See https://jsoup.org/apidocs/org/jsoup/select/Selector.html for more information. (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: EmailTextLinesResult + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_email_html_query_with_http_info(email_id, html_selector, **kwargs) # noqa: E501 + + def get_email_html_query_with_http_info(self, email_id, html_selector, **kwargs): # noqa: E501 + """Parse and return text from an email, stripping HTML and decoding encoded characters # noqa: E501 + + Parse an email body and return the content as an array of text. HTML parsing uses JSoup which supports JQuery/CSS style selectors # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_email_html_query_with_http_info(email_id, html_selector, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email to perform HTML query on (required) + :param str html_selector: HTML selector to search for. Uses JQuery/JSoup/CSS style selector like '.my-div' to match content. See https://jsoup.org/apidocs/org/jsoup/select/Selector.html for more information. (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(EmailTextLinesResult, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'email_id', + 'html_selector' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_email_html_query" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'email_id' is set + if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 + local_var_params['email_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `email_id` when calling `get_email_html_query`") # noqa: E501 + # verify the required parameter 'html_selector' is set + if self.api_client.client_side_validation and ('html_selector' not in local_var_params or # noqa: E501 + local_var_params['html_selector'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `html_selector` when calling `get_email_html_query`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'email_id' in local_var_params: + path_params['emailId'] = local_var_params['email_id'] # noqa: E501 + + query_params = [] + if 'html_selector' in local_var_params and local_var_params['html_selector'] is not None: # noqa: E501 + query_params.append(('htmlSelector', local_var_params['html_selector'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails/{emailId}/htmlQuery', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='EmailTextLinesResult', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_email_links(self, email_id, **kwargs): # noqa: E501 + """Parse and return list of links found in an email (only works for HTML content) # noqa: E501 + + HTML parsing uses JSoup and UNIX line separators. Searches content for href attributes # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_email_links(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email to fetch text for (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: EmailLinksResult + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_email_links_with_http_info(email_id, **kwargs) # noqa: E501 + + def get_email_links_with_http_info(self, email_id, **kwargs): # noqa: E501 + """Parse and return list of links found in an email (only works for HTML content) # noqa: E501 + + HTML parsing uses JSoup and UNIX line separators. Searches content for href attributes # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_email_links_with_http_info(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email to fetch text for (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(EmailLinksResult, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'email_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_email_links" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'email_id' is set + if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 + local_var_params['email_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `email_id` when calling `get_email_links`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'email_id' in local_var_params: + path_params['emailId'] = local_var_params['email_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails/{emailId}/links', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='EmailLinksResult', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_email_preview_ur_ls(self, email_id, **kwargs): # noqa: E501 + """Get email URLs for viewing in browser or downloading # noqa: E501 + + Get a list of URLs for email content as text/html or raw SMTP message for viewing the message in a browser. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_email_preview_ur_ls(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: EmailPreviewUrls + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_email_preview_ur_ls_with_http_info(email_id, **kwargs) # noqa: E501 + + def get_email_preview_ur_ls_with_http_info(self, email_id, **kwargs): # noqa: E501 + """Get email URLs for viewing in browser or downloading # noqa: E501 + + Get a list of URLs for email content as text/html or raw SMTP message for viewing the message in a browser. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_email_preview_ur_ls_with_http_info(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(EmailPreviewUrls, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'email_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_email_preview_ur_ls" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'email_id' is set + if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 + local_var_params['email_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `email_id` when calling `get_email_preview_ur_ls`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'email_id' in local_var_params: + path_params['emailId'] = local_var_params['email_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails/{emailId}/urls', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='EmailPreviewUrls', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_email_text_lines(self, email_id, **kwargs): # noqa: E501 + """Parse and return text from an email, stripping HTML and decoding encoded characters # noqa: E501 + + Parse an email body and return the content as an array of strings. HTML parsing uses JSoup and UNIX line separators. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_email_text_lines(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email to fetch text for (required) + :param bool decode_html_entities: Decode HTML entities + :param str line_separator: Line separator character + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: EmailTextLinesResult + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_email_text_lines_with_http_info(email_id, **kwargs) # noqa: E501 + + def get_email_text_lines_with_http_info(self, email_id, **kwargs): # noqa: E501 + """Parse and return text from an email, stripping HTML and decoding encoded characters # noqa: E501 + + Parse an email body and return the content as an array of strings. HTML parsing uses JSoup and UNIX line separators. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_email_text_lines_with_http_info(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email to fetch text for (required) + :param bool decode_html_entities: Decode HTML entities + :param str line_separator: Line separator character + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(EmailTextLinesResult, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'email_id', + 'decode_html_entities', + 'line_separator' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_email_text_lines" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'email_id' is set + if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 + local_var_params['email_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `email_id` when calling `get_email_text_lines`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'email_id' in local_var_params: + path_params['emailId'] = local_var_params['email_id'] # noqa: E501 + + query_params = [] + if 'decode_html_entities' in local_var_params and local_var_params['decode_html_entities'] is not None: # noqa: E501 + query_params.append(('decodeHtmlEntities', local_var_params['decode_html_entities'])) # noqa: E501 + if 'line_separator' in local_var_params and local_var_params['line_separator'] is not None: # noqa: E501 + query_params.append(('lineSeparator', local_var_params['line_separator'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails/{emailId}/textLines', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='EmailTextLinesResult', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_emails_paginated(self, **kwargs): # noqa: E501 + """Get all emails in all inboxes in paginated form. Email API list all. # noqa: E501 + + By default returns all emails across all inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_emails_paginated(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param list[str] inbox_id: Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. + :param int page: Optional page index in email list pagination + :param int size: Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results + :param str sort: Optional createdAt sort direction ASC or DESC + :param bool unread_only: Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly + :param str search_filter: Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body + :param datetime since: Optional filter emails received after given date time + :param datetime before: Optional filter emails received before given date time + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageEmailProjection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_emails_paginated_with_http_info(**kwargs) # noqa: E501 + + def get_emails_paginated_with_http_info(self, **kwargs): # noqa: E501 + """Get all emails in all inboxes in paginated form. Email API list all. # noqa: E501 + + By default returns all emails across all inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_emails_paginated_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param list[str] inbox_id: Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. + :param int page: Optional page index in email list pagination + :param int size: Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results + :param str sort: Optional createdAt sort direction ASC or DESC + :param bool unread_only: Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly + :param str search_filter: Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body + :param datetime since: Optional filter emails received after given date time + :param datetime before: Optional filter emails received before given date time + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageEmailProjection, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'page', + 'size', + 'sort', + 'unread_only', + 'search_filter', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_emails_paginated" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `size` when calling `get_emails_paginated`, must be a value less than or equal to `100`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 + query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 + collection_formats['inboxId'] = 'multi' # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'unread_only' in local_var_params and local_var_params['unread_only'] is not None: # noqa: E501 + query_params.append(('unreadOnly', local_var_params['unread_only'])) # noqa: E501 + if 'search_filter' in local_var_params and local_var_params['search_filter'] is not None: # noqa: E501 + query_params.append(('searchFilter', local_var_params['search_filter'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageEmailProjection', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_gravatar_url_for_email_address(self, email_address, **kwargs): # noqa: E501 + """get_gravatar_url_for_email_address # noqa: E501 + + Get gravatar url for email address # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_gravatar_url_for_email_address(email_address, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_address: (required) + :param str size: + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: GravatarUrl + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_gravatar_url_for_email_address_with_http_info(email_address, **kwargs) # noqa: E501 + + def get_gravatar_url_for_email_address_with_http_info(self, email_address, **kwargs): # noqa: E501 + """get_gravatar_url_for_email_address # noqa: E501 + + Get gravatar url for email address # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_gravatar_url_for_email_address_with_http_info(email_address, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_address: (required) + :param str size: + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(GravatarUrl, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'email_address', + 'size' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_gravatar_url_for_email_address" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'email_address' is set + if self.api_client.client_side_validation and ('email_address' not in local_var_params or # noqa: E501 + local_var_params['email_address'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `email_address` when calling `get_gravatar_url_for_email_address`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'email_address' in local_var_params and local_var_params['email_address'] is not None: # noqa: E501 + query_params.append(('emailAddress', local_var_params['email_address'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails/gravatarFor', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GravatarUrl', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_latest_email(self, **kwargs): # noqa: E501 + """Get latest email in all inboxes. Most recently received. # noqa: E501 + + Get the newest email in all inboxes or in a passed set of inbox IDs # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_latest_email(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param list[str] inbox_ids: Optional set of inboxes to filter by. Only get the latest email from these inbox IDs. If not provided will search across all inboxes + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Email + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_latest_email_with_http_info(**kwargs) # noqa: E501 + + def get_latest_email_with_http_info(self, **kwargs): # noqa: E501 + """Get latest email in all inboxes. Most recently received. # noqa: E501 + + Get the newest email in all inboxes or in a passed set of inbox IDs # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_latest_email_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param list[str] inbox_ids: Optional set of inboxes to filter by. Only get the latest email from these inbox IDs. If not provided will search across all inboxes + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(Email, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_ids' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_latest_email" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'inbox_ids' in local_var_params and local_var_params['inbox_ids'] is not None: # noqa: E501 + query_params.append(('inboxIds', local_var_params['inbox_ids'])) # noqa: E501 + collection_formats['inboxIds'] = 'multi' # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails/latest', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Email', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_latest_email_in_inbox1(self, inbox_id, **kwargs): # noqa: E501 + """Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. # noqa: E501 + + Get the newest email in all inboxes or in a passed set of inbox IDs # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_latest_email_in_inbox1(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: ID of the inbox you want to get the latest email from (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Email + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_latest_email_in_inbox1_with_http_info(inbox_id, **kwargs) # noqa: E501 + + def get_latest_email_in_inbox1_with_http_info(self, inbox_id, **kwargs): # noqa: E501 + """Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. # noqa: E501 + + Get the newest email in all inboxes or in a passed set of inbox IDs # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_latest_email_in_inbox1_with_http_info(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: ID of the inbox you want to get the latest email from (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(Email, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_latest_email_in_inbox1" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `get_latest_email_in_inbox1`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 + query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails/latestIn', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Email', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_organization_emails_paginated(self, **kwargs): # noqa: E501 + """Get all organization emails. List team or shared test email accounts # noqa: E501 + + By default returns all emails across all team inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_organization_emails_paginated(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param list[str] inbox_id: Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. + :param int page: Optional page index in email list pagination + :param int size: Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results + :param str sort: Optional createdAt sort direction ASC or DESC + :param bool unread_only: Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly + :param str search_filter: Optional search filter search filter for emails. + :param datetime since: Optional filter emails received after given date time + :param datetime before: Optional filter emails received before given date time + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageEmailProjection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_organization_emails_paginated_with_http_info(**kwargs) # noqa: E501 + + def get_organization_emails_paginated_with_http_info(self, **kwargs): # noqa: E501 + """Get all organization emails. List team or shared test email accounts # noqa: E501 + + By default returns all emails across all team inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_organization_emails_paginated_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param list[str] inbox_id: Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. + :param int page: Optional page index in email list pagination + :param int size: Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results + :param str sort: Optional createdAt sort direction ASC or DESC + :param bool unread_only: Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly + :param str search_filter: Optional search filter search filter for emails. + :param datetime since: Optional filter emails received after given date time + :param datetime before: Optional filter emails received before given date time + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageEmailProjection, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'page', + 'size', + 'sort', + 'unread_only', + 'search_filter', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_organization_emails_paginated" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `size` when calling `get_organization_emails_paginated`, must be a value less than or equal to `100`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 + query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 + collection_formats['inboxId'] = 'multi' # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'unread_only' in local_var_params and local_var_params['unread_only'] is not None: # noqa: E501 + query_params.append(('unreadOnly', local_var_params['unread_only'])) # noqa: E501 + if 'search_filter' in local_var_params and local_var_params['search_filter'] is not None: # noqa: E501 + query_params.append(('searchFilter', local_var_params['search_filter'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails/organization', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageEmailProjection', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_raw_email_contents(self, email_id, **kwargs): # noqa: E501 + """Get raw email string. Returns unparsed raw SMTP message with headers and body. # noqa: E501 + + Returns a raw, unparsed, and unprocessed email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawEmailJson endpoint # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_raw_email_contents(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_raw_email_contents_with_http_info(email_id, **kwargs) # noqa: E501 + + def get_raw_email_contents_with_http_info(self, email_id, **kwargs): # noqa: E501 + """Get raw email string. Returns unparsed raw SMTP message with headers and body. # noqa: E501 + + Returns a raw, unparsed, and unprocessed email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawEmailJson endpoint # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_raw_email_contents_with_http_info(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'email_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_raw_email_contents" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'email_id' is set + if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 + local_var_params['email_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `email_id` when calling `get_raw_email_contents`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'email_id' in local_var_params: + path_params['emailId'] = local_var_params['email_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails/{emailId}/raw', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_raw_email_json(self, email_id, **kwargs): # noqa: E501 + """Get raw email in JSON. Unparsed SMTP message in JSON wrapper format. # noqa: E501 + + Returns a raw, unparsed, and unprocessed email wrapped in a JSON response object for easier handling when compared with the getRawEmail text/plain response # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_raw_email_json(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: RawEmailJson + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_raw_email_json_with_http_info(email_id, **kwargs) # noqa: E501 + + def get_raw_email_json_with_http_info(self, email_id, **kwargs): # noqa: E501 + """Get raw email in JSON. Unparsed SMTP message in JSON wrapper format. # noqa: E501 + + Returns a raw, unparsed, and unprocessed email wrapped in a JSON response object for easier handling when compared with the getRawEmail text/plain response # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_raw_email_json_with_http_info(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(RawEmailJson, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'email_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_raw_email_json" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'email_id' is set + if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 + local_var_params['email_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `email_id` when calling `get_raw_email_json`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'email_id' in local_var_params: + path_params['emailId'] = local_var_params['email_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails/{emailId}/raw/json', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='RawEmailJson', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_unread_email_count(self, **kwargs): # noqa: E501 + """Get unread email count # noqa: E501 + + Get number of emails unread. Unread means has not been viewed in dashboard or returned in an email API response # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_unread_email_count(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: UnreadCount + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_unread_email_count_with_http_info(**kwargs) # noqa: E501 + + def get_unread_email_count_with_http_info(self, **kwargs): # noqa: E501 + """Get unread email count # noqa: E501 + + Get number of emails unread. Unread means has not been viewed in dashboard or returned in an email API response # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_unread_email_count_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(UnreadCount, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_unread_email_count" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails/unreadCount', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UnreadCount', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def mark_as_read(self, email_id, **kwargs): # noqa: E501 + """Mark an email as read on unread # noqa: E501 + + Marks an email as read or unread. Pass boolean read flag to set value. This is useful if you want to read an email but keep it as unread # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.mark_as_read(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: (required) + :param bool read: What value to assign to email read property. Default true. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: EmailPreview + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.mark_as_read_with_http_info(email_id, **kwargs) # noqa: E501 + + def mark_as_read_with_http_info(self, email_id, **kwargs): # noqa: E501 + """Mark an email as read on unread # noqa: E501 + + Marks an email as read or unread. Pass boolean read flag to set value. This is useful if you want to read an email but keep it as unread # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.mark_as_read_with_http_info(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: (required) + :param bool read: What value to assign to email read property. Default true. + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(EmailPreview, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'email_id', + 'read' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method mark_as_read" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'email_id' is set + if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 + local_var_params['email_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `email_id` when calling `mark_as_read`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'email_id' in local_var_params: + path_params['emailId'] = local_var_params['email_id'] # noqa: E501 + + query_params = [] + if 'read' in local_var_params and local_var_params['read'] is not None: # noqa: E501 + query_params.append(('read', local_var_params['read'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails/{emailId}/read', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='EmailPreview', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def reply_to_email(self, email_id, reply_to_email_options, **kwargs): # noqa: E501 + """Reply to an email # noqa: E501 + + Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.reply_to_email(email_id, reply_to_email_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of the email that should be replied to (required) + :param ReplyToEmailOptions reply_to_email_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: SentEmailDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.reply_to_email_with_http_info(email_id, reply_to_email_options, **kwargs) # noqa: E501 + + def reply_to_email_with_http_info(self, email_id, reply_to_email_options, **kwargs): # noqa: E501 + """Reply to an email # noqa: E501 + + Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.reply_to_email_with_http_info(email_id, reply_to_email_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of the email that should be replied to (required) + :param ReplyToEmailOptions reply_to_email_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(SentEmailDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'email_id', + 'reply_to_email_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method reply_to_email" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'email_id' is set + if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 + local_var_params['email_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `email_id` when calling `reply_to_email`") # noqa: E501 + # verify the required parameter 'reply_to_email_options' is set + if self.api_client.client_side_validation and ('reply_to_email_options' not in local_var_params or # noqa: E501 + local_var_params['reply_to_email_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `reply_to_email_options` when calling `reply_to_email`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'email_id' in local_var_params: + path_params['emailId'] = local_var_params['email_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'reply_to_email_options' in local_var_params: + body_params = local_var_params['reply_to_email_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails/{emailId}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SentEmailDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def send_email_source_optional(self, send_email_options, **kwargs): # noqa: E501 + """Send email # noqa: E501 + + Alias for `InboxController.sendEmail` method - see original method for full details. Sends an email from a given inbox that you have created. If no inbox is supplied a random inbox will be created for you and used to send the email. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.send_email_source_optional(send_email_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param SendEmailOptions send_email_options: (required) + :param str inbox_id: ID of the inbox you want to send the email from + :param bool use_domain_pool: Use domain pool. Optionally create inbox to send from using the mailslurp domain pool. + :param bool virtual_send: Optionally create inbox to send from that is a virtual inbox and won't send to external addresses + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.send_email_source_optional_with_http_info(send_email_options, **kwargs) # noqa: E501 + + def send_email_source_optional_with_http_info(self, send_email_options, **kwargs): # noqa: E501 + """Send email # noqa: E501 + + Alias for `InboxController.sendEmail` method - see original method for full details. Sends an email from a given inbox that you have created. If no inbox is supplied a random inbox will be created for you and used to send the email. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.send_email_source_optional_with_http_info(send_email_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param SendEmailOptions send_email_options: (required) + :param str inbox_id: ID of the inbox you want to send the email from + :param bool use_domain_pool: Use domain pool. Optionally create inbox to send from using the mailslurp domain pool. + :param bool virtual_send: Optionally create inbox to send from that is a virtual inbox and won't send to external addresses + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'send_email_options', + 'inbox_id', + 'use_domain_pool', + 'virtual_send' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method send_email_source_optional" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'send_email_options' is set + if self.api_client.client_side_validation and ('send_email_options' not in local_var_params or # noqa: E501 + local_var_params['send_email_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `send_email_options` when calling `send_email_source_optional`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 + query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 + if 'use_domain_pool' in local_var_params and local_var_params['use_domain_pool'] is not None: # noqa: E501 + query_params.append(('useDomainPool', local_var_params['use_domain_pool'])) # noqa: E501 + if 'virtual_send' in local_var_params and local_var_params['virtual_send'] is not None: # noqa: E501 + query_params.append(('virtualSend', local_var_params['virtual_send'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'send_email_options' in local_var_params: + body_params = local_var_params['send_email_options'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def validate_email(self, email_id, **kwargs): # noqa: E501 + """Validate email HTML contents # noqa: E501 + + Validate the HTML content of email if HTML is found. Considered valid if no HTML is present. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.validate_email(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: ValidationDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.validate_email_with_http_info(email_id, **kwargs) # noqa: E501 + + def validate_email_with_http_info(self, email_id, **kwargs): # noqa: E501 + """Validate email HTML contents # noqa: E501 + + Validate the HTML content of email if HTML is found. Considered valid if no HTML is present. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.validate_email_with_http_info(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ValidationDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'email_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method validate_email" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'email_id' is set + if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 + local_var_params['email_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `email_id` when calling `validate_email`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'email_id' in local_var_params: + path_params['emailId'] = local_var_params['email_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/emails/{emailId}/validate', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ValidationDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/mailslurp_client/api/email_verification_controller_api.py b/mailslurp_client/api/email_verification_controller_api.py new file mode 100644 index 00000000..be32015e --- /dev/null +++ b/mailslurp_client/api/email_verification_controller_api.py @@ -0,0 +1,300 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from mailslurp_client.api_client import ApiClient +from mailslurp_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class EmailVerificationControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def get_validation_requests(self, **kwargs): # noqa: E501 + """Validate a list of email addresses. Per unit billing. See your plan for pricing. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_validation_requests(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in list pagination + :param int size: Optional page size for paginated result list. + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param bool is_valid: Filter where email is valid is true or false + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageEmailValidationRequest + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_validation_requests_with_http_info(**kwargs) # noqa: E501 + + def get_validation_requests_with_http_info(self, **kwargs): # noqa: E501 + """Validate a list of email addresses. Per unit billing. See your plan for pricing. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_validation_requests_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in list pagination + :param int size: Optional page size for paginated result list. + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param bool is_valid: Filter where email is valid is true or false + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageEmailValidationRequest, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page', + 'size', + 'sort', + 'search_filter', + 'since', + 'before', + 'is_valid' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_validation_requests" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] > 9223372036854775807: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `get_validation_requests`, must be a value less than or equal to `9223372036854775807`") # noqa: E501 + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `get_validation_requests`, must be a value greater than or equal to `0`") # noqa: E501 + if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `size` when calling `get_validation_requests`, must be a value less than or equal to `100`") # noqa: E501 + if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `size` when calling `get_validation_requests`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'search_filter' in local_var_params and local_var_params['search_filter'] is not None: # noqa: E501 + query_params.append(('searchFilter', local_var_params['search_filter'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + if 'is_valid' in local_var_params and local_var_params['is_valid'] is not None: # noqa: E501 + query_params.append(('isValid', local_var_params['is_valid'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/email-verification/validation-requests', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageEmailValidationRequest', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def validate_email_address_list(self, validate_email_address_list_options, **kwargs): # noqa: E501 + """Validate a list of email addresses. Per unit billing. See your plan for pricing. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.validate_email_address_list(validate_email_address_list_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param ValidateEmailAddressListOptions validate_email_address_list_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: ValidateEmailAddressListResult + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.validate_email_address_list_with_http_info(validate_email_address_list_options, **kwargs) # noqa: E501 + + def validate_email_address_list_with_http_info(self, validate_email_address_list_options, **kwargs): # noqa: E501 + """Validate a list of email addresses. Per unit billing. See your plan for pricing. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.validate_email_address_list_with_http_info(validate_email_address_list_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param ValidateEmailAddressListOptions validate_email_address_list_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ValidateEmailAddressListResult, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'validate_email_address_list_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method validate_email_address_list" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'validate_email_address_list_options' is set + if self.api_client.client_side_validation and ('validate_email_address_list_options' not in local_var_params or # noqa: E501 + local_var_params['validate_email_address_list_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `validate_email_address_list_options` when calling `validate_email_address_list`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'validate_email_address_list_options' in local_var_params: + body_params = local_var_params['validate_email_address_list_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/email-verification/email-address-list', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ValidateEmailAddressListResult', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/mailslurp_client/api/expired_controller_api.py b/mailslurp_client/api/expired_controller_api.py new file mode 100644 index 00000000..f3f53022 --- /dev/null +++ b/mailslurp_client/api/expired_controller_api.py @@ -0,0 +1,501 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from mailslurp_client.api_client import ApiClient +from mailslurp_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class ExpiredControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def get_expiration_defaults(self, **kwargs): # noqa: E501 + """Get default expiration settings # noqa: E501 + + Return default times used for inbox expiration # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_expiration_defaults(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: ExpirationDefaults + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_expiration_defaults_with_http_info(**kwargs) # noqa: E501 + + def get_expiration_defaults_with_http_info(self, **kwargs): # noqa: E501 + """Get default expiration settings # noqa: E501 + + Return default times used for inbox expiration # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_expiration_defaults_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ExpirationDefaults, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_expiration_defaults" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/expired/defaults', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ExpirationDefaults', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_expired_inbox_by_inbox_id(self, inbox_id, **kwargs): # noqa: E501 + """Get expired inbox record for a previously existing inbox # noqa: E501 + + Use the inboxId to return an ExpiredInboxRecord if an inbox has expired. Inboxes expire and are disabled if an expiration date is set or plan requires. Returns 404 if no expired inbox is found for the inboxId # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_expired_inbox_by_inbox_id(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: ID of inbox you want to retrieve (not the inbox ID) (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: ExpiredInboxDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_expired_inbox_by_inbox_id_with_http_info(inbox_id, **kwargs) # noqa: E501 + + def get_expired_inbox_by_inbox_id_with_http_info(self, inbox_id, **kwargs): # noqa: E501 + """Get expired inbox record for a previously existing inbox # noqa: E501 + + Use the inboxId to return an ExpiredInboxRecord if an inbox has expired. Inboxes expire and are disabled if an expiration date is set or plan requires. Returns 404 if no expired inbox is found for the inboxId # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_expired_inbox_by_inbox_id_with_http_info(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: ID of inbox you want to retrieve (not the inbox ID) (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ExpiredInboxDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_expired_inbox_by_inbox_id" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `get_expired_inbox_by_inbox_id`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'inbox_id' in local_var_params: + path_params['inboxId'] = local_var_params['inbox_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/expired/inbox/{inboxId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ExpiredInboxDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_expired_inbox_record(self, expired_id, **kwargs): # noqa: E501 + """Get an expired inbox record # noqa: E501 + + Inboxes created with an expiration date will expire after the given date and be moved to an ExpiredInbox entity. You can still read emails in the inbox but it can no longer send or receive emails. Fetch the expired inboxes to view the old inboxes properties # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_expired_inbox_record(expired_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str expired_id: ID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: ExpiredInboxDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_expired_inbox_record_with_http_info(expired_id, **kwargs) # noqa: E501 + + def get_expired_inbox_record_with_http_info(self, expired_id, **kwargs): # noqa: E501 + """Get an expired inbox record # noqa: E501 + + Inboxes created with an expiration date will expire after the given date and be moved to an ExpiredInbox entity. You can still read emails in the inbox but it can no longer send or receive emails. Fetch the expired inboxes to view the old inboxes properties # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_expired_inbox_record_with_http_info(expired_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str expired_id: ID of the ExpiredInboxRecord you want to retrieve. This is different from the ID of the inbox you are interested in. See other methods for getting ExpiredInboxRecord for an inbox inboxId (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ExpiredInboxDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'expired_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_expired_inbox_record" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'expired_id' is set + if self.api_client.client_side_validation and ('expired_id' not in local_var_params or # noqa: E501 + local_var_params['expired_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `expired_id` when calling `get_expired_inbox_record`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'expired_id' in local_var_params: + path_params['expiredId'] = local_var_params['expired_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/expired/{expiredId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ExpiredInboxDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_expired_inboxes(self, **kwargs): # noqa: E501 + """List records of expired inboxes # noqa: E501 + + Inboxes created with an expiration date will expire after the given date. An ExpiredInboxRecord is created that records the inboxes old ID and email address. You can still read emails in the inbox (using the inboxes old ID) but the email address associated with the inbox can no longer send or receive emails. Fetch expired inbox records to view the old inboxes properties # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_expired_inboxes(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in inbox sent email list pagination + :param int size: Optional page size in inbox sent email list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageExpiredInboxRecordProjection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_expired_inboxes_with_http_info(**kwargs) # noqa: E501 + + def get_expired_inboxes_with_http_info(self, **kwargs): # noqa: E501 + """List records of expired inboxes # noqa: E501 + + Inboxes created with an expiration date will expire after the given date. An ExpiredInboxRecord is created that records the inboxes old ID and email address. You can still read emails in the inbox (using the inboxes old ID) but the email address associated with the inbox can no longer send or receive emails. Fetch expired inbox records to view the old inboxes properties # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_expired_inboxes_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in inbox sent email list pagination + :param int size: Optional page size in inbox sent email list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageExpiredInboxRecordProjection, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page', + 'size', + 'sort', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_expired_inboxes" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/expired', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageExpiredInboxRecordProjection', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/mailslurp_client/api/export_controller_api.py b/mailslurp_client/api/export_controller_api.py new file mode 100644 index 00000000..38b462ca --- /dev/null +++ b/mailslurp_client/api/export_controller_api.py @@ -0,0 +1,323 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from mailslurp_client.api_client import ApiClient +from mailslurp_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class ExportControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def export_entities(self, export_type, api_key, output_format, **kwargs): # noqa: E501 + """Export inboxes link callable via browser # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.export_entities(export_type, api_key, output_format, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str export_type: (required) + :param str api_key: (required) + :param str output_format: (required) + :param str filter: + :param str list_separator_token: + :param bool exclude_previously_exported: + :param datetime created_earliest_time: + :param datetime created_oldest_time: + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: list[str] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.export_entities_with_http_info(export_type, api_key, output_format, **kwargs) # noqa: E501 + + def export_entities_with_http_info(self, export_type, api_key, output_format, **kwargs): # noqa: E501 + """Export inboxes link callable via browser # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.export_entities_with_http_info(export_type, api_key, output_format, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str export_type: (required) + :param str api_key: (required) + :param str output_format: (required) + :param str filter: + :param str list_separator_token: + :param bool exclude_previously_exported: + :param datetime created_earliest_time: + :param datetime created_oldest_time: + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[str], status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'export_type', + 'api_key', + 'output_format', + 'filter', + 'list_separator_token', + 'exclude_previously_exported', + 'created_earliest_time', + 'created_oldest_time' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method export_entities" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'export_type' is set + if self.api_client.client_side_validation and ('export_type' not in local_var_params or # noqa: E501 + local_var_params['export_type'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `export_type` when calling `export_entities`") # noqa: E501 + # verify the required parameter 'api_key' is set + if self.api_client.client_side_validation and ('api_key' not in local_var_params or # noqa: E501 + local_var_params['api_key'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `api_key` when calling `export_entities`") # noqa: E501 + # verify the required parameter 'output_format' is set + if self.api_client.client_side_validation and ('output_format' not in local_var_params or # noqa: E501 + local_var_params['output_format'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `output_format` when calling `export_entities`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'export_type' in local_var_params and local_var_params['export_type'] is not None: # noqa: E501 + query_params.append(('exportType', local_var_params['export_type'])) # noqa: E501 + if 'api_key' in local_var_params and local_var_params['api_key'] is not None: # noqa: E501 + query_params.append(('apiKey', local_var_params['api_key'])) # noqa: E501 + if 'output_format' in local_var_params and local_var_params['output_format'] is not None: # noqa: E501 + query_params.append(('outputFormat', local_var_params['output_format'])) # noqa: E501 + if 'filter' in local_var_params and local_var_params['filter'] is not None: # noqa: E501 + query_params.append(('filter', local_var_params['filter'])) # noqa: E501 + if 'list_separator_token' in local_var_params and local_var_params['list_separator_token'] is not None: # noqa: E501 + query_params.append(('listSeparatorToken', local_var_params['list_separator_token'])) # noqa: E501 + if 'exclude_previously_exported' in local_var_params and local_var_params['exclude_previously_exported'] is not None: # noqa: E501 + query_params.append(('excludePreviouslyExported', local_var_params['exclude_previously_exported'])) # noqa: E501 + if 'created_earliest_time' in local_var_params and local_var_params['created_earliest_time'] is not None: # noqa: E501 + query_params.append(('createdEarliestTime', local_var_params['created_earliest_time'])) # noqa: E501 + if 'created_oldest_time' in local_var_params and local_var_params['created_oldest_time'] is not None: # noqa: E501 + query_params.append(('createdOldestTime', local_var_params['created_oldest_time'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/export', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[str]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_export_link(self, export_type, export_options, **kwargs): # noqa: E501 + """Get export link # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_export_link(export_type, export_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str export_type: (required) + :param ExportOptions export_options: (required) + :param str api_key: + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: ExportLink + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_export_link_with_http_info(export_type, export_options, **kwargs) # noqa: E501 + + def get_export_link_with_http_info(self, export_type, export_options, **kwargs): # noqa: E501 + """Get export link # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_export_link_with_http_info(export_type, export_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str export_type: (required) + :param ExportOptions export_options: (required) + :param str api_key: + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ExportLink, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'export_type', + 'export_options', + 'api_key' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_export_link" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'export_type' is set + if self.api_client.client_side_validation and ('export_type' not in local_var_params or # noqa: E501 + local_var_params['export_type'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `export_type` when calling `get_export_link`") # noqa: E501 + # verify the required parameter 'export_options' is set + if self.api_client.client_side_validation and ('export_options' not in local_var_params or # noqa: E501 + local_var_params['export_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `export_options` when calling `get_export_link`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'export_type' in local_var_params and local_var_params['export_type'] is not None: # noqa: E501 + query_params.append(('exportType', local_var_params['export_type'])) # noqa: E501 + if 'api_key' in local_var_params and local_var_params['api_key'] is not None: # noqa: E501 + query_params.append(('apiKey', local_var_params['api_key'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'export_options' in local_var_params: + body_params = local_var_params['export_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/export', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ExportLink', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/mailslurp_client/api/form_controller_api.py b/mailslurp_client/api/form_controller_api.py new file mode 100644 index 00000000..731e937e --- /dev/null +++ b/mailslurp_client/api/form_controller_api.py @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from mailslurp_client.api_client import ApiClient +from mailslurp_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class FormControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def submit_form(self, **kwargs): # noqa: E501 + """Submit a form to be parsed and sent as an email to an address determined by the form fields # noqa: E501 + + This endpoint allows you to submit HTML forms and receive the field values and files via email. #### Parameters The endpoint looks for special meta parameters in the form fields OR in the URL request parameters. The meta parameters can be used to specify the behaviour of the email. You must provide at-least a `_to` email address to tell the endpoint where the form should be emailed. These can be submitted as hidden HTML input fields with the corresponding `name` attributes or as URL query parameters such as `?_to=test@example.com` The endpoint takes all other form fields that are named and includes them in the message body of the email. Files are sent as attachments. #### Submitting This endpoint accepts form submission via POST method. It accepts `application/x-www-form-urlencoded`, and `multipart/form-data` content-types. #### HTML Example ```html
``` #### URL Example ```html
``` The email address is specified by a `_to` field OR is extracted from an email alias specified by a `_toAlias` field (see the alias controller for more information). Endpoint accepts . You can specify a content type in HTML forms using the `enctype` attribute, for instance: `
`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.submit_form(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str to: The email address that submitted form should be sent to. + :param str subject: Optional subject of the email that will be sent. + :param str redirect_to: Optional URL to redirect form submitter to after submission. If not present user will see a success message. + :param str email_address: Email address of the submitting user. Include this if you wish to record the submitters email address and reply to it later. + :param str success_message: Optional success message to display if no _redirectTo present. + :param str spam_check: Optional but recommended field that catches spammers out. Include as a hidden form field but LEAVE EMPTY. Spam-bots will usually fill every field. If the _spamCheck field is filled the form submission will be ignored. + :param str other_parameters: All other parameters or fields will be accepted and attached to the sent email. This includes files and any HTML form field with a name. These fields will become the body of the email that is sent. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.submit_form_with_http_info(**kwargs) # noqa: E501 + + def submit_form_with_http_info(self, **kwargs): # noqa: E501 + """Submit a form to be parsed and sent as an email to an address determined by the form fields # noqa: E501 + + This endpoint allows you to submit HTML forms and receive the field values and files via email. #### Parameters The endpoint looks for special meta parameters in the form fields OR in the URL request parameters. The meta parameters can be used to specify the behaviour of the email. You must provide at-least a `_to` email address to tell the endpoint where the form should be emailed. These can be submitted as hidden HTML input fields with the corresponding `name` attributes or as URL query parameters such as `?_to=test@example.com` The endpoint takes all other form fields that are named and includes them in the message body of the email. Files are sent as attachments. #### Submitting This endpoint accepts form submission via POST method. It accepts `application/x-www-form-urlencoded`, and `multipart/form-data` content-types. #### HTML Example ```html
``` #### URL Example ```html
``` The email address is specified by a `_to` field OR is extracted from an email alias specified by a `_toAlias` field (see the alias controller for more information). Endpoint accepts . You can specify a content type in HTML forms using the `enctype` attribute, for instance: `
`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.submit_form_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str to: The email address that submitted form should be sent to. + :param str subject: Optional subject of the email that will be sent. + :param str redirect_to: Optional URL to redirect form submitter to after submission. If not present user will see a success message. + :param str email_address: Email address of the submitting user. Include this if you wish to record the submitters email address and reply to it later. + :param str success_message: Optional success message to display if no _redirectTo present. + :param str spam_check: Optional but recommended field that catches spammers out. Include as a hidden form field but LEAVE EMPTY. Spam-bots will usually fill every field. If the _spamCheck field is filled the form submission will be ignored. + :param str other_parameters: All other parameters or fields will be accepted and attached to the sent email. This includes files and any HTML form field with a name. These fields will become the body of the email that is sent. + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'to', + 'subject', + 'redirect_to', + 'email_address', + 'success_message', + 'spam_check', + 'other_parameters' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method submit_form" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'to' in local_var_params and local_var_params['to'] is not None: # noqa: E501 + query_params.append(('_to', local_var_params['to'])) # noqa: E501 + if 'subject' in local_var_params and local_var_params['subject'] is not None: # noqa: E501 + query_params.append(('_subject', local_var_params['subject'])) # noqa: E501 + if 'redirect_to' in local_var_params and local_var_params['redirect_to'] is not None: # noqa: E501 + query_params.append(('_redirectTo', local_var_params['redirect_to'])) # noqa: E501 + if 'email_address' in local_var_params and local_var_params['email_address'] is not None: # noqa: E501 + query_params.append(('_emailAddress', local_var_params['email_address'])) # noqa: E501 + if 'success_message' in local_var_params and local_var_params['success_message'] is not None: # noqa: E501 + query_params.append(('_successMessage', local_var_params['success_message'])) # noqa: E501 + if 'spam_check' in local_var_params and local_var_params['spam_check'] is not None: # noqa: E501 + query_params.append(('_spamCheck', local_var_params['spam_check'])) # noqa: E501 + if 'other_parameters' in local_var_params and local_var_params['other_parameters'] is not None: # noqa: E501 + query_params.append(('otherParameters', local_var_params['other_parameters'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/forms', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/mailslurp_client/api/group_controller_api.py b/mailslurp_client/api/group_controller_api.py new file mode 100644 index 00000000..8d9c040b --- /dev/null +++ b/mailslurp_client/api/group_controller_api.py @@ -0,0 +1,1106 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from mailslurp_client.api_client import ApiClient +from mailslurp_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class GroupControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def add_contacts_to_group(self, group_id, update_group_contacts, **kwargs): # noqa: E501 + """Add contacts to a group # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_contacts_to_group(group_id, update_group_contacts, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str group_id: (required) + :param UpdateGroupContacts update_group_contacts: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: GroupContactsDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.add_contacts_to_group_with_http_info(group_id, update_group_contacts, **kwargs) # noqa: E501 + + def add_contacts_to_group_with_http_info(self, group_id, update_group_contacts, **kwargs): # noqa: E501 + """Add contacts to a group # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.add_contacts_to_group_with_http_info(group_id, update_group_contacts, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str group_id: (required) + :param UpdateGroupContacts update_group_contacts: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(GroupContactsDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'group_id', + 'update_group_contacts' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method add_contacts_to_group" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'group_id' is set + if self.api_client.client_side_validation and ('group_id' not in local_var_params or # noqa: E501 + local_var_params['group_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `group_id` when calling `add_contacts_to_group`") # noqa: E501 + # verify the required parameter 'update_group_contacts' is set + if self.api_client.client_side_validation and ('update_group_contacts' not in local_var_params or # noqa: E501 + local_var_params['update_group_contacts'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `update_group_contacts` when calling `add_contacts_to_group`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'group_id' in local_var_params: + path_params['groupId'] = local_var_params['group_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'update_group_contacts' in local_var_params: + body_params = local_var_params['update_group_contacts'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/groups/{groupId}/contacts', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GroupContactsDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_group(self, create_group_options, **kwargs): # noqa: E501 + """Create a group # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_group(create_group_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param CreateGroupOptions create_group_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: GroupDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_group_with_http_info(create_group_options, **kwargs) # noqa: E501 + + def create_group_with_http_info(self, create_group_options, **kwargs): # noqa: E501 + """Create a group # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_group_with_http_info(create_group_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param CreateGroupOptions create_group_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(GroupDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'create_group_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_group" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'create_group_options' is set + if self.api_client.client_side_validation and ('create_group_options' not in local_var_params or # noqa: E501 + local_var_params['create_group_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `create_group_options` when calling `create_group`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'create_group_options' in local_var_params: + body_params = local_var_params['create_group_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/groups', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GroupDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_group(self, group_id, **kwargs): # noqa: E501 + """Delete group # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_group(group_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str group_id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_group_with_http_info(group_id, **kwargs) # noqa: E501 + + def delete_group_with_http_info(self, group_id, **kwargs): # noqa: E501 + """Delete group # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_group_with_http_info(group_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str group_id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'group_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_group" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'group_id' is set + if self.api_client.client_side_validation and ('group_id' not in local_var_params or # noqa: E501 + local_var_params['group_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `group_id` when calling `delete_group`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'group_id' in local_var_params: + path_params['groupId'] = local_var_params['group_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/groups/{groupId}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_all_groups(self, **kwargs): # noqa: E501 + """Get all Contact Groups in paginated format # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_groups(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in list pagination + :param int size: Optional page size in list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageGroupProjection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_all_groups_with_http_info(**kwargs) # noqa: E501 + + def get_all_groups_with_http_info(self, **kwargs): # noqa: E501 + """Get all Contact Groups in paginated format # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_groups_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in list pagination + :param int size: Optional page size in list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageGroupProjection, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page', + 'size', + 'sort', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_groups" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/groups/paginated', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageGroupProjection', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_group(self, group_id, **kwargs): # noqa: E501 + """Get group # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_group(group_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str group_id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: GroupDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_group_with_http_info(group_id, **kwargs) # noqa: E501 + + def get_group_with_http_info(self, group_id, **kwargs): # noqa: E501 + """Get group # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_group_with_http_info(group_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str group_id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(GroupDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'group_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_group" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'group_id' is set + if self.api_client.client_side_validation and ('group_id' not in local_var_params or # noqa: E501 + local_var_params['group_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `group_id` when calling `get_group`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'group_id' in local_var_params: + path_params['groupId'] = local_var_params['group_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/groups/{groupId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GroupDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_group_with_contacts(self, group_id, **kwargs): # noqa: E501 + """Get group and contacts belonging to it # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_group_with_contacts(group_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str group_id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: GroupContactsDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_group_with_contacts_with_http_info(group_id, **kwargs) # noqa: E501 + + def get_group_with_contacts_with_http_info(self, group_id, **kwargs): # noqa: E501 + """Get group and contacts belonging to it # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_group_with_contacts_with_http_info(group_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str group_id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(GroupContactsDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'group_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_group_with_contacts" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'group_id' is set + if self.api_client.client_side_validation and ('group_id' not in local_var_params or # noqa: E501 + local_var_params['group_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `group_id` when calling `get_group_with_contacts`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'group_id' in local_var_params: + path_params['groupId'] = local_var_params['group_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/groups/{groupId}/contacts', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GroupContactsDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_group_with_contacts_paginated(self, group_id, **kwargs): # noqa: E501 + """get_group_with_contacts_paginated # noqa: E501 + + Get group and paginated contacts belonging to it # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_group_with_contacts_paginated(group_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str group_id: (required) + :param int page: Optional page index in group contact pagination + :param int size: Optional page size in group contact pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageContactProjection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_group_with_contacts_paginated_with_http_info(group_id, **kwargs) # noqa: E501 + + def get_group_with_contacts_paginated_with_http_info(self, group_id, **kwargs): # noqa: E501 + """get_group_with_contacts_paginated # noqa: E501 + + Get group and paginated contacts belonging to it # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_group_with_contacts_paginated_with_http_info(group_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str group_id: (required) + :param int page: Optional page index in group contact pagination + :param int size: Optional page size in group contact pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageContactProjection, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'group_id', + 'page', + 'size', + 'sort', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_group_with_contacts_paginated" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'group_id' is set + if self.api_client.client_side_validation and ('group_id' not in local_var_params or # noqa: E501 + local_var_params['group_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `group_id` when calling `get_group_with_contacts_paginated`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'group_id' in local_var_params: + path_params['groupId'] = local_var_params['group_id'] # noqa: E501 + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/groups/{groupId}/contacts-paginated', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageContactProjection', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_groups(self, **kwargs): # noqa: E501 + """Get all groups # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_groups(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: list[GroupProjection] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_groups_with_http_info(**kwargs) # noqa: E501 + + def get_groups_with_http_info(self, **kwargs): # noqa: E501 + """Get all groups # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_groups_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[GroupProjection], status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_groups" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/groups', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[GroupProjection]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def remove_contacts_from_group(self, group_id, update_group_contacts, **kwargs): # noqa: E501 + """Remove contacts from a group # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.remove_contacts_from_group(group_id, update_group_contacts, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str group_id: (required) + :param UpdateGroupContacts update_group_contacts: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: GroupContactsDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.remove_contacts_from_group_with_http_info(group_id, update_group_contacts, **kwargs) # noqa: E501 + + def remove_contacts_from_group_with_http_info(self, group_id, update_group_contacts, **kwargs): # noqa: E501 + """Remove contacts from a group # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.remove_contacts_from_group_with_http_info(group_id, update_group_contacts, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str group_id: (required) + :param UpdateGroupContacts update_group_contacts: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(GroupContactsDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'group_id', + 'update_group_contacts' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method remove_contacts_from_group" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'group_id' is set + if self.api_client.client_side_validation and ('group_id' not in local_var_params or # noqa: E501 + local_var_params['group_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `group_id` when calling `remove_contacts_from_group`") # noqa: E501 + # verify the required parameter 'update_group_contacts' is set + if self.api_client.client_side_validation and ('update_group_contacts' not in local_var_params or # noqa: E501 + local_var_params['update_group_contacts'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `update_group_contacts` when calling `remove_contacts_from_group`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'group_id' in local_var_params: + path_params['groupId'] = local_var_params['group_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'update_group_contacts' in local_var_params: + body_params = local_var_params['update_group_contacts'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/groups/{groupId}/contacts', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GroupContactsDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/mailslurp_client/api/inbox_controller_api.py b/mailslurp_client/api/inbox_controller_api.py new file mode 100644 index 00000000..4c375b91 --- /dev/null +++ b/mailslurp_client/api/inbox_controller_api.py @@ -0,0 +1,4260 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from mailslurp_client.api_client import ApiClient +from mailslurp_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class InboxControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_inbox(self, **kwargs): # noqa: E501 + """Create an inbox email address. An inbox has a real email address and can send and receive emails. Inboxes can be either `SMTP` or `HTTP` inboxes. # noqa: E501 + + Create a new inbox and with a randomized email address to send and receive from. Pass emailAddress parameter if you wish to use a specific email address. Creating an inbox is required before sending or receiving emails. If writing tests it is recommended that you create a new inbox during each test method so that it is unique and empty. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_inbox(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_address: A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as `123@mailslurp.com`. If you use the `useDomainPool` option when the email address is null it will generate an email address with a more varied domain ending such as `123@mailslurp.info` or `123@mailslurp.biz`. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Note domain types must match the inbox type - so `SMTP` inboxes will only work with `SMTP` type domains. Avoid `SMTP` inboxes if you need to send emails as they can only receive. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. + :param list[str] tags: Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. + :param str name: Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails. + :param str description: Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with + :param bool use_domain_pool: Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default `@mailslurp.com` email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in `@mailslurp.{world,info,xyz,...}` . This means a TLD is randomly selecting from a list of `.biz`, `.info`, `.xyz` etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of `@mailslurp.com` or custom email address provided by the emailAddress field. Note this feature is only available for `HTTP` inbox types. + :param bool favourite: Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering + :param datetime expires_at: Optional inbox expiration date. If null then this inbox is permanent and the emails in it won't be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX. + :param int expires_in: Number of milliseconds that inbox should exist for + :param bool allow_team_access: DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization. + :param str inbox_type: HTTP (default) or SMTP inbox type. HTTP inboxes are default and best solution for most cases. SMTP inboxes are more reliable for public inbound email consumption (but do not support sending emails). When using custom domains the domain type must match the inbox type. HTTP inboxes are processed by AWS SES while SMTP inboxes use a custom mail server running at `mx.mailslurp.com`. + :param bool virtual_inbox: Virtual inbox prevents any outbound emails from being sent. It creates sent email records but will never send real emails to recipients. Great for testing and faking email sending. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: InboxDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_inbox_with_http_info(**kwargs) # noqa: E501 + + def create_inbox_with_http_info(self, **kwargs): # noqa: E501 + """Create an inbox email address. An inbox has a real email address and can send and receive emails. Inboxes can be either `SMTP` or `HTTP` inboxes. # noqa: E501 + + Create a new inbox and with a randomized email address to send and receive from. Pass emailAddress parameter if you wish to use a specific email address. Creating an inbox is required before sending or receiving emails. If writing tests it is recommended that you create a new inbox during each test method so that it is unique and empty. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_inbox_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_address: A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as `123@mailslurp.com`. If you use the `useDomainPool` option when the email address is null it will generate an email address with a more varied domain ending such as `123@mailslurp.info` or `123@mailslurp.biz`. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Note domain types must match the inbox type - so `SMTP` inboxes will only work with `SMTP` type domains. Avoid `SMTP` inboxes if you need to send emails as they can only receive. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. + :param list[str] tags: Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. + :param str name: Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails. + :param str description: Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with + :param bool use_domain_pool: Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default `@mailslurp.com` email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in `@mailslurp.{world,info,xyz,...}` . This means a TLD is randomly selecting from a list of `.biz`, `.info`, `.xyz` etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of `@mailslurp.com` or custom email address provided by the emailAddress field. Note this feature is only available for `HTTP` inbox types. + :param bool favourite: Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering + :param datetime expires_at: Optional inbox expiration date. If null then this inbox is permanent and the emails in it won't be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX. + :param int expires_in: Number of milliseconds that inbox should exist for + :param bool allow_team_access: DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization. + :param str inbox_type: HTTP (default) or SMTP inbox type. HTTP inboxes are default and best solution for most cases. SMTP inboxes are more reliable for public inbound email consumption (but do not support sending emails). When using custom domains the domain type must match the inbox type. HTTP inboxes are processed by AWS SES while SMTP inboxes use a custom mail server running at `mx.mailslurp.com`. + :param bool virtual_inbox: Virtual inbox prevents any outbound emails from being sent. It creates sent email records but will never send real emails to recipients. Great for testing and faking email sending. + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(InboxDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'email_address', + 'tags', + 'name', + 'description', + 'use_domain_pool', + 'favourite', + 'expires_at', + 'expires_in', + 'allow_team_access', + 'inbox_type', + 'virtual_inbox' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_inbox" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'email_address' in local_var_params and local_var_params['email_address'] is not None: # noqa: E501 + query_params.append(('emailAddress', local_var_params['email_address'])) # noqa: E501 + if 'tags' in local_var_params and local_var_params['tags'] is not None: # noqa: E501 + query_params.append(('tags', local_var_params['tags'])) # noqa: E501 + collection_formats['tags'] = 'multi' # noqa: E501 + if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 + query_params.append(('name', local_var_params['name'])) # noqa: E501 + if 'description' in local_var_params and local_var_params['description'] is not None: # noqa: E501 + query_params.append(('description', local_var_params['description'])) # noqa: E501 + if 'use_domain_pool' in local_var_params and local_var_params['use_domain_pool'] is not None: # noqa: E501 + query_params.append(('useDomainPool', local_var_params['use_domain_pool'])) # noqa: E501 + if 'favourite' in local_var_params and local_var_params['favourite'] is not None: # noqa: E501 + query_params.append(('favourite', local_var_params['favourite'])) # noqa: E501 + if 'expires_at' in local_var_params and local_var_params['expires_at'] is not None: # noqa: E501 + query_params.append(('expiresAt', local_var_params['expires_at'])) # noqa: E501 + if 'expires_in' in local_var_params and local_var_params['expires_in'] is not None: # noqa: E501 + query_params.append(('expiresIn', local_var_params['expires_in'])) # noqa: E501 + if 'allow_team_access' in local_var_params and local_var_params['allow_team_access'] is not None: # noqa: E501 + query_params.append(('allowTeamAccess', local_var_params['allow_team_access'])) # noqa: E501 + if 'inbox_type' in local_var_params and local_var_params['inbox_type'] is not None: # noqa: E501 + query_params.append(('inboxType', local_var_params['inbox_type'])) # noqa: E501 + if 'virtual_inbox' in local_var_params and local_var_params['virtual_inbox'] is not None: # noqa: E501 + query_params.append(('virtualInbox', local_var_params['virtual_inbox'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InboxDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_inbox_ruleset(self, inbox_id, create_inbox_ruleset_options, **kwargs): # noqa: E501 + """Create an inbox ruleset # noqa: E501 + + Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_inbox_ruleset(inbox_id, create_inbox_ruleset_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: inboxId (required) + :param CreateInboxRulesetOptions create_inbox_ruleset_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: InboxRulesetDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_inbox_ruleset_with_http_info(inbox_id, create_inbox_ruleset_options, **kwargs) # noqa: E501 + + def create_inbox_ruleset_with_http_info(self, inbox_id, create_inbox_ruleset_options, **kwargs): # noqa: E501 + """Create an inbox ruleset # noqa: E501 + + Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_inbox_ruleset_with_http_info(inbox_id, create_inbox_ruleset_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: inboxId (required) + :param CreateInboxRulesetOptions create_inbox_ruleset_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(InboxRulesetDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'create_inbox_ruleset_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_inbox_ruleset" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `create_inbox_ruleset`") # noqa: E501 + # verify the required parameter 'create_inbox_ruleset_options' is set + if self.api_client.client_side_validation and ('create_inbox_ruleset_options' not in local_var_params or # noqa: E501 + local_var_params['create_inbox_ruleset_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `create_inbox_ruleset_options` when calling `create_inbox_ruleset`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'inbox_id' in local_var_params: + path_params['inboxId'] = local_var_params['inbox_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'create_inbox_ruleset_options' in local_var_params: + body_params = local_var_params['create_inbox_ruleset_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/{inboxId}/rulesets', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InboxRulesetDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_inbox_with_defaults(self, **kwargs): # noqa: E501 + """Create an inbox with default options. Uses MailSlurp domain pool address and is private. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_inbox_with_defaults(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: InboxDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_inbox_with_defaults_with_http_info(**kwargs) # noqa: E501 + + def create_inbox_with_defaults_with_http_info(self, **kwargs): # noqa: E501 + """Create an inbox with default options. Uses MailSlurp domain pool address and is private. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_inbox_with_defaults_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(InboxDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_inbox_with_defaults" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/withDefaults', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InboxDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_inbox_with_options(self, create_inbox_dto, **kwargs): # noqa: E501 + """Create an inbox with options. Extended options for inbox creation. # noqa: E501 + + Additional endpoint that allows inbox creation with request body options. Can be more flexible that other methods for some clients. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_inbox_with_options(create_inbox_dto, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param CreateInboxDto create_inbox_dto: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: InboxDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_inbox_with_options_with_http_info(create_inbox_dto, **kwargs) # noqa: E501 + + def create_inbox_with_options_with_http_info(self, create_inbox_dto, **kwargs): # noqa: E501 + """Create an inbox with options. Extended options for inbox creation. # noqa: E501 + + Additional endpoint that allows inbox creation with request body options. Can be more flexible that other methods for some clients. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_inbox_with_options_with_http_info(create_inbox_dto, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param CreateInboxDto create_inbox_dto: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(InboxDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'create_inbox_dto' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_inbox_with_options" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'create_inbox_dto' is set + if self.api_client.client_side_validation and ('create_inbox_dto' not in local_var_params or # noqa: E501 + local_var_params['create_inbox_dto'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `create_inbox_dto` when calling `create_inbox_with_options`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'create_inbox_dto' in local_var_params: + body_params = local_var_params['create_inbox_dto'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/withOptions', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InboxDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_all_inbox_emails(self, inbox_id, **kwargs): # noqa: E501 + """Delete all emails in a given inboxes. # noqa: E501 + + Deletes all emails in an inbox. Be careful as emails cannot be recovered # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_all_inbox_emails(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_all_inbox_emails_with_http_info(inbox_id, **kwargs) # noqa: E501 + + def delete_all_inbox_emails_with_http_info(self, inbox_id, **kwargs): # noqa: E501 + """Delete all emails in a given inboxes. # noqa: E501 + + Deletes all emails in an inbox. Be careful as emails cannot be recovered # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_all_inbox_emails_with_http_info(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_all_inbox_emails" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `delete_all_inbox_emails`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'inbox_id' in local_var_params: + path_params['inboxId'] = local_var_params['inbox_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/{inboxId}/deleteAllInboxEmails', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_all_inboxes(self, **kwargs): # noqa: E501 + """Delete all inboxes # noqa: E501 + + Permanently delete all inboxes and associated email addresses. This will also delete all emails within the inboxes. Be careful as inboxes cannot be recovered once deleted. Note: deleting inboxes will not impact your usage limits. Monthly inbox creation limits are based on how many inboxes were created in the last 30 days, not how many inboxes you currently have. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_all_inboxes(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_all_inboxes_with_http_info(**kwargs) # noqa: E501 + + def delete_all_inboxes_with_http_info(self, **kwargs): # noqa: E501 + """Delete all inboxes # noqa: E501 + + Permanently delete all inboxes and associated email addresses. This will also delete all emails within the inboxes. Be careful as inboxes cannot be recovered once deleted. Note: deleting inboxes will not impact your usage limits. Monthly inbox creation limits are based on how many inboxes were created in the last 30 days, not how many inboxes you currently have. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_all_inboxes_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_all_inboxes" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_inbox(self, inbox_id, **kwargs): # noqa: E501 + """Delete inbox # noqa: E501 + + Permanently delete an inbox and associated email address as well as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_inbox(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_inbox_with_http_info(inbox_id, **kwargs) # noqa: E501 + + def delete_inbox_with_http_info(self, inbox_id, **kwargs): # noqa: E501 + """Delete inbox # noqa: E501 + + Permanently delete an inbox and associated email address as well as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_inbox_with_http_info(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_inbox" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `delete_inbox`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'inbox_id' in local_var_params: + path_params['inboxId'] = local_var_params['inbox_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/{inboxId}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def does_inbox_exist(self, email_address, **kwargs): # noqa: E501 + """Does inbox exist # noqa: E501 + + Check if inboxes exist by email address. Useful if you are sending emails to mailslurp addresses # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.does_inbox_exist(email_address, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_address: Email address (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: InboxExistsDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.does_inbox_exist_with_http_info(email_address, **kwargs) # noqa: E501 + + def does_inbox_exist_with_http_info(self, email_address, **kwargs): # noqa: E501 + """Does inbox exist # noqa: E501 + + Check if inboxes exist by email address. Useful if you are sending emails to mailslurp addresses # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.does_inbox_exist_with_http_info(email_address, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_address: Email address (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(InboxExistsDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'email_address' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method does_inbox_exist" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'email_address' is set + if self.api_client.client_side_validation and ('email_address' not in local_var_params or # noqa: E501 + local_var_params['email_address'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `email_address` when calling `does_inbox_exist`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'email_address' in local_var_params and local_var_params['email_address'] is not None: # noqa: E501 + query_params.append(('emailAddress', local_var_params['email_address'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/exists', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InboxExistsDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def flush_expired(self, **kwargs): # noqa: E501 + """Remove expired inboxes # noqa: E501 + + Remove any expired inboxes for your account (instead of waiting for scheduled removal on server) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.flush_expired(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param datetime before: Optional expired at before flag to flush expired inboxes that have expired before the given time + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: FlushExpiredInboxesResult + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.flush_expired_with_http_info(**kwargs) # noqa: E501 + + def flush_expired_with_http_info(self, **kwargs): # noqa: E501 + """Remove expired inboxes # noqa: E501 + + Remove any expired inboxes for your account (instead of waiting for scheduled removal on server) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.flush_expired_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param datetime before: Optional expired at before flag to flush expired inboxes that have expired before the given time + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(FlushExpiredInboxesResult, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method flush_expired" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/expired', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='FlushExpiredInboxesResult', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_all_inboxes(self, **kwargs): # noqa: E501 + """List All Inboxes Paginated # noqa: E501 + + List inboxes in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_inboxes(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in list pagination + :param int size: Optional page size in list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param bool favourite: Optionally filter results for favourites only + :param str search: Optionally filter by search words partial matching ID, tags, name, and email address + :param str tag: Optionally filter by tags. Will return inboxes that include given tags + :param bool team_access: DEPRECATED. Optionally filter by team access. + :param datetime since: Optional filter by created after given date time + :param datetime before: Optional filter by created before given date time + :param str inbox_type: Optional filter by inbox type + :param str domain_id: Optional domain ID filter + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageInboxProjection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_all_inboxes_with_http_info(**kwargs) # noqa: E501 + + def get_all_inboxes_with_http_info(self, **kwargs): # noqa: E501 + """List All Inboxes Paginated # noqa: E501 + + List inboxes in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_inboxes_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in list pagination + :param int size: Optional page size in list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param bool favourite: Optionally filter results for favourites only + :param str search: Optionally filter by search words partial matching ID, tags, name, and email address + :param str tag: Optionally filter by tags. Will return inboxes that include given tags + :param bool team_access: DEPRECATED. Optionally filter by team access. + :param datetime since: Optional filter by created after given date time + :param datetime before: Optional filter by created before given date time + :param str inbox_type: Optional filter by inbox type + :param str domain_id: Optional domain ID filter + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageInboxProjection, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page', + 'size', + 'sort', + 'favourite', + 'search', + 'tag', + 'team_access', + 'since', + 'before', + 'inbox_type', + 'domain_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_inboxes" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'favourite' in local_var_params and local_var_params['favourite'] is not None: # noqa: E501 + query_params.append(('favourite', local_var_params['favourite'])) # noqa: E501 + if 'search' in local_var_params and local_var_params['search'] is not None: # noqa: E501 + query_params.append(('search', local_var_params['search'])) # noqa: E501 + if 'tag' in local_var_params and local_var_params['tag'] is not None: # noqa: E501 + query_params.append(('tag', local_var_params['tag'])) # noqa: E501 + if 'team_access' in local_var_params and local_var_params['team_access'] is not None: # noqa: E501 + query_params.append(('teamAccess', local_var_params['team_access'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + if 'inbox_type' in local_var_params and local_var_params['inbox_type'] is not None: # noqa: E501 + query_params.append(('inboxType', local_var_params['inbox_type'])) # noqa: E501 + if 'domain_id' in local_var_params and local_var_params['domain_id'] is not None: # noqa: E501 + query_params.append(('domainId', local_var_params['domain_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/paginated', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageInboxProjection', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_delivery_statuses_by_inbox_id(self, inbox_id, **kwargs): # noqa: E501 + """get_delivery_statuses_by_inbox_id # noqa: E501 + + Get all email delivery statuses for an inbox # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_delivery_statuses_by_inbox_id(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: (required) + :param int page: Optional page index in delivery status list pagination + :param int size: Optional page size in delivery status list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageDeliveryStatus + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_delivery_statuses_by_inbox_id_with_http_info(inbox_id, **kwargs) # noqa: E501 + + def get_delivery_statuses_by_inbox_id_with_http_info(self, inbox_id, **kwargs): # noqa: E501 + """get_delivery_statuses_by_inbox_id # noqa: E501 + + Get all email delivery statuses for an inbox # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_delivery_statuses_by_inbox_id_with_http_info(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: (required) + :param int page: Optional page index in delivery status list pagination + :param int size: Optional page size in delivery status list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageDeliveryStatus, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'page', + 'size', + 'sort', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_delivery_statuses_by_inbox_id" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `get_delivery_statuses_by_inbox_id`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'inbox_id' in local_var_params: + path_params['inboxId'] = local_var_params['inbox_id'] # noqa: E501 + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/{inboxId}/delivery-status', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDeliveryStatus', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_emails(self, inbox_id, **kwargs): # noqa: E501 + """Get emails in an Inbox. This method is not idempotent as it allows retries and waits if you want certain conditions to be met before returning. For simple listing and sorting of known emails use the email controller instead. # noqa: E501 + + List emails that an inbox has received. Only emails that are sent to the inbox's email address will appear in the inbox. It may take several seconds for any email you send to an inbox's email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the `minCount` parameter. The server will retry the inbox database until the `minCount` is satisfied or the `retryTimeout` is reached # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_emails(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Id of inbox that emails belongs to (required) + :param int size: Alias for limit. Assessed first before assessing any passed limit. + :param int limit: Limit the result set, ordered by received date time sort direction. Maximum 100. For more listing options see the email controller + :param str sort: Sort the results by received date and direction ASC or DESC + :param int retry_timeout: Maximum milliseconds to spend retrying inbox database until minCount emails are returned + :param int delay_timeout: + :param int min_count: Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached. + :param bool unread_only: + :param datetime before: Exclude emails received after this ISO 8601 date time + :param datetime since: Exclude emails received before this ISO 8601 date time + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: list[EmailPreview] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_emails_with_http_info(inbox_id, **kwargs) # noqa: E501 + + def get_emails_with_http_info(self, inbox_id, **kwargs): # noqa: E501 + """Get emails in an Inbox. This method is not idempotent as it allows retries and waits if you want certain conditions to be met before returning. For simple listing and sorting of known emails use the email controller instead. # noqa: E501 + + List emails that an inbox has received. Only emails that are sent to the inbox's email address will appear in the inbox. It may take several seconds for any email you send to an inbox's email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the `minCount` parameter. The server will retry the inbox database until the `minCount` is satisfied or the `retryTimeout` is reached # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_emails_with_http_info(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Id of inbox that emails belongs to (required) + :param int size: Alias for limit. Assessed first before assessing any passed limit. + :param int limit: Limit the result set, ordered by received date time sort direction. Maximum 100. For more listing options see the email controller + :param str sort: Sort the results by received date and direction ASC or DESC + :param int retry_timeout: Maximum milliseconds to spend retrying inbox database until minCount emails are returned + :param int delay_timeout: + :param int min_count: Minimum acceptable email count. Will cause request to hang (and retry) until minCount is satisfied or retryTimeout is reached. + :param bool unread_only: + :param datetime before: Exclude emails received after this ISO 8601 date time + :param datetime since: Exclude emails received before this ISO 8601 date time + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[EmailPreview], status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'size', + 'limit', + 'sort', + 'retry_timeout', + 'delay_timeout', + 'min_count', + 'unread_only', + 'before', + 'since' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_emails" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `get_emails`") # noqa: E501 + + if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `size` when calling `get_emails`, must be a value less than or equal to `100`") # noqa: E501 + if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `limit` when calling `get_emails`, must be a value less than or equal to `100`") # noqa: E501 + collection_formats = {} + + path_params = {} + if 'inbox_id' in local_var_params: + path_params['inboxId'] = local_var_params['inbox_id'] # noqa: E501 + + query_params = [] + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 + query_params.append(('limit', local_var_params['limit'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'retry_timeout' in local_var_params and local_var_params['retry_timeout'] is not None: # noqa: E501 + query_params.append(('retryTimeout', local_var_params['retry_timeout'])) # noqa: E501 + if 'delay_timeout' in local_var_params and local_var_params['delay_timeout'] is not None: # noqa: E501 + query_params.append(('delayTimeout', local_var_params['delay_timeout'])) # noqa: E501 + if 'min_count' in local_var_params and local_var_params['min_count'] is not None: # noqa: E501 + query_params.append(('minCount', local_var_params['min_count'])) # noqa: E501 + if 'unread_only' in local_var_params and local_var_params['unread_only'] is not None: # noqa: E501 + query_params.append(('unreadOnly', local_var_params['unread_only'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/{inboxId}/emails', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[EmailPreview]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_imap_smtp_access(self, **kwargs): # noqa: E501 + """get_imap_smtp_access # noqa: E501 + + Get IMAP and SMTP access usernames and passwords # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_imap_smtp_access(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Inbox ID + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: ImapSmtpAccessDetails + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_imap_smtp_access_with_http_info(**kwargs) # noqa: E501 + + def get_imap_smtp_access_with_http_info(self, **kwargs): # noqa: E501 + """get_imap_smtp_access # noqa: E501 + + Get IMAP and SMTP access usernames and passwords # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_imap_smtp_access_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Inbox ID + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(ImapSmtpAccessDetails, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_imap_smtp_access" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 + query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/imap-smtp-access', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ImapSmtpAccessDetails', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_inbox(self, inbox_id, **kwargs): # noqa: E501 + """Get Inbox. Returns properties of an inbox. # noqa: E501 + + Returns an inbox's properties, including its email address and ID. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inbox(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: InboxDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_inbox_with_http_info(inbox_id, **kwargs) # noqa: E501 + + def get_inbox_with_http_info(self, inbox_id, **kwargs): # noqa: E501 + """Get Inbox. Returns properties of an inbox. # noqa: E501 + + Returns an inbox's properties, including its email address and ID. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inbox_with_http_info(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(InboxDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_inbox" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `get_inbox`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'inbox_id' in local_var_params: + path_params['inboxId'] = local_var_params['inbox_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/{inboxId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InboxDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_inbox_by_email_address(self, email_address, **kwargs): # noqa: E501 + """Search for an inbox with the provided email address # noqa: E501 + + Get a inbox result by email address # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inbox_by_email_address(email_address, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_address: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: InboxByEmailAddressResult + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_inbox_by_email_address_with_http_info(email_address, **kwargs) # noqa: E501 + + def get_inbox_by_email_address_with_http_info(self, email_address, **kwargs): # noqa: E501 + """Search for an inbox with the provided email address # noqa: E501 + + Get a inbox result by email address # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inbox_by_email_address_with_http_info(email_address, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_address: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(InboxByEmailAddressResult, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'email_address' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_inbox_by_email_address" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'email_address' is set + if self.api_client.client_side_validation and ('email_address' not in local_var_params or # noqa: E501 + local_var_params['email_address'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `email_address` when calling `get_inbox_by_email_address`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'email_address' in local_var_params and local_var_params['email_address'] is not None: # noqa: E501 + query_params.append(('emailAddress', local_var_params['email_address'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/byEmailAddress', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InboxByEmailAddressResult', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_inbox_by_name(self, name, **kwargs): # noqa: E501 + """Search for an inbox with the given name # noqa: E501 + + Get a inbox result by name # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inbox_by_name(name, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str name: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: InboxByNameResult + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_inbox_by_name_with_http_info(name, **kwargs) # noqa: E501 + + def get_inbox_by_name_with_http_info(self, name, **kwargs): # noqa: E501 + """Search for an inbox with the given name # noqa: E501 + + Get a inbox result by name # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inbox_by_name_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str name: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(InboxByNameResult, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_inbox_by_name" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 + local_var_params['name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `get_inbox_by_name`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 + query_params.append(('name', local_var_params['name'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/byName', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InboxByNameResult', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_inbox_count(self, **kwargs): # noqa: E501 + """Get total inbox count # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inbox_count(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: CountDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_inbox_count_with_http_info(**kwargs) # noqa: E501 + + def get_inbox_count_with_http_info(self, **kwargs): # noqa: E501 + """Get total inbox count # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inbox_count_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(CountDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_inbox_count" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/count', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CountDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_inbox_email_count(self, inbox_id, **kwargs): # noqa: E501 + """Get email count in inbox # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inbox_email_count(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Id of inbox that emails belongs to (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: CountDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_inbox_email_count_with_http_info(inbox_id, **kwargs) # noqa: E501 + + def get_inbox_email_count_with_http_info(self, inbox_id, **kwargs): # noqa: E501 + """Get email count in inbox # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inbox_email_count_with_http_info(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Id of inbox that emails belongs to (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(CountDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_inbox_email_count" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `get_inbox_email_count`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'inbox_id' in local_var_params: + path_params['inboxId'] = local_var_params['inbox_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/{inboxId}/emails/count', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='CountDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_inbox_emails_paginated(self, inbox_id, **kwargs): # noqa: E501 + """Get inbox emails paginated # noqa: E501 + + Get a paginated list of emails in an inbox. Does not hold connections open. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inbox_emails_paginated(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Id of inbox that emails belongs to (required) + :param int page: Optional page index in inbox emails list pagination + :param int size: Optional page size in inbox emails list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Optional filter by received after given date time + :param datetime before: Optional filter by received before given date time + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageEmailPreview + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_inbox_emails_paginated_with_http_info(inbox_id, **kwargs) # noqa: E501 + + def get_inbox_emails_paginated_with_http_info(self, inbox_id, **kwargs): # noqa: E501 + """Get inbox emails paginated # noqa: E501 + + Get a paginated list of emails in an inbox. Does not hold connections open. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inbox_emails_paginated_with_http_info(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Id of inbox that emails belongs to (required) + :param int page: Optional page index in inbox emails list pagination + :param int size: Optional page size in inbox emails list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Optional filter by received after given date time + :param datetime before: Optional filter by received before given date time + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageEmailPreview, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'page', + 'size', + 'sort', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_inbox_emails_paginated" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `get_inbox_emails_paginated`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'inbox_id' in local_var_params: + path_params['inboxId'] = local_var_params['inbox_id'] # noqa: E501 + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/{inboxId}/emails/paginated', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageEmailPreview', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_inbox_ids(self, **kwargs): # noqa: E501 + """Get all inbox IDs # noqa: E501 + + Get list of inbox IDs # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inbox_ids(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: InboxIdsResult + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_inbox_ids_with_http_info(**kwargs) # noqa: E501 + + def get_inbox_ids_with_http_info(self, **kwargs): # noqa: E501 + """Get all inbox IDs # noqa: E501 + + Get list of inbox IDs # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inbox_ids_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(InboxIdsResult, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_inbox_ids" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/ids', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InboxIdsResult', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_inbox_sent_emails(self, inbox_id, **kwargs): # noqa: E501 + """Get Inbox Sent Emails # noqa: E501 + + Returns an inbox's sent email receipts. Call individual sent email endpoints for more details. Note for privacy reasons the full body of sent emails is never stored. An MD5 hash hex is available for comparison instead. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inbox_sent_emails(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: (required) + :param int page: Optional page index in inbox sent email list pagination + :param int size: Optional page size in inbox sent email list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional sent email search + :param datetime since: Optional filter by sent after given date time + :param datetime before: Optional filter by sent before given date time + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageSentEmailProjection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_inbox_sent_emails_with_http_info(inbox_id, **kwargs) # noqa: E501 + + def get_inbox_sent_emails_with_http_info(self, inbox_id, **kwargs): # noqa: E501 + """Get Inbox Sent Emails # noqa: E501 + + Returns an inbox's sent email receipts. Call individual sent email endpoints for more details. Note for privacy reasons the full body of sent emails is never stored. An MD5 hash hex is available for comparison instead. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inbox_sent_emails_with_http_info(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: (required) + :param int page: Optional page index in inbox sent email list pagination + :param int size: Optional page size in inbox sent email list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional sent email search + :param datetime since: Optional filter by sent after given date time + :param datetime before: Optional filter by sent before given date time + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageSentEmailProjection, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'page', + 'size', + 'sort', + 'search_filter', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_inbox_sent_emails" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `get_inbox_sent_emails`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'inbox_id' in local_var_params: + path_params['inboxId'] = local_var_params['inbox_id'] # noqa: E501 + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'search_filter' in local_var_params and local_var_params['search_filter'] is not None: # noqa: E501 + query_params.append(('searchFilter', local_var_params['search_filter'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/{inboxId}/sent', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageSentEmailProjection', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_inbox_tags(self, **kwargs): # noqa: E501 + """Get inbox tags # noqa: E501 + + Get all inbox tags # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inbox_tags(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: list[str] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_inbox_tags_with_http_info(**kwargs) # noqa: E501 + + def get_inbox_tags_with_http_info(self, **kwargs): # noqa: E501 + """Get inbox tags # noqa: E501 + + Get all inbox tags # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inbox_tags_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[str], status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_inbox_tags" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/tags', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[str]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_inboxes(self, **kwargs): # noqa: E501 + """List Inboxes and email addresses # noqa: E501 + + List the inboxes you have created. Note use of the more advanced `getAllInboxes` is recommended and allows paginated access using a limit and sort parameter. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inboxes(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int size: Optional result size limit. Note an automatic limit of 100 results is applied. See the paginated `getAllEmails` for larger queries. + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Optional filter by created after given date time + :param datetime before: Optional filter by created before given date time + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: list[InboxDto] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_inboxes_with_http_info(**kwargs) # noqa: E501 + + def get_inboxes_with_http_info(self, **kwargs): # noqa: E501 + """List Inboxes and email addresses # noqa: E501 + + List the inboxes you have created. Note use of the more advanced `getAllInboxes` is recommended and allows paginated access using a limit and sort parameter. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inboxes_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int size: Optional result size limit. Note an automatic limit of 100 results is applied. See the paginated `getAllEmails` for larger queries. + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Optional filter by created after given date time + :param datetime before: Optional filter by created before given date time + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[InboxDto], status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'size', + 'sort', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_inboxes" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `size` when calling `get_inboxes`, must be a value less than or equal to `100`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[InboxDto]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_latest_email_in_inbox(self, inbox_id, timeout_millis, **kwargs): # noqa: E501 + """Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. # noqa: E501 + + Get the newest email in an inbox or wait for one to arrive # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_latest_email_in_inbox(inbox_id, timeout_millis, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: ID of the inbox you want to get the latest email from (required) + :param int timeout_millis: Timeout milliseconds to wait for latest email (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Email + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_latest_email_in_inbox_with_http_info(inbox_id, timeout_millis, **kwargs) # noqa: E501 + + def get_latest_email_in_inbox_with_http_info(self, inbox_id, timeout_millis, **kwargs): # noqa: E501 + """Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. # noqa: E501 + + Get the newest email in an inbox or wait for one to arrive # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_latest_email_in_inbox_with_http_info(inbox_id, timeout_millis, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: ID of the inbox you want to get the latest email from (required) + :param int timeout_millis: Timeout milliseconds to wait for latest email (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(Email, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'timeout_millis' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_latest_email_in_inbox" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `get_latest_email_in_inbox`") # noqa: E501 + # verify the required parameter 'timeout_millis' is set + if self.api_client.client_side_validation and ('timeout_millis' not in local_var_params or # noqa: E501 + local_var_params['timeout_millis'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `timeout_millis` when calling `get_latest_email_in_inbox`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 + query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 + if 'timeout_millis' in local_var_params and local_var_params['timeout_millis'] is not None: # noqa: E501 + query_params.append(('timeoutMillis', local_var_params['timeout_millis'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/getLatestEmail', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Email', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_organization_inboxes(self, **kwargs): # noqa: E501 + """List Organization Inboxes Paginated # noqa: E501 + + List organization inboxes in paginated form. These are inboxes created with `allowTeamAccess` flag enabled. Organization inboxes are `readOnly` for non-admin users. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_organization_inboxes(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in list pagination + :param int size: Optional page size in list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Optional filter by created after given date time + :param datetime before: Optional filter by created before given date time + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageOrganizationInboxProjection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_organization_inboxes_with_http_info(**kwargs) # noqa: E501 + + def get_organization_inboxes_with_http_info(self, **kwargs): # noqa: E501 + """List Organization Inboxes Paginated # noqa: E501 + + List organization inboxes in paginated form. These are inboxes created with `allowTeamAccess` flag enabled. Organization inboxes are `readOnly` for non-admin users. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_organization_inboxes_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in list pagination + :param int size: Optional page size in list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Optional filter by created after given date time + :param datetime before: Optional filter by created before given date time + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageOrganizationInboxProjection, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page', + 'size', + 'sort', + 'search_filter', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_organization_inboxes" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'search_filter' in local_var_params and local_var_params['search_filter'] is not None: # noqa: E501 + query_params.append(('searchFilter', local_var_params['search_filter'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/organization', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageOrganizationInboxProjection', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_inbox_rulesets(self, inbox_id, **kwargs): # noqa: E501 + """List inbox rulesets # noqa: E501 + + List all rulesets attached to an inbox # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_inbox_rulesets(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: (required) + :param int page: Optional page index in inbox ruleset list pagination + :param int size: Optional page size in inbox ruleset list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Optional filter by created after given date time + :param datetime before: Optional filter by created before given date time + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageInboxRulesetDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_inbox_rulesets_with_http_info(inbox_id, **kwargs) # noqa: E501 + + def list_inbox_rulesets_with_http_info(self, inbox_id, **kwargs): # noqa: E501 + """List inbox rulesets # noqa: E501 + + List all rulesets attached to an inbox # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_inbox_rulesets_with_http_info(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: (required) + :param int page: Optional page index in inbox ruleset list pagination + :param int size: Optional page size in inbox ruleset list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Optional filter by created after given date time + :param datetime before: Optional filter by created before given date time + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageInboxRulesetDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'page', + 'size', + 'sort', + 'search_filter', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_inbox_rulesets" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `list_inbox_rulesets`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'inbox_id' in local_var_params: + path_params['inboxId'] = local_var_params['inbox_id'] # noqa: E501 + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'search_filter' in local_var_params and local_var_params['search_filter'] is not None: # noqa: E501 + query_params.append(('searchFilter', local_var_params['search_filter'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/{inboxId}/rulesets', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageInboxRulesetDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_inbox_tracking_pixels(self, inbox_id, **kwargs): # noqa: E501 + """List inbox tracking pixels # noqa: E501 + + List all tracking pixels sent from an inbox # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_inbox_tracking_pixels(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: (required) + :param int page: Optional page index in inbox tracking pixel list pagination + :param int size: Optional page size in inbox tracking pixel list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Optional filter by created after given date time + :param datetime before: Optional filter by created before given date time + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageTrackingPixelProjection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.list_inbox_tracking_pixels_with_http_info(inbox_id, **kwargs) # noqa: E501 + + def list_inbox_tracking_pixels_with_http_info(self, inbox_id, **kwargs): # noqa: E501 + """List inbox tracking pixels # noqa: E501 + + List all tracking pixels sent from an inbox # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_inbox_tracking_pixels_with_http_info(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: (required) + :param int page: Optional page index in inbox tracking pixel list pagination + :param int size: Optional page size in inbox tracking pixel list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Optional filter by created after given date time + :param datetime before: Optional filter by created before given date time + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageTrackingPixelProjection, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'page', + 'size', + 'sort', + 'search_filter', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method list_inbox_tracking_pixels" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `list_inbox_tracking_pixels`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'inbox_id' in local_var_params: + path_params['inboxId'] = local_var_params['inbox_id'] # noqa: E501 + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'search_filter' in local_var_params and local_var_params['search_filter'] is not None: # noqa: E501 + query_params.append(('searchFilter', local_var_params['search_filter'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/{inboxId}/tracking-pixels', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageTrackingPixelProjection', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def send_email(self, inbox_id, send_email_options, **kwargs): # noqa: E501 + """Send Email # noqa: E501 + + Send an email from an inbox's email address. The request body should contain the `SendEmailOptions` that include recipients, attachments, body etc. See `SendEmailOptions` for all available properties. Note the `inboxId` refers to the inbox's id not the inbox's email address. See https://www.mailslurp.com/guides/ for more information on how to send emails. This method does not return a sent email entity due to legacy reasons. To send and get a sent email as returned response use the sister method `sendEmailAndConfirm`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.send_email(inbox_id, send_email_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: ID of the inbox you want to send the email from (required) + :param SendEmailOptions send_email_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.send_email_with_http_info(inbox_id, send_email_options, **kwargs) # noqa: E501 + + def send_email_with_http_info(self, inbox_id, send_email_options, **kwargs): # noqa: E501 + """Send Email # noqa: E501 + + Send an email from an inbox's email address. The request body should contain the `SendEmailOptions` that include recipients, attachments, body etc. See `SendEmailOptions` for all available properties. Note the `inboxId` refers to the inbox's id not the inbox's email address. See https://www.mailslurp.com/guides/ for more information on how to send emails. This method does not return a sent email entity due to legacy reasons. To send and get a sent email as returned response use the sister method `sendEmailAndConfirm`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.send_email_with_http_info(inbox_id, send_email_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: ID of the inbox you want to send the email from (required) + :param SendEmailOptions send_email_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'send_email_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method send_email" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `send_email`") # noqa: E501 + # verify the required parameter 'send_email_options' is set + if self.api_client.client_side_validation and ('send_email_options' not in local_var_params or # noqa: E501 + local_var_params['send_email_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `send_email_options` when calling `send_email`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'inbox_id' in local_var_params: + path_params['inboxId'] = local_var_params['inbox_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'send_email_options' in local_var_params: + body_params = local_var_params['send_email_options'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/{inboxId}', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def send_email_and_confirm(self, inbox_id, send_email_options, **kwargs): # noqa: E501 + """Send email and return sent confirmation # noqa: E501 + + Sister method for standard `sendEmail` method with the benefit of returning a `SentEmail` entity confirming the successful sending of the email with a link to the sent object created for it. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.send_email_and_confirm(inbox_id, send_email_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: ID of the inbox you want to send the email from (required) + :param SendEmailOptions send_email_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: SentEmailDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.send_email_and_confirm_with_http_info(inbox_id, send_email_options, **kwargs) # noqa: E501 + + def send_email_and_confirm_with_http_info(self, inbox_id, send_email_options, **kwargs): # noqa: E501 + """Send email and return sent confirmation # noqa: E501 + + Sister method for standard `sendEmail` method with the benefit of returning a `SentEmail` entity confirming the successful sending of the email with a link to the sent object created for it. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.send_email_and_confirm_with_http_info(inbox_id, send_email_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: ID of the inbox you want to send the email from (required) + :param SendEmailOptions send_email_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(SentEmailDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'send_email_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method send_email_and_confirm" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `send_email_and_confirm`") # noqa: E501 + # verify the required parameter 'send_email_options' is set + if self.api_client.client_side_validation and ('send_email_options' not in local_var_params or # noqa: E501 + local_var_params['send_email_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `send_email_options` when calling `send_email_and_confirm`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'inbox_id' in local_var_params: + path_params['inboxId'] = local_var_params['inbox_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'send_email_options' in local_var_params: + body_params = local_var_params['send_email_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/{inboxId}/confirm', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SentEmailDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def send_email_with_queue(self, inbox_id, validate_before_enqueue, send_email_options, **kwargs): # noqa: E501 + """Send email with queue # noqa: E501 + + Send an email using a queue. Will place the email onto a queue that will then be processed and sent. Use this queue method to enable any failed email sending to be recovered. This will prevent lost emails when sending if your account encounters a block or payment issue. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.send_email_with_queue(inbox_id, validate_before_enqueue, send_email_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: ID of the inbox you want to send the email from (required) + :param bool validate_before_enqueue: Validate before adding to queue (required) + :param SendEmailOptions send_email_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.send_email_with_queue_with_http_info(inbox_id, validate_before_enqueue, send_email_options, **kwargs) # noqa: E501 + + def send_email_with_queue_with_http_info(self, inbox_id, validate_before_enqueue, send_email_options, **kwargs): # noqa: E501 + """Send email with queue # noqa: E501 + + Send an email using a queue. Will place the email onto a queue that will then be processed and sent. Use this queue method to enable any failed email sending to be recovered. This will prevent lost emails when sending if your account encounters a block or payment issue. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.send_email_with_queue_with_http_info(inbox_id, validate_before_enqueue, send_email_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: ID of the inbox you want to send the email from (required) + :param bool validate_before_enqueue: Validate before adding to queue (required) + :param SendEmailOptions send_email_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'validate_before_enqueue', + 'send_email_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method send_email_with_queue" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `send_email_with_queue`") # noqa: E501 + # verify the required parameter 'validate_before_enqueue' is set + if self.api_client.client_side_validation and ('validate_before_enqueue' not in local_var_params or # noqa: E501 + local_var_params['validate_before_enqueue'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `validate_before_enqueue` when calling `send_email_with_queue`") # noqa: E501 + # verify the required parameter 'send_email_options' is set + if self.api_client.client_side_validation and ('send_email_options' not in local_var_params or # noqa: E501 + local_var_params['send_email_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `send_email_options` when calling `send_email_with_queue`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'inbox_id' in local_var_params: + path_params['inboxId'] = local_var_params['inbox_id'] # noqa: E501 + + query_params = [] + if 'validate_before_enqueue' in local_var_params and local_var_params['validate_before_enqueue'] is not None: # noqa: E501 + query_params.append(('validateBeforeEnqueue', local_var_params['validate_before_enqueue'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'send_email_options' in local_var_params: + body_params = local_var_params['send_email_options'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/{inboxId}/with-queue', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def send_smtp_envelope(self, inbox_id, send_smtp_envelope_options, **kwargs): # noqa: E501 + """Send email using an SMTP mail envelope and message body and return sent confirmation # noqa: E501 + + Send email using an SMTP envelope containing RCPT TO, MAIL FROM, and a SMTP BODY. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.send_smtp_envelope(inbox_id, send_smtp_envelope_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: ID of the inbox you want to send the email from (required) + :param SendSMTPEnvelopeOptions send_smtp_envelope_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: SentEmailDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.send_smtp_envelope_with_http_info(inbox_id, send_smtp_envelope_options, **kwargs) # noqa: E501 + + def send_smtp_envelope_with_http_info(self, inbox_id, send_smtp_envelope_options, **kwargs): # noqa: E501 + """Send email using an SMTP mail envelope and message body and return sent confirmation # noqa: E501 + + Send email using an SMTP envelope containing RCPT TO, MAIL FROM, and a SMTP BODY. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.send_smtp_envelope_with_http_info(inbox_id, send_smtp_envelope_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: ID of the inbox you want to send the email from (required) + :param SendSMTPEnvelopeOptions send_smtp_envelope_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(SentEmailDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'send_smtp_envelope_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method send_smtp_envelope" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `send_smtp_envelope`") # noqa: E501 + # verify the required parameter 'send_smtp_envelope_options' is set + if self.api_client.client_side_validation and ('send_smtp_envelope_options' not in local_var_params or # noqa: E501 + local_var_params['send_smtp_envelope_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `send_smtp_envelope_options` when calling `send_smtp_envelope`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'inbox_id' in local_var_params: + path_params['inboxId'] = local_var_params['inbox_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'send_smtp_envelope_options' in local_var_params: + body_params = local_var_params['send_smtp_envelope_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/{inboxId}/smtp-envelope', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SentEmailDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def send_test_email(self, inbox_id, **kwargs): # noqa: E501 + """Send a test email to inbox # noqa: E501 + + Send an inbox a test email to test email receiving is working # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.send_test_email(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.send_test_email_with_http_info(inbox_id, **kwargs) # noqa: E501 + + def send_test_email_with_http_info(self, inbox_id, **kwargs): # noqa: E501 + """Send a test email to inbox # noqa: E501 + + Send an inbox a test email to test email receiving is working # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.send_test_email_with_http_info(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method send_test_email" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `send_test_email`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'inbox_id' in local_var_params: + path_params['inboxId'] = local_var_params['inbox_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/{inboxId}/send-test-email', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def set_inbox_favourited(self, inbox_id, set_inbox_favourited_options, **kwargs): # noqa: E501 + """Set inbox favourited state # noqa: E501 + + Set and return new favourite state for an inbox # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_inbox_favourited(inbox_id, set_inbox_favourited_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: ID of inbox to set favourite state (required) + :param SetInboxFavouritedOptions set_inbox_favourited_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: InboxDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.set_inbox_favourited_with_http_info(inbox_id, set_inbox_favourited_options, **kwargs) # noqa: E501 + + def set_inbox_favourited_with_http_info(self, inbox_id, set_inbox_favourited_options, **kwargs): # noqa: E501 + """Set inbox favourited state # noqa: E501 + + Set and return new favourite state for an inbox # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.set_inbox_favourited_with_http_info(inbox_id, set_inbox_favourited_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: ID of inbox to set favourite state (required) + :param SetInboxFavouritedOptions set_inbox_favourited_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(InboxDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'set_inbox_favourited_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method set_inbox_favourited" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `set_inbox_favourited`") # noqa: E501 + # verify the required parameter 'set_inbox_favourited_options' is set + if self.api_client.client_side_validation and ('set_inbox_favourited_options' not in local_var_params or # noqa: E501 + local_var_params['set_inbox_favourited_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `set_inbox_favourited_options` when calling `set_inbox_favourited`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'inbox_id' in local_var_params: + path_params['inboxId'] = local_var_params['inbox_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'set_inbox_favourited_options' in local_var_params: + body_params = local_var_params['set_inbox_favourited_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/{inboxId}/favourite', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InboxDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def update_inbox(self, inbox_id, update_inbox_options, **kwargs): # noqa: E501 + """Update Inbox. Change name and description. Email address is not editable. # noqa: E501 + + Update editable fields on an inbox # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_inbox(inbox_id, update_inbox_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: (required) + :param UpdateInboxOptions update_inbox_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: InboxDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.update_inbox_with_http_info(inbox_id, update_inbox_options, **kwargs) # noqa: E501 + + def update_inbox_with_http_info(self, inbox_id, update_inbox_options, **kwargs): # noqa: E501 + """Update Inbox. Change name and description. Email address is not editable. # noqa: E501 + + Update editable fields on an inbox # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_inbox_with_http_info(inbox_id, update_inbox_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: (required) + :param UpdateInboxOptions update_inbox_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(InboxDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'update_inbox_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_inbox" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `update_inbox`") # noqa: E501 + # verify the required parameter 'update_inbox_options' is set + if self.api_client.client_side_validation and ('update_inbox_options' not in local_var_params or # noqa: E501 + local_var_params['update_inbox_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `update_inbox_options` when calling `update_inbox`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'inbox_id' in local_var_params: + path_params['inboxId'] = local_var_params['inbox_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'update_inbox_options' in local_var_params: + body_params = local_var_params['update_inbox_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/{inboxId}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InboxDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/mailslurp_client/api/inbox_forwarder_controller_api.py b/mailslurp_client/api/inbox_forwarder_controller_api.py new file mode 100644 index 00000000..8a41318c --- /dev/null +++ b/mailslurp_client/api/inbox_forwarder_controller_api.py @@ -0,0 +1,1007 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from mailslurp_client.api_client import ApiClient +from mailslurp_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class InboxForwarderControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_new_inbox_forwarder(self, inbox_id, create_inbox_forwarder_options, **kwargs): # noqa: E501 + """Create an inbox forwarder # noqa: E501 + + Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_new_inbox_forwarder(inbox_id, create_inbox_forwarder_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Inbox id to attach forwarder to (required) + :param CreateInboxForwarderOptions create_inbox_forwarder_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: InboxForwarderDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_new_inbox_forwarder_with_http_info(inbox_id, create_inbox_forwarder_options, **kwargs) # noqa: E501 + + def create_new_inbox_forwarder_with_http_info(self, inbox_id, create_inbox_forwarder_options, **kwargs): # noqa: E501 + """Create an inbox forwarder # noqa: E501 + + Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_new_inbox_forwarder_with_http_info(inbox_id, create_inbox_forwarder_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Inbox id to attach forwarder to (required) + :param CreateInboxForwarderOptions create_inbox_forwarder_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(InboxForwarderDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'create_inbox_forwarder_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_new_inbox_forwarder" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `create_new_inbox_forwarder`") # noqa: E501 + # verify the required parameter 'create_inbox_forwarder_options' is set + if self.api_client.client_side_validation and ('create_inbox_forwarder_options' not in local_var_params or # noqa: E501 + local_var_params['create_inbox_forwarder_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `create_inbox_forwarder_options` when calling `create_new_inbox_forwarder`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 + query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'create_inbox_forwarder_options' in local_var_params: + body_params = local_var_params['create_inbox_forwarder_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/forwarders', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InboxForwarderDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_inbox_forwarder(self, id, **kwargs): # noqa: E501 + """Delete an inbox forwarder # noqa: E501 + + Delete inbox forwarder # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_inbox_forwarder(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: ID of inbox forwarder (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_inbox_forwarder_with_http_info(id, **kwargs) # noqa: E501 + + def delete_inbox_forwarder_with_http_info(self, id, **kwargs): # noqa: E501 + """Delete an inbox forwarder # noqa: E501 + + Delete inbox forwarder # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_inbox_forwarder_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: ID of inbox forwarder (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_inbox_forwarder" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `delete_inbox_forwarder`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/forwarders/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_inbox_forwarders(self, **kwargs): # noqa: E501 + """Delete inbox forwarders # noqa: E501 + + Delete inbox forwarders. Accepts optional inboxId filter. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_inbox_forwarders(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Optional inbox id to attach forwarder to + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_inbox_forwarders_with_http_info(**kwargs) # noqa: E501 + + def delete_inbox_forwarders_with_http_info(self, **kwargs): # noqa: E501 + """Delete inbox forwarders # noqa: E501 + + Delete inbox forwarders. Accepts optional inboxId filter. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_inbox_forwarders_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Optional inbox id to attach forwarder to + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_inbox_forwarders" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 + query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/forwarders', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_inbox_forwarder(self, id, **kwargs): # noqa: E501 + """Get an inbox forwarder # noqa: E501 + + Get inbox ruleset # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inbox_forwarder(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: ID of inbox forwarder (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: InboxForwarderDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_inbox_forwarder_with_http_info(id, **kwargs) # noqa: E501 + + def get_inbox_forwarder_with_http_info(self, id, **kwargs): # noqa: E501 + """Get an inbox forwarder # noqa: E501 + + Get inbox ruleset # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inbox_forwarder_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: ID of inbox forwarder (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(InboxForwarderDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_inbox_forwarder" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `get_inbox_forwarder`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/forwarders/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InboxForwarderDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_inbox_forwarders(self, **kwargs): # noqa: E501 + """List inbox forwarders # noqa: E501 + + List all forwarders attached to an inbox # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inbox_forwarders(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Optional inbox id to get forwarders from + :param int page: Optional page index in inbox forwarder list pagination + :param int size: Optional page size in inbox forwarder list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageInboxForwarderDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_inbox_forwarders_with_http_info(**kwargs) # noqa: E501 + + def get_inbox_forwarders_with_http_info(self, **kwargs): # noqa: E501 + """List inbox forwarders # noqa: E501 + + List all forwarders attached to an inbox # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inbox_forwarders_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Optional inbox id to get forwarders from + :param int page: Optional page index in inbox forwarder list pagination + :param int size: Optional page size in inbox forwarder list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageInboxForwarderDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'page', + 'size', + 'sort', + 'search_filter', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_inbox_forwarders" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 + query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'search_filter' in local_var_params and local_var_params['search_filter'] is not None: # noqa: E501 + query_params.append(('searchFilter', local_var_params['search_filter'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/forwarders', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageInboxForwarderDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def test_inbox_forwarder(self, id, inbox_forwarder_test_options, **kwargs): # noqa: E501 + """Test an inbox forwarder # noqa: E501 + + Test an inbox forwarder # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_inbox_forwarder(id, inbox_forwarder_test_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: ID of inbox forwarder (required) + :param InboxForwarderTestOptions inbox_forwarder_test_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: InboxForwarderTestResult + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.test_inbox_forwarder_with_http_info(id, inbox_forwarder_test_options, **kwargs) # noqa: E501 + + def test_inbox_forwarder_with_http_info(self, id, inbox_forwarder_test_options, **kwargs): # noqa: E501 + """Test an inbox forwarder # noqa: E501 + + Test an inbox forwarder # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_inbox_forwarder_with_http_info(id, inbox_forwarder_test_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: ID of inbox forwarder (required) + :param InboxForwarderTestOptions inbox_forwarder_test_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(InboxForwarderTestResult, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id', + 'inbox_forwarder_test_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method test_inbox_forwarder" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `test_inbox_forwarder`") # noqa: E501 + # verify the required parameter 'inbox_forwarder_test_options' is set + if self.api_client.client_side_validation and ('inbox_forwarder_test_options' not in local_var_params or # noqa: E501 + local_var_params['inbox_forwarder_test_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_forwarder_test_options` when calling `test_inbox_forwarder`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'inbox_forwarder_test_options' in local_var_params: + body_params = local_var_params['inbox_forwarder_test_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/forwarders/{id}/test', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InboxForwarderTestResult', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def test_inbox_forwarders_for_inbox(self, inbox_id, inbox_forwarder_test_options, **kwargs): # noqa: E501 + """Test inbox forwarders for inbox # noqa: E501 + + Test inbox forwarders for inbox # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_inbox_forwarders_for_inbox(inbox_id, inbox_forwarder_test_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: ID of inbox (required) + :param InboxForwarderTestOptions inbox_forwarder_test_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: InboxForwarderTestResult + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.test_inbox_forwarders_for_inbox_with_http_info(inbox_id, inbox_forwarder_test_options, **kwargs) # noqa: E501 + + def test_inbox_forwarders_for_inbox_with_http_info(self, inbox_id, inbox_forwarder_test_options, **kwargs): # noqa: E501 + """Test inbox forwarders for inbox # noqa: E501 + + Test inbox forwarders for inbox # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_inbox_forwarders_for_inbox_with_http_info(inbox_id, inbox_forwarder_test_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: ID of inbox (required) + :param InboxForwarderTestOptions inbox_forwarder_test_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(InboxForwarderTestResult, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'inbox_forwarder_test_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method test_inbox_forwarders_for_inbox" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `test_inbox_forwarders_for_inbox`") # noqa: E501 + # verify the required parameter 'inbox_forwarder_test_options' is set + if self.api_client.client_side_validation and ('inbox_forwarder_test_options' not in local_var_params or # noqa: E501 + local_var_params['inbox_forwarder_test_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_forwarder_test_options` when calling `test_inbox_forwarders_for_inbox`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 + query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'inbox_forwarder_test_options' in local_var_params: + body_params = local_var_params['inbox_forwarder_test_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/forwarders', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InboxForwarderTestResult', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def test_new_inbox_forwarder(self, test_new_inbox_forwarder_options, **kwargs): # noqa: E501 + """Test new inbox forwarder # noqa: E501 + + Test new inbox forwarder # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_new_inbox_forwarder(test_new_inbox_forwarder_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param TestNewInboxForwarderOptions test_new_inbox_forwarder_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: InboxForwarderTestResult + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.test_new_inbox_forwarder_with_http_info(test_new_inbox_forwarder_options, **kwargs) # noqa: E501 + + def test_new_inbox_forwarder_with_http_info(self, test_new_inbox_forwarder_options, **kwargs): # noqa: E501 + """Test new inbox forwarder # noqa: E501 + + Test new inbox forwarder # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_new_inbox_forwarder_with_http_info(test_new_inbox_forwarder_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param TestNewInboxForwarderOptions test_new_inbox_forwarder_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(InboxForwarderTestResult, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'test_new_inbox_forwarder_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method test_new_inbox_forwarder" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'test_new_inbox_forwarder_options' is set + if self.api_client.client_side_validation and ('test_new_inbox_forwarder_options' not in local_var_params or # noqa: E501 + local_var_params['test_new_inbox_forwarder_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `test_new_inbox_forwarder_options` when calling `test_new_inbox_forwarder`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'test_new_inbox_forwarder_options' in local_var_params: + body_params = local_var_params['test_new_inbox_forwarder_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/forwarders', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InboxForwarderTestResult', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/mailslurp_client/api/inbox_ruleset_controller_api.py b/mailslurp_client/api/inbox_ruleset_controller_api.py new file mode 100644 index 00000000..7238bcc9 --- /dev/null +++ b/mailslurp_client/api/inbox_ruleset_controller_api.py @@ -0,0 +1,1007 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from mailslurp_client.api_client import ApiClient +from mailslurp_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class InboxRulesetControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_new_inbox_ruleset(self, inbox_id, create_inbox_ruleset_options, **kwargs): # noqa: E501 + """Create an inbox ruleset # noqa: E501 + + Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_new_inbox_ruleset(inbox_id, create_inbox_ruleset_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Inbox id to attach ruleset to (required) + :param CreateInboxRulesetOptions create_inbox_ruleset_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: InboxRulesetDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_new_inbox_ruleset_with_http_info(inbox_id, create_inbox_ruleset_options, **kwargs) # noqa: E501 + + def create_new_inbox_ruleset_with_http_info(self, inbox_id, create_inbox_ruleset_options, **kwargs): # noqa: E501 + """Create an inbox ruleset # noqa: E501 + + Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_new_inbox_ruleset_with_http_info(inbox_id, create_inbox_ruleset_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Inbox id to attach ruleset to (required) + :param CreateInboxRulesetOptions create_inbox_ruleset_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(InboxRulesetDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'create_inbox_ruleset_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_new_inbox_ruleset" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `create_new_inbox_ruleset`") # noqa: E501 + # verify the required parameter 'create_inbox_ruleset_options' is set + if self.api_client.client_side_validation and ('create_inbox_ruleset_options' not in local_var_params or # noqa: E501 + local_var_params['create_inbox_ruleset_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `create_inbox_ruleset_options` when calling `create_new_inbox_ruleset`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 + query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'create_inbox_ruleset_options' in local_var_params: + body_params = local_var_params['create_inbox_ruleset_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/rulesets', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InboxRulesetDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_inbox_ruleset(self, id, **kwargs): # noqa: E501 + """Delete an inbox ruleset # noqa: E501 + + Delete inbox ruleset # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_inbox_ruleset(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: ID of inbox ruleset (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_inbox_ruleset_with_http_info(id, **kwargs) # noqa: E501 + + def delete_inbox_ruleset_with_http_info(self, id, **kwargs): # noqa: E501 + """Delete an inbox ruleset # noqa: E501 + + Delete inbox ruleset # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_inbox_ruleset_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: ID of inbox ruleset (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_inbox_ruleset" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `delete_inbox_ruleset`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/rulesets/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_inbox_rulesets(self, **kwargs): # noqa: E501 + """Delete inbox rulesets # noqa: E501 + + Delete inbox rulesets. Accepts optional inboxId filter. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_inbox_rulesets(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Optional inbox id to attach ruleset to + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_inbox_rulesets_with_http_info(**kwargs) # noqa: E501 + + def delete_inbox_rulesets_with_http_info(self, **kwargs): # noqa: E501 + """Delete inbox rulesets # noqa: E501 + + Delete inbox rulesets. Accepts optional inboxId filter. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_inbox_rulesets_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Optional inbox id to attach ruleset to + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_inbox_rulesets" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 + query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/rulesets', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_inbox_ruleset(self, id, **kwargs): # noqa: E501 + """Get an inbox ruleset # noqa: E501 + + Get inbox ruleset # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inbox_ruleset(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: ID of inbox ruleset (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: InboxRulesetDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_inbox_ruleset_with_http_info(id, **kwargs) # noqa: E501 + + def get_inbox_ruleset_with_http_info(self, id, **kwargs): # noqa: E501 + """Get an inbox ruleset # noqa: E501 + + Get inbox ruleset # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inbox_ruleset_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: ID of inbox ruleset (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(InboxRulesetDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_inbox_ruleset" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `get_inbox_ruleset`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/rulesets/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InboxRulesetDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_inbox_rulesets(self, **kwargs): # noqa: E501 + """List inbox rulesets # noqa: E501 + + List all rulesets attached to an inbox # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inbox_rulesets(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Optional inbox id to get rulesets from + :param int page: Optional page index in inbox ruleset list pagination + :param int size: Optional page size in inbox ruleset list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageInboxRulesetDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_inbox_rulesets_with_http_info(**kwargs) # noqa: E501 + + def get_inbox_rulesets_with_http_info(self, **kwargs): # noqa: E501 + """List inbox rulesets # noqa: E501 + + List all rulesets attached to an inbox # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inbox_rulesets_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Optional inbox id to get rulesets from + :param int page: Optional page index in inbox ruleset list pagination + :param int size: Optional page size in inbox ruleset list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageInboxRulesetDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'page', + 'size', + 'sort', + 'search_filter', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_inbox_rulesets" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 + query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'search_filter' in local_var_params and local_var_params['search_filter'] is not None: # noqa: E501 + query_params.append(('searchFilter', local_var_params['search_filter'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/rulesets', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageInboxRulesetDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def test_inbox_ruleset(self, id, inbox_ruleset_test_options, **kwargs): # noqa: E501 + """Test an inbox ruleset # noqa: E501 + + Test an inbox ruleset # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_inbox_ruleset(id, inbox_ruleset_test_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: ID of inbox ruleset (required) + :param InboxRulesetTestOptions inbox_ruleset_test_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: InboxRulesetTestResult + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.test_inbox_ruleset_with_http_info(id, inbox_ruleset_test_options, **kwargs) # noqa: E501 + + def test_inbox_ruleset_with_http_info(self, id, inbox_ruleset_test_options, **kwargs): # noqa: E501 + """Test an inbox ruleset # noqa: E501 + + Test an inbox ruleset # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_inbox_ruleset_with_http_info(id, inbox_ruleset_test_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: ID of inbox ruleset (required) + :param InboxRulesetTestOptions inbox_ruleset_test_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(InboxRulesetTestResult, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id', + 'inbox_ruleset_test_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method test_inbox_ruleset" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `test_inbox_ruleset`") # noqa: E501 + # verify the required parameter 'inbox_ruleset_test_options' is set + if self.api_client.client_side_validation and ('inbox_ruleset_test_options' not in local_var_params or # noqa: E501 + local_var_params['inbox_ruleset_test_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_ruleset_test_options` when calling `test_inbox_ruleset`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'inbox_ruleset_test_options' in local_var_params: + body_params = local_var_params['inbox_ruleset_test_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/rulesets/{id}/test', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InboxRulesetTestResult', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def test_inbox_rulesets_for_inbox(self, inbox_id, inbox_ruleset_test_options, **kwargs): # noqa: E501 + """Test inbox rulesets for inbox # noqa: E501 + + Test inbox rulesets for inbox # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_inbox_rulesets_for_inbox(inbox_id, inbox_ruleset_test_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: ID of inbox (required) + :param InboxRulesetTestOptions inbox_ruleset_test_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: InboxRulesetTestResult + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.test_inbox_rulesets_for_inbox_with_http_info(inbox_id, inbox_ruleset_test_options, **kwargs) # noqa: E501 + + def test_inbox_rulesets_for_inbox_with_http_info(self, inbox_id, inbox_ruleset_test_options, **kwargs): # noqa: E501 + """Test inbox rulesets for inbox # noqa: E501 + + Test inbox rulesets for inbox # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_inbox_rulesets_for_inbox_with_http_info(inbox_id, inbox_ruleset_test_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: ID of inbox (required) + :param InboxRulesetTestOptions inbox_ruleset_test_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(InboxRulesetTestResult, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'inbox_ruleset_test_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method test_inbox_rulesets_for_inbox" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `test_inbox_rulesets_for_inbox`") # noqa: E501 + # verify the required parameter 'inbox_ruleset_test_options' is set + if self.api_client.client_side_validation and ('inbox_ruleset_test_options' not in local_var_params or # noqa: E501 + local_var_params['inbox_ruleset_test_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_ruleset_test_options` when calling `test_inbox_rulesets_for_inbox`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 + query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'inbox_ruleset_test_options' in local_var_params: + body_params = local_var_params['inbox_ruleset_test_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/rulesets', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InboxRulesetTestResult', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def test_new_inbox_ruleset(self, test_new_inbox_ruleset_options, **kwargs): # noqa: E501 + """Test new inbox ruleset # noqa: E501 + + Test new inbox ruleset # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_new_inbox_ruleset(test_new_inbox_ruleset_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param TestNewInboxRulesetOptions test_new_inbox_ruleset_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: InboxRulesetTestResult + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.test_new_inbox_ruleset_with_http_info(test_new_inbox_ruleset_options, **kwargs) # noqa: E501 + + def test_new_inbox_ruleset_with_http_info(self, test_new_inbox_ruleset_options, **kwargs): # noqa: E501 + """Test new inbox ruleset # noqa: E501 + + Test new inbox ruleset # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_new_inbox_ruleset_with_http_info(test_new_inbox_ruleset_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param TestNewInboxRulesetOptions test_new_inbox_ruleset_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(InboxRulesetTestResult, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'test_new_inbox_ruleset_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method test_new_inbox_ruleset" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'test_new_inbox_ruleset_options' is set + if self.api_client.client_side_validation and ('test_new_inbox_ruleset_options' not in local_var_params or # noqa: E501 + local_var_params['test_new_inbox_ruleset_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `test_new_inbox_ruleset_options` when calling `test_new_inbox_ruleset`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'test_new_inbox_ruleset_options' in local_var_params: + body_params = local_var_params['test_new_inbox_ruleset_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/rulesets', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InboxRulesetTestResult', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/mailslurp_client/api/mail_server_controller_api.py b/mailslurp_client/api/mail_server_controller_api.py new file mode 100644 index 00000000..b24bf282 --- /dev/null +++ b/mailslurp_client/api/mail_server_controller_api.py @@ -0,0 +1,498 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from mailslurp_client.api_client import ApiClient +from mailslurp_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class MailServerControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def describe_mail_server_domain(self, describe_domain_options, **kwargs): # noqa: E501 + """Get DNS Mail Server records for a domain # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.describe_mail_server_domain(describe_domain_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param DescribeDomainOptions describe_domain_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: DescribeMailServerDomainResult + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.describe_mail_server_domain_with_http_info(describe_domain_options, **kwargs) # noqa: E501 + + def describe_mail_server_domain_with_http_info(self, describe_domain_options, **kwargs): # noqa: E501 + """Get DNS Mail Server records for a domain # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.describe_mail_server_domain_with_http_info(describe_domain_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param DescribeDomainOptions describe_domain_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(DescribeMailServerDomainResult, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'describe_domain_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method describe_mail_server_domain" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'describe_domain_options' is set + if self.api_client.client_side_validation and ('describe_domain_options' not in local_var_params or # noqa: E501 + local_var_params['describe_domain_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `describe_domain_options` when calling `describe_mail_server_domain`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'describe_domain_options' in local_var_params: + body_params = local_var_params['describe_domain_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/mail-server/describe/domain', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DescribeMailServerDomainResult', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_dns_lookup(self, dns_lookup_options, **kwargs): # noqa: E501 + """Lookup DNS records for a domain # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_dns_lookup(dns_lookup_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param DNSLookupOptions dns_lookup_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: DNSLookupResults + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_dns_lookup_with_http_info(dns_lookup_options, **kwargs) # noqa: E501 + + def get_dns_lookup_with_http_info(self, dns_lookup_options, **kwargs): # noqa: E501 + """Lookup DNS records for a domain # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_dns_lookup_with_http_info(dns_lookup_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param DNSLookupOptions dns_lookup_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(DNSLookupResults, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'dns_lookup_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_dns_lookup" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'dns_lookup_options' is set + if self.api_client.client_side_validation and ('dns_lookup_options' not in local_var_params or # noqa: E501 + local_var_params['dns_lookup_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `dns_lookup_options` when calling `get_dns_lookup`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'dns_lookup_options' in local_var_params: + body_params = local_var_params['dns_lookup_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/mail-server/describe/dns-lookup', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DNSLookupResults', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_ip_address(self, name, **kwargs): # noqa: E501 + """Get IP address for a domain # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_ip_address(name, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str name: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: IPAddressResult + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_ip_address_with_http_info(name, **kwargs) # noqa: E501 + + def get_ip_address_with_http_info(self, name, **kwargs): # noqa: E501 + """Get IP address for a domain # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_ip_address_with_http_info(name, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str name: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(IPAddressResult, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_ip_address" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'name' is set + if self.api_client.client_side_validation and ('name' not in local_var_params or # noqa: E501 + local_var_params['name'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `name` when calling `get_ip_address`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'name' in local_var_params and local_var_params['name'] is not None: # noqa: E501 + query_params.append(('name', local_var_params['name'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/mail-server/describe/ip-address', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='IPAddressResult', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def verify_email_address(self, verify_email_address_options, **kwargs): # noqa: E501 + """Deprecated. Use the EmailVerificationController methods for more accurate and reliable functionality. Verify the existence of an email address at a given mail server. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.verify_email_address(verify_email_address_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param VerifyEmailAddressOptions verify_email_address_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: EmailVerificationResult + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.verify_email_address_with_http_info(verify_email_address_options, **kwargs) # noqa: E501 + + def verify_email_address_with_http_info(self, verify_email_address_options, **kwargs): # noqa: E501 + """Deprecated. Use the EmailVerificationController methods for more accurate and reliable functionality. Verify the existence of an email address at a given mail server. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.verify_email_address_with_http_info(verify_email_address_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param VerifyEmailAddressOptions verify_email_address_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(EmailVerificationResult, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'verify_email_address_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method verify_email_address" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'verify_email_address_options' is set + if self.api_client.client_side_validation and ('verify_email_address_options' not in local_var_params or # noqa: E501 + local_var_params['verify_email_address_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `verify_email_address_options` when calling `verify_email_address`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'verify_email_address_options' in local_var_params: + body_params = local_var_params['verify_email_address_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/mail-server/verify/email-address', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='EmailVerificationResult', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/mailslurp_client/api/missed_email_controller_api.py b/mailslurp_client/api/missed_email_controller_api.py new file mode 100644 index 00000000..d07faeef --- /dev/null +++ b/mailslurp_client/api/missed_email_controller_api.py @@ -0,0 +1,669 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from mailslurp_client.api_client import ApiClient +from mailslurp_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class MissedEmailControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def get_all_missed_emails(self, **kwargs): # noqa: E501 + """Get all MissedEmails in paginated format # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_missed_emails(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in list pagination + :param int size: Optional page size in list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param str inbox_id: Optional inbox ID filter + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageMissedEmailProjection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_all_missed_emails_with_http_info(**kwargs) # noqa: E501 + + def get_all_missed_emails_with_http_info(self, **kwargs): # noqa: E501 + """Get all MissedEmails in paginated format # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_missed_emails_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in list pagination + :param int size: Optional page size in list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param str inbox_id: Optional inbox ID filter + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageMissedEmailProjection, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page', + 'size', + 'sort', + 'search_filter', + 'since', + 'before', + 'inbox_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_missed_emails" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'search_filter' in local_var_params and local_var_params['search_filter'] is not None: # noqa: E501 + query_params.append(('searchFilter', local_var_params['search_filter'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 + query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/missed-emails', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageMissedEmailProjection', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_all_unknown_missed_emails(self, **kwargs): # noqa: E501 + """Get all unknown missed emails in paginated format # noqa: E501 + + Unknown missed emails are emails that were sent to MailSlurp but could not be assigned to an existing inbox. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_unknown_missed_emails(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in list pagination + :param int size: Optional page size in list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param str inbox_id: Optional inbox ID filter + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageUnknownMissedEmailProjection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_all_unknown_missed_emails_with_http_info(**kwargs) # noqa: E501 + + def get_all_unknown_missed_emails_with_http_info(self, **kwargs): # noqa: E501 + """Get all unknown missed emails in paginated format # noqa: E501 + + Unknown missed emails are emails that were sent to MailSlurp but could not be assigned to an existing inbox. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_unknown_missed_emails_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in list pagination + :param int size: Optional page size in list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param str inbox_id: Optional inbox ID filter + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageUnknownMissedEmailProjection, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page', + 'size', + 'sort', + 'search_filter', + 'since', + 'before', + 'inbox_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_unknown_missed_emails" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'search_filter' in local_var_params and local_var_params['search_filter'] is not None: # noqa: E501 + query_params.append(('searchFilter', local_var_params['search_filter'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 + query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/missed-emails/unknown', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageUnknownMissedEmailProjection', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_missed_email(self, missed_email_id, **kwargs): # noqa: E501 + """Get MissedEmail # noqa: E501 + + List emails that were missed due to plan limits. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_missed_email(missed_email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str missed_email_id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: MissedEmail + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_missed_email_with_http_info(missed_email_id, **kwargs) # noqa: E501 + + def get_missed_email_with_http_info(self, missed_email_id, **kwargs): # noqa: E501 + """Get MissedEmail # noqa: E501 + + List emails that were missed due to plan limits. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_missed_email_with_http_info(missed_email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str missed_email_id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(MissedEmail, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'missed_email_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_missed_email" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'missed_email_id' is set + if self.api_client.client_side_validation and ('missed_email_id' not in local_var_params or # noqa: E501 + local_var_params['missed_email_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `missed_email_id` when calling `get_missed_email`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'missed_email_id' in local_var_params: + path_params['missedEmailId'] = local_var_params['missed_email_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/missed-emails/{missedEmailId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='MissedEmail', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def restore_missed_emails(self, **kwargs): # noqa: E501 + """Restore missed emails # noqa: E501 + + If emails were missed due to a plan limit they are saved as missed emails. If support team enables the canRestore flag these emails can be reload into your account using this method. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.restore_missed_emails(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.restore_missed_emails_with_http_info(**kwargs) # noqa: E501 + + def restore_missed_emails_with_http_info(self, **kwargs): # noqa: E501 + """Restore missed emails # noqa: E501 + + If emails were missed due to a plan limit they are saved as missed emails. If support team enables the canRestore flag these emails can be reload into your account using this method. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.restore_missed_emails_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method restore_missed_emails" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/missed-emails/restore', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def wait_for_nth_missed_email(self, index, **kwargs): # noqa: E501 + """Wait for Nth missed email # noqa: E501 + + Wait for 0 based index missed email # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.wait_for_nth_missed_email(index, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int index: Zero based index of the email to wait for. If 1 missed email already and you want to wait for the 2nd email pass index=1 (required) + :param str inbox_id: Optional inbox ID filter + :param int timeout: Optional timeout milliseconds + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: MissedEmail + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.wait_for_nth_missed_email_with_http_info(index, **kwargs) # noqa: E501 + + def wait_for_nth_missed_email_with_http_info(self, index, **kwargs): # noqa: E501 + """Wait for Nth missed email # noqa: E501 + + Wait for 0 based index missed email # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.wait_for_nth_missed_email_with_http_info(index, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int index: Zero based index of the email to wait for. If 1 missed email already and you want to wait for the 2nd email pass index=1 (required) + :param str inbox_id: Optional inbox ID filter + :param int timeout: Optional timeout milliseconds + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(MissedEmail, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'index', + 'inbox_id', + 'timeout', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method wait_for_nth_missed_email" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'index' is set + if self.api_client.client_side_validation and ('index' not in local_var_params or # noqa: E501 + local_var_params['index'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `index` when calling `wait_for_nth_missed_email`") # noqa: E501 + + if self.api_client.client_side_validation and 'index' in local_var_params and local_var_params['index'] > 2147483647: # noqa: E501 + raise ApiValueError("Invalid value for parameter `index` when calling `wait_for_nth_missed_email`, must be a value less than or equal to `2147483647`") # noqa: E501 + if self.api_client.client_side_validation and 'index' in local_var_params and local_var_params['index'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `index` when calling `wait_for_nth_missed_email`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 + query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 + if 'timeout' in local_var_params and local_var_params['timeout'] is not None: # noqa: E501 + query_params.append(('timeout', local_var_params['timeout'])) # noqa: E501 + if 'index' in local_var_params and local_var_params['index'] is not None: # noqa: E501 + query_params.append(('index', local_var_params['index'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/missed-emails/waitForNthMissedEmail', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='MissedEmail', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/mailslurp_client/api/phone_controller_api.py b/mailslurp_client/api/phone_controller_api.py new file mode 100644 index 00000000..5bb1d496 --- /dev/null +++ b/mailslurp_client/api/phone_controller_api.py @@ -0,0 +1,1063 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from mailslurp_client.api_client import ApiClient +from mailslurp_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class PhoneControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_emergency_address(self, create_emergency_address_options, **kwargs): # noqa: E501 + """create_emergency_address # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_emergency_address(create_emergency_address_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param CreateEmergencyAddressOptions create_emergency_address_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: EmergencyAddress + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_emergency_address_with_http_info(create_emergency_address_options, **kwargs) # noqa: E501 + + def create_emergency_address_with_http_info(self, create_emergency_address_options, **kwargs): # noqa: E501 + """create_emergency_address # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_emergency_address_with_http_info(create_emergency_address_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param CreateEmergencyAddressOptions create_emergency_address_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(EmergencyAddress, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'create_emergency_address_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_emergency_address" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'create_emergency_address_options' is set + if self.api_client.client_side_validation and ('create_emergency_address_options' not in local_var_params or # noqa: E501 + local_var_params['create_emergency_address_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `create_emergency_address_options` when calling `create_emergency_address`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'create_emergency_address_options' in local_var_params: + body_params = local_var_params['create_emergency_address_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/phone/emergency-addresses', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='EmergencyAddress', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_emergency_address(self, address_id, **kwargs): # noqa: E501 + """delete_emergency_address # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_emergency_address(address_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str address_id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: EmptyResponseDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_emergency_address_with_http_info(address_id, **kwargs) # noqa: E501 + + def delete_emergency_address_with_http_info(self, address_id, **kwargs): # noqa: E501 + """delete_emergency_address # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_emergency_address_with_http_info(address_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str address_id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(EmptyResponseDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'address_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_emergency_address" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'address_id' is set + if self.api_client.client_side_validation and ('address_id' not in local_var_params or # noqa: E501 + local_var_params['address_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `address_id` when calling `delete_emergency_address`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'address_id' in local_var_params: + path_params['addressId'] = local_var_params['address_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/phone/emergency-addresses/{addressId}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='EmptyResponseDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_phone_number(self, phone_number_id, **kwargs): # noqa: E501 + """delete_phone_number # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_phone_number(phone_number_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str phone_number_id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_phone_number_with_http_info(phone_number_id, **kwargs) # noqa: E501 + + def delete_phone_number_with_http_info(self, phone_number_id, **kwargs): # noqa: E501 + """delete_phone_number # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_phone_number_with_http_info(phone_number_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str phone_number_id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'phone_number_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_phone_number" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'phone_number_id' is set + if self.api_client.client_side_validation and ('phone_number_id' not in local_var_params or # noqa: E501 + local_var_params['phone_number_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `phone_number_id` when calling `delete_phone_number`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'phone_number_id' in local_var_params: + path_params['phoneNumberId'] = local_var_params['phone_number_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/phone/numbers/{phoneNumberId}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_emergency_address(self, address_id, **kwargs): # noqa: E501 + """get_emergency_address # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_emergency_address(address_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str address_id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: EmergencyAddress + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_emergency_address_with_http_info(address_id, **kwargs) # noqa: E501 + + def get_emergency_address_with_http_info(self, address_id, **kwargs): # noqa: E501 + """get_emergency_address # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_emergency_address_with_http_info(address_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str address_id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(EmergencyAddress, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'address_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_emergency_address" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'address_id' is set + if self.api_client.client_side_validation and ('address_id' not in local_var_params or # noqa: E501 + local_var_params['address_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `address_id` when calling `get_emergency_address`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'address_id' in local_var_params: + path_params['addressId'] = local_var_params['address_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/phone/emergency-addresses/{addressId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='EmergencyAddress', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_emergency_addresses(self, **kwargs): # noqa: E501 + """get_emergency_addresses # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_emergency_addresses(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: list[EmergencyAddressDto] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_emergency_addresses_with_http_info(**kwargs) # noqa: E501 + + def get_emergency_addresses_with_http_info(self, **kwargs): # noqa: E501 + """get_emergency_addresses # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_emergency_addresses_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[EmergencyAddressDto], status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_emergency_addresses" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/phone/emergency-addresses', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[EmergencyAddressDto]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_phone_number(self, phone_number_id, **kwargs): # noqa: E501 + """get_phone_number # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_phone_number(phone_number_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str phone_number_id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PhoneNumberDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_phone_number_with_http_info(phone_number_id, **kwargs) # noqa: E501 + + def get_phone_number_with_http_info(self, phone_number_id, **kwargs): # noqa: E501 + """get_phone_number # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_phone_number_with_http_info(phone_number_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str phone_number_id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PhoneNumberDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'phone_number_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_phone_number" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'phone_number_id' is set + if self.api_client.client_side_validation and ('phone_number_id' not in local_var_params or # noqa: E501 + local_var_params['phone_number_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `phone_number_id` when calling `get_phone_number`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'phone_number_id' in local_var_params: + path_params['phoneNumberId'] = local_var_params['phone_number_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/phone/numbers/{phoneNumberId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PhoneNumberDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_phone_numbers(self, **kwargs): # noqa: E501 + """get_phone_numbers # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_phone_numbers(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str phone_country: Optional phone country + :param int page: Optional page index for list pagination + :param int size: Optional page size for list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PagePhoneNumberProjection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_phone_numbers_with_http_info(**kwargs) # noqa: E501 + + def get_phone_numbers_with_http_info(self, **kwargs): # noqa: E501 + """get_phone_numbers # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_phone_numbers_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str phone_country: Optional phone country + :param int page: Optional page index for list pagination + :param int size: Optional page size for list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PagePhoneNumberProjection, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'phone_country', + 'page', + 'size', + 'sort', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_phone_numbers" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'phone_country' in local_var_params and local_var_params['phone_country'] is not None: # noqa: E501 + query_params.append(('phoneCountry', local_var_params['phone_country'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/phone/numbers', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PagePhoneNumberProjection', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_phone_plans(self, **kwargs): # noqa: E501 + """get_phone_plans # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_phone_plans(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: list[PhonePlanDto] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_phone_plans_with_http_info(**kwargs) # noqa: E501 + + def get_phone_plans_with_http_info(self, **kwargs): # noqa: E501 + """get_phone_plans # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_phone_plans_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[PhonePlanDto], status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_phone_plans" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/phone/plans', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[PhonePlanDto]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def test_phone_number_send_sms(self, phone_number_id, test_phone_number_options, **kwargs): # noqa: E501 + """test_phone_number_send_sms # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_phone_number_send_sms(phone_number_id, test_phone_number_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str phone_number_id: (required) + :param TestPhoneNumberOptions test_phone_number_options: (required) + :param str x_test_id: + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.test_phone_number_send_sms_with_http_info(phone_number_id, test_phone_number_options, **kwargs) # noqa: E501 + + def test_phone_number_send_sms_with_http_info(self, phone_number_id, test_phone_number_options, **kwargs): # noqa: E501 + """test_phone_number_send_sms # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.test_phone_number_send_sms_with_http_info(phone_number_id, test_phone_number_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str phone_number_id: (required) + :param TestPhoneNumberOptions test_phone_number_options: (required) + :param str x_test_id: + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'phone_number_id', + 'test_phone_number_options', + 'x_test_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method test_phone_number_send_sms" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'phone_number_id' is set + if self.api_client.client_side_validation and ('phone_number_id' not in local_var_params or # noqa: E501 + local_var_params['phone_number_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `phone_number_id` when calling `test_phone_number_send_sms`") # noqa: E501 + # verify the required parameter 'test_phone_number_options' is set + if self.api_client.client_side_validation and ('test_phone_number_options' not in local_var_params or # noqa: E501 + local_var_params['test_phone_number_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `test_phone_number_options` when calling `test_phone_number_send_sms`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'phone_number_id' in local_var_params: + path_params['phoneNumberId'] = local_var_params['phone_number_id'] # noqa: E501 + + query_params = [] + + header_params = {} + if 'x_test_id' in local_var_params: + header_params['x-test-id'] = local_var_params['x_test_id'] # noqa: E501 + + form_params = [] + local_var_files = {} + + body_params = None + if 'test_phone_number_options' in local_var_params: + body_params = local_var_params['test_phone_number_options'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/phone/numbers/{phoneNumberId}/test', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/mailslurp_client/api/sent_emails_controller_api.py b/mailslurp_client/api/sent_emails_controller_api.py new file mode 100644 index 00000000..a3578751 --- /dev/null +++ b/mailslurp_client/api/sent_emails_controller_api.py @@ -0,0 +1,2018 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from mailslurp_client.api_client import ApiClient +from mailslurp_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class SentEmailsControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def delete_all_sent_emails(self, **kwargs): # noqa: E501 + """Delete all sent email receipts # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_all_sent_emails(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_all_sent_emails_with_http_info(**kwargs) # noqa: E501 + + def delete_all_sent_emails_with_http_info(self, **kwargs): # noqa: E501 + """Delete all sent email receipts # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_all_sent_emails_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_all_sent_emails" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/sent', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_sent_email(self, id, **kwargs): # noqa: E501 + """Delete sent email receipt # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_sent_email(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_sent_email_with_http_info(id, **kwargs) # noqa: E501 + + def delete_sent_email_with_http_info(self, id, **kwargs): # noqa: E501 + """Delete sent email receipt # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_sent_email_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_sent_email" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `delete_sent_email`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/sent/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_all_sent_tracking_pixels(self, **kwargs): # noqa: E501 + """get_all_sent_tracking_pixels # noqa: E501 + + Get all sent email tracking pixels in paginated form # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_sent_tracking_pixels(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in sent email tracking pixel list pagination + :param int size: Optional page size in sent email tracking pixel list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageTrackingPixelProjection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_all_sent_tracking_pixels_with_http_info(**kwargs) # noqa: E501 + + def get_all_sent_tracking_pixels_with_http_info(self, **kwargs): # noqa: E501 + """get_all_sent_tracking_pixels # noqa: E501 + + Get all sent email tracking pixels in paginated form # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_sent_tracking_pixels_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in sent email tracking pixel list pagination + :param int size: Optional page size in sent email tracking pixel list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageTrackingPixelProjection, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page', + 'size', + 'sort', + 'search_filter', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_sent_tracking_pixels" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'search_filter' in local_var_params and local_var_params['search_filter'] is not None: # noqa: E501 + query_params.append(('searchFilter', local_var_params['search_filter'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/sent/tracking-pixels', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageTrackingPixelProjection', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_raw_sent_email_contents(self, email_id, **kwargs): # noqa: E501 + """Get raw sent email string. Returns unparsed raw SMTP message with headers and body. # noqa: E501 + + Returns a raw, unparsed, and unprocessed sent email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawSentEmailJson endpoint # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_raw_sent_email_contents(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_raw_sent_email_contents_with_http_info(email_id, **kwargs) # noqa: E501 + + def get_raw_sent_email_contents_with_http_info(self, email_id, **kwargs): # noqa: E501 + """Get raw sent email string. Returns unparsed raw SMTP message with headers and body. # noqa: E501 + + Returns a raw, unparsed, and unprocessed sent email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawSentEmailJson endpoint # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_raw_sent_email_contents_with_http_info(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'email_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_raw_sent_email_contents" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'email_id' is set + if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 + local_var_params['email_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `email_id` when calling `get_raw_sent_email_contents`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'email_id' in local_var_params: + path_params['emailId'] = local_var_params['email_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/sent/{emailId}/raw', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_raw_sent_email_json(self, email_id, **kwargs): # noqa: E501 + """Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format. # noqa: E501 + + Returns a raw, unparsed, and unprocessed sent email wrapped in a JSON response object for easier handling when compared with the getRawSentEmail text/plain response # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_raw_sent_email_json(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: RawEmailJson + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_raw_sent_email_json_with_http_info(email_id, **kwargs) # noqa: E501 + + def get_raw_sent_email_json_with_http_info(self, email_id, **kwargs): # noqa: E501 + """Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format. # noqa: E501 + + Returns a raw, unparsed, and unprocessed sent email wrapped in a JSON response object for easier handling when compared with the getRawSentEmail text/plain response # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_raw_sent_email_json_with_http_info(email_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str email_id: ID of email (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(RawEmailJson, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'email_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_raw_sent_email_json" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'email_id' is set + if self.api_client.client_side_validation and ('email_id' not in local_var_params or # noqa: E501 + local_var_params['email_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `email_id` when calling `get_raw_sent_email_json`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'email_id' in local_var_params: + path_params['emailId'] = local_var_params['email_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/sent/{emailId}/raw/json', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='RawEmailJson', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_sent_delivery_status(self, delivery_id, **kwargs): # noqa: E501 + """get_sent_delivery_status # noqa: E501 + + Get a sent email delivery status # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_sent_delivery_status(delivery_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str delivery_id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: DeliveryStatusDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_sent_delivery_status_with_http_info(delivery_id, **kwargs) # noqa: E501 + + def get_sent_delivery_status_with_http_info(self, delivery_id, **kwargs): # noqa: E501 + """get_sent_delivery_status # noqa: E501 + + Get a sent email delivery status # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_sent_delivery_status_with_http_info(delivery_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str delivery_id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(DeliveryStatusDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'delivery_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_sent_delivery_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'delivery_id' is set + if self.api_client.client_side_validation and ('delivery_id' not in local_var_params or # noqa: E501 + local_var_params['delivery_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `delivery_id` when calling `get_sent_delivery_status`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'delivery_id' in local_var_params: + path_params['deliveryId'] = local_var_params['delivery_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/sent/delivery-status/{deliveryId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeliveryStatusDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_sent_delivery_statuses(self, **kwargs): # noqa: E501 + """get_sent_delivery_statuses # noqa: E501 + + Get all sent email delivery statuses # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_sent_delivery_statuses(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in delivery status list pagination + :param int size: Optional page size in delivery status list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageDeliveryStatus + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_sent_delivery_statuses_with_http_info(**kwargs) # noqa: E501 + + def get_sent_delivery_statuses_with_http_info(self, **kwargs): # noqa: E501 + """get_sent_delivery_statuses # noqa: E501 + + Get all sent email delivery statuses # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_sent_delivery_statuses_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in delivery status list pagination + :param int size: Optional page size in delivery status list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageDeliveryStatus, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page', + 'size', + 'sort', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_sent_delivery_statuses" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/sent/delivery-status', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDeliveryStatus', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_sent_delivery_statuses_by_sent_id(self, sent_id, **kwargs): # noqa: E501 + """get_sent_delivery_statuses_by_sent_id # noqa: E501 + + Get all sent email delivery statuses # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_sent_delivery_statuses_by_sent_id(sent_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str sent_id: (required) + :param int page: Optional page index in delivery status list pagination + :param int size: Optional page size in delivery status list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageDeliveryStatus + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_sent_delivery_statuses_by_sent_id_with_http_info(sent_id, **kwargs) # noqa: E501 + + def get_sent_delivery_statuses_by_sent_id_with_http_info(self, sent_id, **kwargs): # noqa: E501 + """get_sent_delivery_statuses_by_sent_id # noqa: E501 + + Get all sent email delivery statuses # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_sent_delivery_statuses_by_sent_id_with_http_info(sent_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str sent_id: (required) + :param int page: Optional page index in delivery status list pagination + :param int size: Optional page size in delivery status list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageDeliveryStatus, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'sent_id', + 'page', + 'size', + 'sort', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_sent_delivery_statuses_by_sent_id" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'sent_id' is set + if self.api_client.client_side_validation and ('sent_id' not in local_var_params or # noqa: E501 + local_var_params['sent_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `sent_id` when calling `get_sent_delivery_statuses_by_sent_id`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'sent_id' in local_var_params: + path_params['sentId'] = local_var_params['sent_id'] # noqa: E501 + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/sent/{sentId}/delivery-status', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageDeliveryStatus', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_sent_email(self, id, **kwargs): # noqa: E501 + """Get sent email receipt # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_sent_email(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: SentEmailDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_sent_email_with_http_info(id, **kwargs) # noqa: E501 + + def get_sent_email_with_http_info(self, id, **kwargs): # noqa: E501 + """Get sent email receipt # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_sent_email_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(SentEmailDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_sent_email" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `get_sent_email`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/sent/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SentEmailDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_sent_email_html_content(self, id, **kwargs): # noqa: E501 + """Get sent email HTML content # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_sent_email_html_content(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_sent_email_html_content_with_http_info(id, **kwargs) # noqa: E501 + + def get_sent_email_html_content_with_http_info(self, id, **kwargs): # noqa: E501 + """Get sent email HTML content # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_sent_email_html_content_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_sent_email_html_content" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `get_sent_email_html_content`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['text/html']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/sent/{id}/html', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_sent_email_preview_ur_ls(self, id, **kwargs): # noqa: E501 + """Get sent email URL for viewing in browser or downloading # noqa: E501 + + Get a list of URLs for sent email content as text/html or raw SMTP message for viewing the message in a browser. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_sent_email_preview_ur_ls(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: EmailPreviewUrls + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_sent_email_preview_ur_ls_with_http_info(id, **kwargs) # noqa: E501 + + def get_sent_email_preview_ur_ls_with_http_info(self, id, **kwargs): # noqa: E501 + """Get sent email URL for viewing in browser or downloading # noqa: E501 + + Get a list of URLs for sent email content as text/html or raw SMTP message for viewing the message in a browser. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_sent_email_preview_ur_ls_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(EmailPreviewUrls, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_sent_email_preview_ur_ls" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `get_sent_email_preview_ur_ls`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/sent/{id}/urls', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='EmailPreviewUrls', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_sent_email_tracking_pixels(self, id, **kwargs): # noqa: E501 + """get_sent_email_tracking_pixels # noqa: E501 + + Get all tracking pixels for a sent email in paginated form # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_sent_email_tracking_pixels(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: (required) + :param int page: Optional page index in sent email tracking pixel list pagination + :param int size: Optional page size in sent email tracking pixel list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageTrackingPixelProjection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_sent_email_tracking_pixels_with_http_info(id, **kwargs) # noqa: E501 + + def get_sent_email_tracking_pixels_with_http_info(self, id, **kwargs): # noqa: E501 + """get_sent_email_tracking_pixels # noqa: E501 + + Get all tracking pixels for a sent email in paginated form # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_sent_email_tracking_pixels_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: (required) + :param int page: Optional page index in sent email tracking pixel list pagination + :param int size: Optional page size in sent email tracking pixel list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageTrackingPixelProjection, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id', + 'page', + 'size', + 'sort', + 'search_filter', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_sent_email_tracking_pixels" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `get_sent_email_tracking_pixels`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'search_filter' in local_var_params and local_var_params['search_filter'] is not None: # noqa: E501 + query_params.append(('searchFilter', local_var_params['search_filter'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/sent/{id}/tracking-pixels', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageTrackingPixelProjection', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_sent_emails(self, **kwargs): # noqa: E501 + """Get all sent emails in paginated form # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_sent_emails(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Optional inboxId to filter sender of sent emails by + :param int page: Optional page index in inbox sent email list pagination + :param int size: Optional page size in inbox sent email list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageSentEmailProjection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_sent_emails_with_http_info(**kwargs) # noqa: E501 + + def get_sent_emails_with_http_info(self, **kwargs): # noqa: E501 + """Get all sent emails in paginated form # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_sent_emails_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Optional inboxId to filter sender of sent emails by + :param int page: Optional page index in inbox sent email list pagination + :param int size: Optional page size in inbox sent email list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageSentEmailProjection, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'page', + 'size', + 'sort', + 'search_filter', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_sent_emails" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 + query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'search_filter' in local_var_params and local_var_params['search_filter'] is not None: # noqa: E501 + query_params.append(('searchFilter', local_var_params['search_filter'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/sent', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageSentEmailProjection', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_sent_emails_with_queue_results(self, **kwargs): # noqa: E501 + """Get results of email sent with queues in paginated form # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_sent_emails_with_queue_results(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in inbox sent email list pagination + :param int size: Optional page size in inbox sent email list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageSentEmailWithQueueProjection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_sent_emails_with_queue_results_with_http_info(**kwargs) # noqa: E501 + + def get_sent_emails_with_queue_results_with_http_info(self, **kwargs): # noqa: E501 + """Get results of email sent with queues in paginated form # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_sent_emails_with_queue_results_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in inbox sent email list pagination + :param int size: Optional page size in inbox sent email list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageSentEmailWithQueueProjection, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page', + 'size', + 'sort', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_sent_emails_with_queue_results" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/sent/queue-results', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageSentEmailWithQueueProjection', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_sent_organization_emails(self, **kwargs): # noqa: E501 + """get_sent_organization_emails # noqa: E501 + + Get all sent organization emails in paginated form # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_sent_organization_emails(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Optional inboxId to filter sender of sent emails by + :param int page: Optional page index in sent email list pagination + :param int size: Optional page size in sent email list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageSentEmailProjection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_sent_organization_emails_with_http_info(**kwargs) # noqa: E501 + + def get_sent_organization_emails_with_http_info(self, **kwargs): # noqa: E501 + """get_sent_organization_emails # noqa: E501 + + Get all sent organization emails in paginated form # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_sent_organization_emails_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Optional inboxId to filter sender of sent emails by + :param int page: Optional page index in sent email list pagination + :param int size: Optional page size in sent email list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageSentEmailProjection, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'page', + 'size', + 'sort', + 'search_filter', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_sent_organization_emails" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 + query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'search_filter' in local_var_params and local_var_params['search_filter'] is not None: # noqa: E501 + query_params.append(('searchFilter', local_var_params['search_filter'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/sent/organization', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageSentEmailProjection', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def wait_for_delivery_statuses(self, **kwargs): # noqa: E501 + """wait_for_delivery_statuses # noqa: E501 + + Wait for delivery statuses # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.wait_for_delivery_statuses(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str sent_id: Optional sent email ID filter + :param str inbox_id: Optional inbox ID filter + :param int timeout: Optional timeout milliseconds + :param int index: Zero based index of the delivery status to wait for. If 1 delivery status already and you want to wait for the 2nd pass index=1 + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: DeliveryStatusDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.wait_for_delivery_statuses_with_http_info(**kwargs) # noqa: E501 + + def wait_for_delivery_statuses_with_http_info(self, **kwargs): # noqa: E501 + """wait_for_delivery_statuses # noqa: E501 + + Wait for delivery statuses # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.wait_for_delivery_statuses_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str sent_id: Optional sent email ID filter + :param str inbox_id: Optional inbox ID filter + :param int timeout: Optional timeout milliseconds + :param int index: Zero based index of the delivery status to wait for. If 1 delivery status already and you want to wait for the 2nd pass index=1 + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(DeliveryStatusDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'sent_id', + 'inbox_id', + 'timeout', + 'index', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method wait_for_delivery_statuses" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'index' in local_var_params and local_var_params['index'] > 2147483647: # noqa: E501 + raise ApiValueError("Invalid value for parameter `index` when calling `wait_for_delivery_statuses`, must be a value less than or equal to `2147483647`") # noqa: E501 + if self.api_client.client_side_validation and 'index' in local_var_params and local_var_params['index'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `index` when calling `wait_for_delivery_statuses`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'sent_id' in local_var_params and local_var_params['sent_id'] is not None: # noqa: E501 + query_params.append(('sentId', local_var_params['sent_id'])) # noqa: E501 + if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 + query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 + if 'timeout' in local_var_params and local_var_params['timeout'] is not None: # noqa: E501 + query_params.append(('timeout', local_var_params['timeout'])) # noqa: E501 + if 'index' in local_var_params and local_var_params['index'] is not None: # noqa: E501 + query_params.append(('index', local_var_params['index'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/sent/delivery-status/wait-for', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeliveryStatusDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/mailslurp_client/api/sms_controller_api.py b/mailslurp_client/api/sms_controller_api.py new file mode 100644 index 00000000..26d7d3bb --- /dev/null +++ b/mailslurp_client/api/sms_controller_api.py @@ -0,0 +1,510 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from mailslurp_client.api_client import ApiClient +from mailslurp_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class SmsControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def delete_sms_message(self, sms_id, **kwargs): # noqa: E501 + """Delete SMS message. # noqa: E501 + + Delete an SMS message # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_sms_message(sms_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str sms_id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_sms_message_with_http_info(sms_id, **kwargs) # noqa: E501 + + def delete_sms_message_with_http_info(self, sms_id, **kwargs): # noqa: E501 + """Delete SMS message. # noqa: E501 + + Delete an SMS message # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_sms_message_with_http_info(sms_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str sms_id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'sms_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_sms_message" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'sms_id' is set + if self.api_client.client_side_validation and ('sms_id' not in local_var_params or # noqa: E501 + local_var_params['sms_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `sms_id` when calling `delete_sms_message`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'sms_id' in local_var_params: + path_params['smsId'] = local_var_params['sms_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/sms/{smsId}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_sms_messages(self, **kwargs): # noqa: E501 + """Delete all SMS messages # noqa: E501 + + Delete all SMS messages or all messages for a given phone number # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_sms_messages(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str phone_number_id: + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_sms_messages_with_http_info(**kwargs) # noqa: E501 + + def delete_sms_messages_with_http_info(self, **kwargs): # noqa: E501 + """Delete all SMS messages # noqa: E501 + + Delete all SMS messages or all messages for a given phone number # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_sms_messages_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str phone_number_id: + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'phone_number_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_sms_messages" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'phone_number_id' in local_var_params and local_var_params['phone_number_id'] is not None: # noqa: E501 + query_params.append(('phoneNumberId', local_var_params['phone_number_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/sms', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_sms_message(self, sms_id, **kwargs): # noqa: E501 + """Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController. # noqa: E501 + + Returns a SMS summary object with content. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_sms_message(sms_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str sms_id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: SmsDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_sms_message_with_http_info(sms_id, **kwargs) # noqa: E501 + + def get_sms_message_with_http_info(self, sms_id, **kwargs): # noqa: E501 + """Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController. # noqa: E501 + + Returns a SMS summary object with content. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_sms_message_with_http_info(sms_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str sms_id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(SmsDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'sms_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_sms_message" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'sms_id' is set + if self.api_client.client_side_validation and ('sms_id' not in local_var_params or # noqa: E501 + local_var_params['sms_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `sms_id` when calling `get_sms_message`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'sms_id' in local_var_params: + path_params['smsId'] = local_var_params['sms_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/sms/{smsId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SmsDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_sms_messages_paginated(self, **kwargs): # noqa: E501 + """Get all SMS messages in all phone numbers in paginated form. . # noqa: E501 + + By default returns all SMS messages across all phone numbers sorted by ascending created at date. Responses are paginated. You can restrict results to a list of phone number IDs. You can also filter out read messages # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_sms_messages_paginated(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str phone_number: Optional receiving phone number to filter SMS messages for + :param int page: Optional page index in SMS list pagination + :param int size: Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results + :param str sort: Optional createdAt sort direction ASC or DESC + :param bool unread_only: Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly + :param datetime since: Optional filter SMSs received after given date time + :param datetime before: Optional filter SMSs received before given date time + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageSmsProjection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_sms_messages_paginated_with_http_info(**kwargs) # noqa: E501 + + def get_sms_messages_paginated_with_http_info(self, **kwargs): # noqa: E501 + """Get all SMS messages in all phone numbers in paginated form. . # noqa: E501 + + By default returns all SMS messages across all phone numbers sorted by ascending created at date. Responses are paginated. You can restrict results to a list of phone number IDs. You can also filter out read messages # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_sms_messages_paginated_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str phone_number: Optional receiving phone number to filter SMS messages for + :param int page: Optional page index in SMS list pagination + :param int size: Optional page size in SMS list pagination. Maximum size is 100. Use page index and sort to page through larger results + :param str sort: Optional createdAt sort direction ASC or DESC + :param bool unread_only: Optional filter for unread SMS only. All SMS are considered unread until they are viewed in the dashboard or requested directly + :param datetime since: Optional filter SMSs received after given date time + :param datetime before: Optional filter SMSs received before given date time + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageSmsProjection, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'phone_number', + 'page', + 'size', + 'sort', + 'unread_only', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_sms_messages_paginated" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `size` when calling `get_sms_messages_paginated`, must be a value less than or equal to `100`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'phone_number' in local_var_params and local_var_params['phone_number'] is not None: # noqa: E501 + query_params.append(('phoneNumber', local_var_params['phone_number'])) # noqa: E501 + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'unread_only' in local_var_params and local_var_params['unread_only'] is not None: # noqa: E501 + query_params.append(('unreadOnly', local_var_params['unread_only'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/sms', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageSmsProjection', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/mailslurp_client/api/template_controller_api.py b/mailslurp_client/api/template_controller_api.py new file mode 100644 index 00000000..1e70acb7 --- /dev/null +++ b/mailslurp_client/api/template_controller_api.py @@ -0,0 +1,970 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from mailslurp_client.api_client import ApiClient +from mailslurp_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class TemplateControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_template(self, create_template_options, **kwargs): # noqa: E501 + """Create a Template # noqa: E501 + + Create an email template with variables for use with templated transactional emails. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_template(create_template_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param CreateTemplateOptions create_template_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: TemplateDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_template_with_http_info(create_template_options, **kwargs) # noqa: E501 + + def create_template_with_http_info(self, create_template_options, **kwargs): # noqa: E501 + """Create a Template # noqa: E501 + + Create an email template with variables for use with templated transactional emails. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_template_with_http_info(create_template_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param CreateTemplateOptions create_template_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(TemplateDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'create_template_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'create_template_options' is set + if self.api_client.client_side_validation and ('create_template_options' not in local_var_params or # noqa: E501 + local_var_params['create_template_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `create_template_options` when calling `create_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'create_template_options' in local_var_params: + body_params = local_var_params['create_template_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/templates', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TemplateDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_template(self, template_id, **kwargs): # noqa: E501 + """Delete email template # noqa: E501 + + Delete template # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_template(template_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str template_id: Template ID (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_template_with_http_info(template_id, **kwargs) # noqa: E501 + + def delete_template_with_http_info(self, template_id, **kwargs): # noqa: E501 + """Delete email template # noqa: E501 + + Delete template # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_template_with_http_info(template_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str template_id: Template ID (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'template_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'template_id' is set + if self.api_client.client_side_validation and ('template_id' not in local_var_params or # noqa: E501 + local_var_params['template_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `template_id` when calling `delete_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'template_id' in local_var_params: + path_params['templateId'] = local_var_params['template_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/templates/{templateId}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_all_templates(self, **kwargs): # noqa: E501 + """List templates # noqa: E501 + + Get all templates in paginated format # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_templates(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in list pagination + :param int size: Optional page size in list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageTemplateProjection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_all_templates_with_http_info(**kwargs) # noqa: E501 + + def get_all_templates_with_http_info(self, **kwargs): # noqa: E501 + """List templates # noqa: E501 + + Get all templates in paginated format # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_templates_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in list pagination + :param int size: Optional page size in list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageTemplateProjection, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page', + 'size', + 'sort', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_templates" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/templates/paginated', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageTemplateProjection', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_template(self, template_id, **kwargs): # noqa: E501 + """Get template # noqa: E501 + + Get email template # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_template(template_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str template_id: Template ID (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: TemplateDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_template_with_http_info(template_id, **kwargs) # noqa: E501 + + def get_template_with_http_info(self, template_id, **kwargs): # noqa: E501 + """Get template # noqa: E501 + + Get email template # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_template_with_http_info(template_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str template_id: Template ID (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(TemplateDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'template_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'template_id' is set + if self.api_client.client_side_validation and ('template_id' not in local_var_params or # noqa: E501 + local_var_params['template_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `template_id` when calling `get_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'template_id' in local_var_params: + path_params['templateId'] = local_var_params['template_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/templates/{templateId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TemplateDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_template_preview_html(self, template_id, **kwargs): # noqa: E501 + """Get template preview HTML # noqa: E501 + + Get email template preview with passed template variables in HTML format for browsers. Pass template variables as query params. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_template_preview_html(template_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str template_id: Template ID (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_template_preview_html_with_http_info(template_id, **kwargs) # noqa: E501 + + def get_template_preview_html_with_http_info(self, template_id, **kwargs): # noqa: E501 + """Get template preview HTML # noqa: E501 + + Get email template preview with passed template variables in HTML format for browsers. Pass template variables as query params. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_template_preview_html_with_http_info(template_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str template_id: Template ID (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(str, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'template_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_template_preview_html" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'template_id' is set + if self.api_client.client_side_validation and ('template_id' not in local_var_params or # noqa: E501 + local_var_params['template_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `template_id` when calling `get_template_preview_html`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'template_id' in local_var_params: + path_params['templateId'] = local_var_params['template_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['text/html;charset=utf-8', 'text/html']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/templates/{templateId}/preview/html', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='str', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_template_preview_json(self, template_id, **kwargs): # noqa: E501 + """Get template preview Json # noqa: E501 + + Get email template preview with passed template variables in JSON format. Pass template variables as query params. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_template_preview_json(template_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str template_id: Template ID (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: TemplatePreview + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_template_preview_json_with_http_info(template_id, **kwargs) # noqa: E501 + + def get_template_preview_json_with_http_info(self, template_id, **kwargs): # noqa: E501 + """Get template preview Json # noqa: E501 + + Get email template preview with passed template variables in JSON format. Pass template variables as query params. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_template_preview_json_with_http_info(template_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str template_id: Template ID (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(TemplatePreview, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'template_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_template_preview_json" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'template_id' is set + if self.api_client.client_side_validation and ('template_id' not in local_var_params or # noqa: E501 + local_var_params['template_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `template_id` when calling `get_template_preview_json`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'template_id' in local_var_params: + path_params['templateId'] = local_var_params['template_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/templates/{templateId}/preview/json', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TemplatePreview', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_templates(self, **kwargs): # noqa: E501 + """List templates # noqa: E501 + + Get all templates # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_templates(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: list[TemplateProjection] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_templates_with_http_info(**kwargs) # noqa: E501 + + def get_templates_with_http_info(self, **kwargs): # noqa: E501 + """List templates # noqa: E501 + + Get all templates # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_templates_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[TemplateProjection], status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_templates" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/templates', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[TemplateProjection]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def update_template(self, template_id, create_template_options, **kwargs): # noqa: E501 + """Update template # noqa: E501 + + Update email template # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_template(template_id, create_template_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str template_id: Template ID (required) + :param CreateTemplateOptions create_template_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: TemplateDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.update_template_with_http_info(template_id, create_template_options, **kwargs) # noqa: E501 + + def update_template_with_http_info(self, template_id, create_template_options, **kwargs): # noqa: E501 + """Update template # noqa: E501 + + Update email template # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_template_with_http_info(template_id, create_template_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str template_id: Template ID (required) + :param CreateTemplateOptions create_template_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(TemplateDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'template_id', + 'create_template_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_template" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'template_id' is set + if self.api_client.client_side_validation and ('template_id' not in local_var_params or # noqa: E501 + local_var_params['template_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `template_id` when calling `update_template`") # noqa: E501 + # verify the required parameter 'create_template_options' is set + if self.api_client.client_side_validation and ('create_template_options' not in local_var_params or # noqa: E501 + local_var_params['create_template_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `create_template_options` when calling `update_template`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'template_id' in local_var_params: + path_params['templateId'] = local_var_params['template_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'create_template_options' in local_var_params: + body_params = local_var_params['create_template_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/templates/{templateId}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TemplateDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/mailslurp_client/api/tracking_controller_api.py b/mailslurp_client/api/tracking_controller_api.py new file mode 100644 index 00000000..769e3431 --- /dev/null +++ b/mailslurp_client/api/tracking_controller_api.py @@ -0,0 +1,403 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from mailslurp_client.api_client import ApiClient +from mailslurp_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class TrackingControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_tracking_pixel(self, create_tracking_pixel_options, **kwargs): # noqa: E501 + """Create tracking pixel # noqa: E501 + + Create a tracking pixel. A tracking pixel is an image that can be embedded in an email. When the email is viewed and the image is seen MailSlurp will mark the pixel as seen. Use tracking pixels to monitor email open events. You can receive open notifications via webhook or by fetching the pixel. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_tracking_pixel(create_tracking_pixel_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param CreateTrackingPixelOptions create_tracking_pixel_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: TrackingPixelDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_tracking_pixel_with_http_info(create_tracking_pixel_options, **kwargs) # noqa: E501 + + def create_tracking_pixel_with_http_info(self, create_tracking_pixel_options, **kwargs): # noqa: E501 + """Create tracking pixel # noqa: E501 + + Create a tracking pixel. A tracking pixel is an image that can be embedded in an email. When the email is viewed and the image is seen MailSlurp will mark the pixel as seen. Use tracking pixels to monitor email open events. You can receive open notifications via webhook or by fetching the pixel. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_tracking_pixel_with_http_info(create_tracking_pixel_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param CreateTrackingPixelOptions create_tracking_pixel_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(TrackingPixelDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'create_tracking_pixel_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_tracking_pixel" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'create_tracking_pixel_options' is set + if self.api_client.client_side_validation and ('create_tracking_pixel_options' not in local_var_params or # noqa: E501 + local_var_params['create_tracking_pixel_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `create_tracking_pixel_options` when calling `create_tracking_pixel`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'create_tracking_pixel_options' in local_var_params: + body_params = local_var_params['create_tracking_pixel_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/tracking/pixels', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TrackingPixelDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_all_tracking_pixels(self, **kwargs): # noqa: E501 + """Get tracking pixels # noqa: E501 + + List tracking pixels in paginated form # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_tracking_pixels(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in list pagination + :param int size: Optional page size in list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageTrackingPixelProjection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_all_tracking_pixels_with_http_info(**kwargs) # noqa: E501 + + def get_all_tracking_pixels_with_http_info(self, **kwargs): # noqa: E501 + """Get tracking pixels # noqa: E501 + + List tracking pixels in paginated form # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_tracking_pixels_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in list pagination + :param int size: Optional page size in list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageTrackingPixelProjection, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page', + 'size', + 'sort', + 'search_filter', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_tracking_pixels" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'search_filter' in local_var_params and local_var_params['search_filter'] is not None: # noqa: E501 + query_params.append(('searchFilter', local_var_params['search_filter'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/tracking/pixels', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageTrackingPixelProjection', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_tracking_pixel(self, id, **kwargs): # noqa: E501 + """Get pixel # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_tracking_pixel(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: TrackingPixelDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_tracking_pixel_with_http_info(id, **kwargs) # noqa: E501 + + def get_tracking_pixel_with_http_info(self, id, **kwargs): # noqa: E501 + """Get pixel # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_tracking_pixel_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(TrackingPixelDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_tracking_pixel" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'id' is set + if self.api_client.client_side_validation and ('id' not in local_var_params or # noqa: E501 + local_var_params['id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `id` when calling `get_tracking_pixel`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in local_var_params: + path_params['id'] = local_var_params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/tracking/pixels/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='TrackingPixelDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/mailslurp_client/api/wait_for_controller_api.py b/mailslurp_client/api/wait_for_controller_api.py new file mode 100644 index 00000000..85aca171 --- /dev/null +++ b/mailslurp_client/api/wait_for_controller_api.py @@ -0,0 +1,1161 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from mailslurp_client.api_client import ApiClient +from mailslurp_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class WaitForControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def wait_for(self, wait_for_conditions, **kwargs): # noqa: E501 + """Wait for an email to match the provided filter conditions such as subject contains keyword. # noqa: E501 + + Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.wait_for(wait_for_conditions, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param WaitForConditions wait_for_conditions: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: list[EmailPreview] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.wait_for_with_http_info(wait_for_conditions, **kwargs) # noqa: E501 + + def wait_for_with_http_info(self, wait_for_conditions, **kwargs): # noqa: E501 + """Wait for an email to match the provided filter conditions such as subject contains keyword. # noqa: E501 + + Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.wait_for_with_http_info(wait_for_conditions, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param WaitForConditions wait_for_conditions: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[EmailPreview], status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'wait_for_conditions' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method wait_for" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'wait_for_conditions' is set + if self.api_client.client_side_validation and ('wait_for_conditions' not in local_var_params or # noqa: E501 + local_var_params['wait_for_conditions'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `wait_for_conditions` when calling `wait_for`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'wait_for_conditions' in local_var_params: + body_params = local_var_params['wait_for_conditions'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/waitFor', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[EmailPreview]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def wait_for_email_count(self, inbox_id, count, **kwargs): # noqa: E501 + """Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs # noqa: E501 + + If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.wait_for_email_count(inbox_id, count, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Id of the inbox we are fetching emails from (required) + :param int count: Number of emails to wait for. Must be greater that 1 (required) + :param int timeout: Max milliseconds to wait + :param bool unread_only: Optional filter for unread only + :param datetime before: Filter for emails that were received before the given timestamp + :param datetime since: Filter for emails that were received after the given timestamp + :param str sort: Sort direction + :param int delay: Max milliseconds delay between calls + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: list[EmailPreview] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.wait_for_email_count_with_http_info(inbox_id, count, **kwargs) # noqa: E501 + + def wait_for_email_count_with_http_info(self, inbox_id, count, **kwargs): # noqa: E501 + """Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs # noqa: E501 + + If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.wait_for_email_count_with_http_info(inbox_id, count, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Id of the inbox we are fetching emails from (required) + :param int count: Number of emails to wait for. Must be greater that 1 (required) + :param int timeout: Max milliseconds to wait + :param bool unread_only: Optional filter for unread only + :param datetime before: Filter for emails that were received before the given timestamp + :param datetime since: Filter for emails that were received after the given timestamp + :param str sort: Sort direction + :param int delay: Max milliseconds delay between calls + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[EmailPreview], status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'count', + 'timeout', + 'unread_only', + 'before', + 'since', + 'sort', + 'delay' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method wait_for_email_count" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `wait_for_email_count`") # noqa: E501 + # verify the required parameter 'count' is set + if self.api_client.client_side_validation and ('count' not in local_var_params or # noqa: E501 + local_var_params['count'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `count` when calling `wait_for_email_count`") # noqa: E501 + + if self.api_client.client_side_validation and 'count' in local_var_params and local_var_params['count'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `count` when calling `wait_for_email_count`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 + query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 + if 'count' in local_var_params and local_var_params['count'] is not None: # noqa: E501 + query_params.append(('count', local_var_params['count'])) # noqa: E501 + if 'timeout' in local_var_params and local_var_params['timeout'] is not None: # noqa: E501 + query_params.append(('timeout', local_var_params['timeout'])) # noqa: E501 + if 'unread_only' in local_var_params and local_var_params['unread_only'] is not None: # noqa: E501 + query_params.append(('unreadOnly', local_var_params['unread_only'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'delay' in local_var_params and local_var_params['delay'] is not None: # noqa: E501 + query_params.append(('delay', local_var_params['delay'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/waitForEmailCount', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[EmailPreview]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def wait_for_latest_email(self, **kwargs): # noqa: E501 + """Fetch inbox's latest email or if empty wait for an email to arrive # noqa: E501 + + Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox set `unreadOnly=true` or see the other receive methods such as `waitForNthEmail` or `waitForEmailCount`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.wait_for_latest_email(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Id of the inbox we are fetching emails from + :param int timeout: Max milliseconds to wait + :param bool unread_only: Optional filter for unread only. + :param datetime before: Filter for emails that were before after the given timestamp + :param datetime since: Filter for emails that were received after the given timestamp + :param str sort: Sort direction + :param int delay: Max milliseconds delay between calls + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Email + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.wait_for_latest_email_with_http_info(**kwargs) # noqa: E501 + + def wait_for_latest_email_with_http_info(self, **kwargs): # noqa: E501 + """Fetch inbox's latest email or if empty wait for an email to arrive # noqa: E501 + + Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox set `unreadOnly=true` or see the other receive methods such as `waitForNthEmail` or `waitForEmailCount`. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.wait_for_latest_email_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Id of the inbox we are fetching emails from + :param int timeout: Max milliseconds to wait + :param bool unread_only: Optional filter for unread only. + :param datetime before: Filter for emails that were before after the given timestamp + :param datetime since: Filter for emails that were received after the given timestamp + :param str sort: Sort direction + :param int delay: Max milliseconds delay between calls + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(Email, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'timeout', + 'unread_only', + 'before', + 'since', + 'sort', + 'delay' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method wait_for_latest_email" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 + query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 + if 'timeout' in local_var_params and local_var_params['timeout'] is not None: # noqa: E501 + query_params.append(('timeout', local_var_params['timeout'])) # noqa: E501 + if 'unread_only' in local_var_params and local_var_params['unread_only'] is not None: # noqa: E501 + query_params.append(('unreadOnly', local_var_params['unread_only'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'delay' in local_var_params and local_var_params['delay'] is not None: # noqa: E501 + query_params.append(('delay', local_var_params['delay'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/waitForLatestEmail', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Email', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def wait_for_latest_sms(self, wait_for_single_sms_options, **kwargs): # noqa: E501 + """Wait for the latest SMS message to match the provided filter conditions such as body contains keyword. # noqa: E501 + + Wait until a phone number meets given conditions or return immediately if already met # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.wait_for_latest_sms(wait_for_single_sms_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param WaitForSingleSmsOptions wait_for_single_sms_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: SmsDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.wait_for_latest_sms_with_http_info(wait_for_single_sms_options, **kwargs) # noqa: E501 + + def wait_for_latest_sms_with_http_info(self, wait_for_single_sms_options, **kwargs): # noqa: E501 + """Wait for the latest SMS message to match the provided filter conditions such as body contains keyword. # noqa: E501 + + Wait until a phone number meets given conditions or return immediately if already met # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.wait_for_latest_sms_with_http_info(wait_for_single_sms_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param WaitForSingleSmsOptions wait_for_single_sms_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(SmsDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'wait_for_single_sms_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method wait_for_latest_sms" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'wait_for_single_sms_options' is set + if self.api_client.client_side_validation and ('wait_for_single_sms_options' not in local_var_params or # noqa: E501 + local_var_params['wait_for_single_sms_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `wait_for_single_sms_options` when calling `wait_for_latest_sms`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'wait_for_single_sms_options' in local_var_params: + body_params = local_var_params['wait_for_single_sms_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/waitForLatestSms', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SmsDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def wait_for_matching_emails(self, inbox_id, count, match_options, **kwargs): # noqa: E501 + """Wait or return list of emails that match simple matching patterns # noqa: E501 + + Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.wait_for_matching_emails(inbox_id, count, match_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Id of the inbox we are fetching emails from (required) + :param int count: Number of emails to wait for. Must be greater or equal to 1 (required) + :param MatchOptions match_options: (required) + :param datetime before: Filter for emails that were received before the given timestamp + :param datetime since: Filter for emails that were received after the given timestamp + :param str sort: Sort direction + :param int delay: Max milliseconds delay between calls + :param int timeout: Max milliseconds to wait + :param bool unread_only: Optional filter for unread only + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: list[EmailPreview] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.wait_for_matching_emails_with_http_info(inbox_id, count, match_options, **kwargs) # noqa: E501 + + def wait_for_matching_emails_with_http_info(self, inbox_id, count, match_options, **kwargs): # noqa: E501 + """Wait or return list of emails that match simple matching patterns # noqa: E501 + + Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.wait_for_matching_emails_with_http_info(inbox_id, count, match_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Id of the inbox we are fetching emails from (required) + :param int count: Number of emails to wait for. Must be greater or equal to 1 (required) + :param MatchOptions match_options: (required) + :param datetime before: Filter for emails that were received before the given timestamp + :param datetime since: Filter for emails that were received after the given timestamp + :param str sort: Sort direction + :param int delay: Max milliseconds delay between calls + :param int timeout: Max milliseconds to wait + :param bool unread_only: Optional filter for unread only + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[EmailPreview], status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'count', + 'match_options', + 'before', + 'since', + 'sort', + 'delay', + 'timeout', + 'unread_only' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method wait_for_matching_emails" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `wait_for_matching_emails`") # noqa: E501 + # verify the required parameter 'count' is set + if self.api_client.client_side_validation and ('count' not in local_var_params or # noqa: E501 + local_var_params['count'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `count` when calling `wait_for_matching_emails`") # noqa: E501 + # verify the required parameter 'match_options' is set + if self.api_client.client_side_validation and ('match_options' not in local_var_params or # noqa: E501 + local_var_params['match_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `match_options` when calling `wait_for_matching_emails`") # noqa: E501 + + if self.api_client.client_side_validation and 'count' in local_var_params and local_var_params['count'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `count` when calling `wait_for_matching_emails`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 + query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 + if 'count' in local_var_params and local_var_params['count'] is not None: # noqa: E501 + query_params.append(('count', local_var_params['count'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'delay' in local_var_params and local_var_params['delay'] is not None: # noqa: E501 + query_params.append(('delay', local_var_params['delay'])) # noqa: E501 + if 'timeout' in local_var_params and local_var_params['timeout'] is not None: # noqa: E501 + query_params.append(('timeout', local_var_params['timeout'])) # noqa: E501 + if 'unread_only' in local_var_params and local_var_params['unread_only'] is not None: # noqa: E501 + query_params.append(('unreadOnly', local_var_params['unread_only'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'match_options' in local_var_params: + body_params = local_var_params['match_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/waitForMatchingEmails', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[EmailPreview]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def wait_for_matching_first_email(self, inbox_id, match_options, **kwargs): # noqa: E501 + """Wait for or return the first email that matches provided MatchOptions array # noqa: E501 + + Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.wait_for_matching_first_email(inbox_id, match_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Id of the inbox we are matching an email for (required) + :param MatchOptions match_options: (required) + :param int timeout: Max milliseconds to wait + :param bool unread_only: Optional filter for unread only + :param datetime since: Filter for emails that were received after the given timestamp + :param datetime before: Filter for emails that were received before the given timestamp + :param str sort: Sort direction + :param int delay: Max milliseconds delay between calls + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Email + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.wait_for_matching_first_email_with_http_info(inbox_id, match_options, **kwargs) # noqa: E501 + + def wait_for_matching_first_email_with_http_info(self, inbox_id, match_options, **kwargs): # noqa: E501 + """Wait for or return the first email that matches provided MatchOptions array # noqa: E501 + + Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.wait_for_matching_first_email_with_http_info(inbox_id, match_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Id of the inbox we are matching an email for (required) + :param MatchOptions match_options: (required) + :param int timeout: Max milliseconds to wait + :param bool unread_only: Optional filter for unread only + :param datetime since: Filter for emails that were received after the given timestamp + :param datetime before: Filter for emails that were received before the given timestamp + :param str sort: Sort direction + :param int delay: Max milliseconds delay between calls + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(Email, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'match_options', + 'timeout', + 'unread_only', + 'since', + 'before', + 'sort', + 'delay' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method wait_for_matching_first_email" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `wait_for_matching_first_email`") # noqa: E501 + # verify the required parameter 'match_options' is set + if self.api_client.client_side_validation and ('match_options' not in local_var_params or # noqa: E501 + local_var_params['match_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `match_options` when calling `wait_for_matching_first_email`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 + query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 + if 'timeout' in local_var_params and local_var_params['timeout'] is not None: # noqa: E501 + query_params.append(('timeout', local_var_params['timeout'])) # noqa: E501 + if 'unread_only' in local_var_params and local_var_params['unread_only'] is not None: # noqa: E501 + query_params.append(('unreadOnly', local_var_params['unread_only'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'delay' in local_var_params and local_var_params['delay'] is not None: # noqa: E501 + query_params.append(('delay', local_var_params['delay'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'match_options' in local_var_params: + body_params = local_var_params['match_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/waitForMatchingFirstEmail', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Email', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def wait_for_nth_email(self, **kwargs): # noqa: E501 + """Wait for or fetch the email with a given index in the inbox specified. If index doesn't exist waits for it to exist or timeout to occur. # noqa: E501 + + If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.wait_for_nth_email(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Id of the inbox you are fetching emails from + :param int index: Zero based index of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass index=1 + :param int timeout: Max milliseconds to wait for the nth email if not already present + :param bool unread_only: Optional filter for unread only + :param datetime since: Filter for emails that were received after the given timestamp + :param datetime before: Filter for emails that were received before the given timestamp + :param str sort: Sort direction + :param int delay: Max milliseconds delay between calls + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Email + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.wait_for_nth_email_with_http_info(**kwargs) # noqa: E501 + + def wait_for_nth_email_with_http_info(self, **kwargs): # noqa: E501 + """Wait for or fetch the email with a given index in the inbox specified. If index doesn't exist waits for it to exist or timeout to occur. # noqa: E501 + + If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.wait_for_nth_email_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: Id of the inbox you are fetching emails from + :param int index: Zero based index of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass index=1 + :param int timeout: Max milliseconds to wait for the nth email if not already present + :param bool unread_only: Optional filter for unread only + :param datetime since: Filter for emails that were received after the given timestamp + :param datetime before: Filter for emails that were received before the given timestamp + :param str sort: Sort direction + :param int delay: Max milliseconds delay between calls + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(Email, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'index', + 'timeout', + 'unread_only', + 'since', + 'before', + 'sort', + 'delay' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method wait_for_nth_email" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'index' in local_var_params and local_var_params['index'] > 2147483647: # noqa: E501 + raise ApiValueError("Invalid value for parameter `index` when calling `wait_for_nth_email`, must be a value less than or equal to `2147483647`") # noqa: E501 + if self.api_client.client_side_validation and 'index' in local_var_params and local_var_params['index'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `index` when calling `wait_for_nth_email`, must be a value greater than or equal to `0`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 + query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 + if 'index' in local_var_params and local_var_params['index'] is not None: # noqa: E501 + query_params.append(('index', local_var_params['index'])) # noqa: E501 + if 'timeout' in local_var_params and local_var_params['timeout'] is not None: # noqa: E501 + query_params.append(('timeout', local_var_params['timeout'])) # noqa: E501 + if 'unread_only' in local_var_params and local_var_params['unread_only'] is not None: # noqa: E501 + query_params.append(('unreadOnly', local_var_params['unread_only'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'delay' in local_var_params and local_var_params['delay'] is not None: # noqa: E501 + query_params.append(('delay', local_var_params['delay'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/waitForNthEmail', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Email', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def wait_for_sms(self, wait_for_sms_conditions, **kwargs): # noqa: E501 + """Wait for an SMS message to match the provided filter conditions such as body contains keyword. # noqa: E501 + + Generic waitFor method that will wait until a phone number meets given conditions or return immediately if already met # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.wait_for_sms(wait_for_sms_conditions, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param WaitForSmsConditions wait_for_sms_conditions: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: list[SmsPreview] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.wait_for_sms_with_http_info(wait_for_sms_conditions, **kwargs) # noqa: E501 + + def wait_for_sms_with_http_info(self, wait_for_sms_conditions, **kwargs): # noqa: E501 + """Wait for an SMS message to match the provided filter conditions such as body contains keyword. # noqa: E501 + + Generic waitFor method that will wait until a phone number meets given conditions or return immediately if already met # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.wait_for_sms_with_http_info(wait_for_sms_conditions, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param WaitForSmsConditions wait_for_sms_conditions: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[SmsPreview], status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'wait_for_sms_conditions' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method wait_for_sms" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'wait_for_sms_conditions' is set + if self.api_client.client_side_validation and ('wait_for_sms_conditions' not in local_var_params or # noqa: E501 + local_var_params['wait_for_sms_conditions'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `wait_for_sms_conditions` when calling `wait_for_sms`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'wait_for_sms_conditions' in local_var_params: + body_params = local_var_params['wait_for_sms_conditions'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/waitForSms', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[SmsPreview]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/mailslurp_client/api/webhook_controller_api.py b/mailslurp_client/api/webhook_controller_api.py new file mode 100644 index 00000000..31ac4877 --- /dev/null +++ b/mailslurp_client/api/webhook_controller_api.py @@ -0,0 +1,3751 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from mailslurp_client.api_client import ApiClient +from mailslurp_client.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) + + +class WebhookControllerApi(object): + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_account_webhook(self, create_webhook_options, **kwargs): # noqa: E501 + """Attach a WebHook URL to an inbox # noqa: E501 + + Get notified of account level events such as bounce and bounce recipient. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_account_webhook(create_webhook_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param CreateWebhookOptions create_webhook_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: WebhookDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_account_webhook_with_http_info(create_webhook_options, **kwargs) # noqa: E501 + + def create_account_webhook_with_http_info(self, create_webhook_options, **kwargs): # noqa: E501 + """Attach a WebHook URL to an inbox # noqa: E501 + + Get notified of account level events such as bounce and bounce recipient. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_account_webhook_with_http_info(create_webhook_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param CreateWebhookOptions create_webhook_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(WebhookDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'create_webhook_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_account_webhook" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'create_webhook_options' is set + if self.api_client.client_side_validation and ('create_webhook_options' not in local_var_params or # noqa: E501 + local_var_params['create_webhook_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `create_webhook_options` when calling `create_account_webhook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'create_webhook_options' in local_var_params: + body_params = local_var_params['create_webhook_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WebhookDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_webhook(self, inbox_id, create_webhook_options, **kwargs): # noqa: E501 + """Attach a WebHook URL to an inbox # noqa: E501 + + Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_webhook(inbox_id, create_webhook_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: (required) + :param CreateWebhookOptions create_webhook_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: WebhookDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_webhook_with_http_info(inbox_id, create_webhook_options, **kwargs) # noqa: E501 + + def create_webhook_with_http_info(self, inbox_id, create_webhook_options, **kwargs): # noqa: E501 + """Attach a WebHook URL to an inbox # noqa: E501 + + Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_webhook_with_http_info(inbox_id, create_webhook_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: (required) + :param CreateWebhookOptions create_webhook_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(WebhookDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'create_webhook_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_webhook" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `create_webhook`") # noqa: E501 + # verify the required parameter 'create_webhook_options' is set + if self.api_client.client_side_validation and ('create_webhook_options' not in local_var_params or # noqa: E501 + local_var_params['create_webhook_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `create_webhook_options` when calling `create_webhook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'inbox_id' in local_var_params: + path_params['inboxId'] = local_var_params['inbox_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'create_webhook_options' in local_var_params: + body_params = local_var_params['create_webhook_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/{inboxId}/webhooks', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WebhookDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_webhook_for_phone_number(self, phone_number_id, create_webhook_options, **kwargs): # noqa: E501 + """Attach a WebHook URL to a phone number # noqa: E501 + + Get notified whenever a phone number receives an SMS via a WebHook URL. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_webhook_for_phone_number(phone_number_id, create_webhook_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str phone_number_id: (required) + :param CreateWebhookOptions create_webhook_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: WebhookDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.create_webhook_for_phone_number_with_http_info(phone_number_id, create_webhook_options, **kwargs) # noqa: E501 + + def create_webhook_for_phone_number_with_http_info(self, phone_number_id, create_webhook_options, **kwargs): # noqa: E501 + """Attach a WebHook URL to a phone number # noqa: E501 + + Get notified whenever a phone number receives an SMS via a WebHook URL. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_webhook_for_phone_number_with_http_info(phone_number_id, create_webhook_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str phone_number_id: (required) + :param CreateWebhookOptions create_webhook_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(WebhookDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'phone_number_id', + 'create_webhook_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method create_webhook_for_phone_number" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'phone_number_id' is set + if self.api_client.client_side_validation and ('phone_number_id' not in local_var_params or # noqa: E501 + local_var_params['phone_number_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `phone_number_id` when calling `create_webhook_for_phone_number`") # noqa: E501 + # verify the required parameter 'create_webhook_options' is set + if self.api_client.client_side_validation and ('create_webhook_options' not in local_var_params or # noqa: E501 + local_var_params['create_webhook_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `create_webhook_options` when calling `create_webhook_for_phone_number`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'phone_number_id' in local_var_params: + path_params['phoneNumberId'] = local_var_params['phone_number_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'create_webhook_options' in local_var_params: + body_params = local_var_params['create_webhook_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/phone/numbers/{phoneNumberId}/webhooks', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WebhookDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_all_webhooks(self, **kwargs): # noqa: E501 + """Delete all webhooks # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_all_webhooks(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param datetime before: before + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_all_webhooks_with_http_info(**kwargs) # noqa: E501 + + def delete_all_webhooks_with_http_info(self, **kwargs): # noqa: E501 + """Delete all webhooks # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_all_webhooks_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param datetime before: before + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_all_webhooks" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_webhook(self, inbox_id, webhook_id, **kwargs): # noqa: E501 + """Delete and disable a Webhook for an Inbox # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_webhook(inbox_id, webhook_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: (required) + :param str webhook_id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_webhook_with_http_info(inbox_id, webhook_id, **kwargs) # noqa: E501 + + def delete_webhook_with_http_info(self, inbox_id, webhook_id, **kwargs): # noqa: E501 + """Delete and disable a Webhook for an Inbox # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_webhook_with_http_info(inbox_id, webhook_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: (required) + :param str webhook_id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'webhook_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_webhook" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `delete_webhook`") # noqa: E501 + # verify the required parameter 'webhook_id' is set + if self.api_client.client_side_validation and ('webhook_id' not in local_var_params or # noqa: E501 + local_var_params['webhook_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `webhook_id` when calling `delete_webhook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'inbox_id' in local_var_params: + path_params['inboxId'] = local_var_params['inbox_id'] # noqa: E501 + if 'webhook_id' in local_var_params: + path_params['webhookId'] = local_var_params['webhook_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/{inboxId}/webhooks/{webhookId}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def delete_webhook_by_id(self, webhook_id, **kwargs): # noqa: E501 + """Delete a webhook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_webhook_by_id(webhook_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str webhook_id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.delete_webhook_by_id_with_http_info(webhook_id, **kwargs) # noqa: E501 + + def delete_webhook_by_id_with_http_info(self, webhook_id, **kwargs): # noqa: E501 + """Delete a webhook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.delete_webhook_by_id_with_http_info(webhook_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str webhook_id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'webhook_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method delete_webhook_by_id" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'webhook_id' is set + if self.api_client.client_side_validation and ('webhook_id' not in local_var_params or # noqa: E501 + local_var_params['webhook_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `webhook_id` when calling `delete_webhook_by_id`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'webhook_id' in local_var_params: + path_params['webhookId'] = local_var_params['webhook_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/{webhookId}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_all_webhook_results(self, **kwargs): # noqa: E501 + """Get results for all webhooks # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_webhook_results(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in list pagination + :param int size: Optional page size in list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param bool unseen_only: Filter for unseen exceptions only + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageWebhookResult + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_all_webhook_results_with_http_info(**kwargs) # noqa: E501 + + def get_all_webhook_results_with_http_info(self, **kwargs): # noqa: E501 + """Get results for all webhooks # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_webhook_results_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in list pagination + :param int size: Optional page size in list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param bool unseen_only: Filter for unseen exceptions only + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageWebhookResult, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page', + 'size', + 'sort', + 'search_filter', + 'since', + 'before', + 'unseen_only' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_webhook_results" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'search_filter' in local_var_params and local_var_params['search_filter'] is not None: # noqa: E501 + query_params.append(('searchFilter', local_var_params['search_filter'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + if 'unseen_only' in local_var_params and local_var_params['unseen_only'] is not None: # noqa: E501 + query_params.append(('unseenOnly', local_var_params['unseen_only'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/results', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageWebhookResult', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_all_webhooks(self, **kwargs): # noqa: E501 + """List Webhooks Paginated # noqa: E501 + + List webhooks in paginated form. Allows for page index, page size, and sort direction. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_webhooks(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in list pagination + :param int size: Optional page size for paginated result list. + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Filter by created at after the given timestamp + :param str inbox_id: Filter by inboxId + :param str phone_id: Filter by phoneId + :param datetime before: Filter by created at before the given timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageWebhookProjection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_all_webhooks_with_http_info(**kwargs) # noqa: E501 + + def get_all_webhooks_with_http_info(self, **kwargs): # noqa: E501 + """List Webhooks Paginated # noqa: E501 + + List webhooks in paginated form. Allows for page index, page size, and sort direction. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_all_webhooks_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param int page: Optional page index in list pagination + :param int size: Optional page size for paginated result list. + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Filter by created at after the given timestamp + :param str inbox_id: Filter by inboxId + :param str phone_id: Filter by phoneId + :param datetime before: Filter by created at before the given timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageWebhookProjection, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'page', + 'size', + 'sort', + 'search_filter', + 'since', + 'inbox_id', + 'phone_id', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_all_webhooks" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] > 9223372036854775807: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `get_all_webhooks`, must be a value less than or equal to `9223372036854775807`") # noqa: E501 + if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 0: # noqa: E501 + raise ApiValueError("Invalid value for parameter `page` when calling `get_all_webhooks`, must be a value greater than or equal to `0`") # noqa: E501 + if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] > 100: # noqa: E501 + raise ApiValueError("Invalid value for parameter `size` when calling `get_all_webhooks`, must be a value less than or equal to `100`") # noqa: E501 + if self.api_client.client_side_validation and 'size' in local_var_params and local_var_params['size'] < 1: # noqa: E501 + raise ApiValueError("Invalid value for parameter `size` when calling `get_all_webhooks`, must be a value greater than or equal to `1`") # noqa: E501 + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'search_filter' in local_var_params and local_var_params['search_filter'] is not None: # noqa: E501 + query_params.append(('searchFilter', local_var_params['search_filter'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'inbox_id' in local_var_params and local_var_params['inbox_id'] is not None: # noqa: E501 + query_params.append(('inboxId', local_var_params['inbox_id'])) # noqa: E501 + if 'phone_id' in local_var_params and local_var_params['phone_id'] is not None: # noqa: E501 + query_params.append(('phoneId', local_var_params['phone_id'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/paginated', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageWebhookProjection', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_inbox_webhooks_paginated(self, inbox_id, **kwargs): # noqa: E501 + """Get paginated webhooks for an Inbox # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inbox_webhooks_paginated(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: (required) + :param int page: Optional page index in list pagination + :param int size: Optional page size in list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageWebhookProjection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_inbox_webhooks_paginated_with_http_info(inbox_id, **kwargs) # noqa: E501 + + def get_inbox_webhooks_paginated_with_http_info(self, inbox_id, **kwargs): # noqa: E501 + """Get paginated webhooks for an Inbox # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_inbox_webhooks_paginated_with_http_info(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: (required) + :param int page: Optional page index in list pagination + :param int size: Optional page size in list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageWebhookProjection, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id', + 'page', + 'size', + 'sort', + 'search_filter', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_inbox_webhooks_paginated" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `get_inbox_webhooks_paginated`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'inbox_id' in local_var_params: + path_params['inboxId'] = local_var_params['inbox_id'] # noqa: E501 + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'search_filter' in local_var_params and local_var_params['search_filter'] is not None: # noqa: E501 + query_params.append(('searchFilter', local_var_params['search_filter'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/{inboxId}/webhooks/paginated', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageWebhookProjection', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_json_schema_for_webhook_event(self, event, **kwargs): # noqa: E501 + """get_json_schema_for_webhook_event # noqa: E501 + + Get JSON Schema definition for webhook payload by event # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_json_schema_for_webhook_event(event, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str event: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: JSONSchemaDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_json_schema_for_webhook_event_with_http_info(event, **kwargs) # noqa: E501 + + def get_json_schema_for_webhook_event_with_http_info(self, event, **kwargs): # noqa: E501 + """get_json_schema_for_webhook_event # noqa: E501 + + Get JSON Schema definition for webhook payload by event # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_json_schema_for_webhook_event_with_http_info(event, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str event: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(JSONSchemaDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'event' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_json_schema_for_webhook_event" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'event' is set + if self.api_client.client_side_validation and ('event' not in local_var_params or # noqa: E501 + local_var_params['event'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `event` when calling `get_json_schema_for_webhook_event`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'event' in local_var_params and local_var_params['event'] is not None: # noqa: E501 + query_params.append(('event', local_var_params['event'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/schema', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='JSONSchemaDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_json_schema_for_webhook_payload(self, webhook_id, **kwargs): # noqa: E501 + """get_json_schema_for_webhook_payload # noqa: E501 + + Get JSON Schema definition for webhook payload # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_json_schema_for_webhook_payload(webhook_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str webhook_id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: JSONSchemaDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_json_schema_for_webhook_payload_with_http_info(webhook_id, **kwargs) # noqa: E501 + + def get_json_schema_for_webhook_payload_with_http_info(self, webhook_id, **kwargs): # noqa: E501 + """get_json_schema_for_webhook_payload # noqa: E501 + + Get JSON Schema definition for webhook payload # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_json_schema_for_webhook_payload_with_http_info(webhook_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str webhook_id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(JSONSchemaDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'webhook_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_json_schema_for_webhook_payload" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'webhook_id' is set + if self.api_client.client_side_validation and ('webhook_id' not in local_var_params or # noqa: E501 + local_var_params['webhook_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `webhook_id` when calling `get_json_schema_for_webhook_payload`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'webhook_id' in local_var_params: + path_params['webhookId'] = local_var_params['webhook_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/{webhookId}/schema', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='JSONSchemaDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_phone_number_webhooks_paginated(self, phone_id, **kwargs): # noqa: E501 + """Get paginated webhooks for a phone number # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_phone_number_webhooks_paginated(phone_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str phone_id: (required) + :param int page: Optional page index in list pagination + :param int size: Optional page size in list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageWebhookProjection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_phone_number_webhooks_paginated_with_http_info(phone_id, **kwargs) # noqa: E501 + + def get_phone_number_webhooks_paginated_with_http_info(self, phone_id, **kwargs): # noqa: E501 + """Get paginated webhooks for a phone number # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_phone_number_webhooks_paginated_with_http_info(phone_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str phone_id: (required) + :param int page: Optional page index in list pagination + :param int size: Optional page size in list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageWebhookProjection, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'phone_id', + 'page', + 'size', + 'sort', + 'since', + 'before' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_phone_number_webhooks_paginated" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'phone_id' is set + if self.api_client.client_side_validation and ('phone_id' not in local_var_params or # noqa: E501 + local_var_params['phone_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `phone_id` when calling `get_phone_number_webhooks_paginated`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'phone_id' in local_var_params: + path_params['phoneId'] = local_var_params['phone_id'] # noqa: E501 + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/phone/numbers/{phoneId}/webhooks/paginated', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageWebhookProjection', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_test_webhook_payload(self, **kwargs): # noqa: E501 + """get_test_webhook_payload # noqa: E501 + + Get test webhook payload example. Response content depends on eventName passed. Uses `EMAIL_RECEIVED` as default. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_test_webhook_payload(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str event_name: + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: AbstractWebhookPayload + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_test_webhook_payload_with_http_info(**kwargs) # noqa: E501 + + def get_test_webhook_payload_with_http_info(self, **kwargs): # noqa: E501 + """get_test_webhook_payload # noqa: E501 + + Get test webhook payload example. Response content depends on eventName passed. Uses `EMAIL_RECEIVED` as default. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_test_webhook_payload_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str event_name: + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(AbstractWebhookPayload, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'event_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_test_webhook_payload" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'event_name' in local_var_params and local_var_params['event_name'] is not None: # noqa: E501 + query_params.append(('eventName', local_var_params['event_name'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/test', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AbstractWebhookPayload', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_test_webhook_payload_bounce(self, **kwargs): # noqa: E501 + """get_test_webhook_payload_bounce # noqa: E501 + + Get webhook test payload for bounce # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_test_webhook_payload_bounce(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: WebhookBouncePayload + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_test_webhook_payload_bounce_with_http_info(**kwargs) # noqa: E501 + + def get_test_webhook_payload_bounce_with_http_info(self, **kwargs): # noqa: E501 + """get_test_webhook_payload_bounce # noqa: E501 + + Get webhook test payload for bounce # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_test_webhook_payload_bounce_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(WebhookBouncePayload, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_test_webhook_payload_bounce" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/test/email-bounce-payload', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WebhookBouncePayload', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_test_webhook_payload_bounce_recipient(self, **kwargs): # noqa: E501 + """get_test_webhook_payload_bounce_recipient # noqa: E501 + + Get webhook test payload for bounce recipient # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_test_webhook_payload_bounce_recipient(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: WebhookBounceRecipientPayload + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_test_webhook_payload_bounce_recipient_with_http_info(**kwargs) # noqa: E501 + + def get_test_webhook_payload_bounce_recipient_with_http_info(self, **kwargs): # noqa: E501 + """get_test_webhook_payload_bounce_recipient # noqa: E501 + + Get webhook test payload for bounce recipient # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_test_webhook_payload_bounce_recipient_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(WebhookBounceRecipientPayload, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_test_webhook_payload_bounce_recipient" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/test/email-bounce-recipient-payload', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WebhookBounceRecipientPayload', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_test_webhook_payload_delivery_status(self, **kwargs): # noqa: E501 + """Get webhook test payload for delivery status event # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_test_webhook_payload_delivery_status(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: WebhookDeliveryStatusPayload + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_test_webhook_payload_delivery_status_with_http_info(**kwargs) # noqa: E501 + + def get_test_webhook_payload_delivery_status_with_http_info(self, **kwargs): # noqa: E501 + """Get webhook test payload for delivery status event # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_test_webhook_payload_delivery_status_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(WebhookDeliveryStatusPayload, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_test_webhook_payload_delivery_status" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/test/delivery-status-payload', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WebhookDeliveryStatusPayload', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_test_webhook_payload_email_opened(self, **kwargs): # noqa: E501 + """get_test_webhook_payload_email_opened # noqa: E501 + + Get webhook test payload for email opened event # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_test_webhook_payload_email_opened(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: WebhookEmailOpenedPayload + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_test_webhook_payload_email_opened_with_http_info(**kwargs) # noqa: E501 + + def get_test_webhook_payload_email_opened_with_http_info(self, **kwargs): # noqa: E501 + """get_test_webhook_payload_email_opened # noqa: E501 + + Get webhook test payload for email opened event # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_test_webhook_payload_email_opened_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(WebhookEmailOpenedPayload, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_test_webhook_payload_email_opened" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/test/email-opened-payload', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WebhookEmailOpenedPayload', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_test_webhook_payload_email_read(self, **kwargs): # noqa: E501 + """get_test_webhook_payload_email_read # noqa: E501 + + Get webhook test payload for email opened event # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_test_webhook_payload_email_read(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: WebhookEmailReadPayload + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_test_webhook_payload_email_read_with_http_info(**kwargs) # noqa: E501 + + def get_test_webhook_payload_email_read_with_http_info(self, **kwargs): # noqa: E501 + """get_test_webhook_payload_email_read # noqa: E501 + + Get webhook test payload for email opened event # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_test_webhook_payload_email_read_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(WebhookEmailReadPayload, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_test_webhook_payload_email_read" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/test/email-read-payload', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WebhookEmailReadPayload', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_test_webhook_payload_for_webhook(self, webhook_id, **kwargs): # noqa: E501 + """get_test_webhook_payload_for_webhook # noqa: E501 + + Get example payload for webhook # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_test_webhook_payload_for_webhook(webhook_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str webhook_id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: AbstractWebhookPayload + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_test_webhook_payload_for_webhook_with_http_info(webhook_id, **kwargs) # noqa: E501 + + def get_test_webhook_payload_for_webhook_with_http_info(self, webhook_id, **kwargs): # noqa: E501 + """get_test_webhook_payload_for_webhook # noqa: E501 + + Get example payload for webhook # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_test_webhook_payload_for_webhook_with_http_info(webhook_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str webhook_id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(AbstractWebhookPayload, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'webhook_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_test_webhook_payload_for_webhook" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'webhook_id' is set + if self.api_client.client_side_validation and ('webhook_id' not in local_var_params or # noqa: E501 + local_var_params['webhook_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `webhook_id` when calling `get_test_webhook_payload_for_webhook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'webhook_id' in local_var_params: + path_params['webhookId'] = local_var_params['webhook_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/{webhookId}/example', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AbstractWebhookPayload', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_test_webhook_payload_new_attachment(self, **kwargs): # noqa: E501 + """Get webhook test payload for new attachment event # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_test_webhook_payload_new_attachment(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: WebhookNewAttachmentPayload + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_test_webhook_payload_new_attachment_with_http_info(**kwargs) # noqa: E501 + + def get_test_webhook_payload_new_attachment_with_http_info(self, **kwargs): # noqa: E501 + """Get webhook test payload for new attachment event # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_test_webhook_payload_new_attachment_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(WebhookNewAttachmentPayload, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_test_webhook_payload_new_attachment" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/test/new-attachment-payload', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WebhookNewAttachmentPayload', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_test_webhook_payload_new_contact(self, **kwargs): # noqa: E501 + """Get webhook test payload for new contact event # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_test_webhook_payload_new_contact(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: WebhookNewContactPayload + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_test_webhook_payload_new_contact_with_http_info(**kwargs) # noqa: E501 + + def get_test_webhook_payload_new_contact_with_http_info(self, **kwargs): # noqa: E501 + """Get webhook test payload for new contact event # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_test_webhook_payload_new_contact_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(WebhookNewContactPayload, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_test_webhook_payload_new_contact" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/test/new-contact-payload', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WebhookNewContactPayload', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_test_webhook_payload_new_email(self, **kwargs): # noqa: E501 + """Get webhook test payload for new email event # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_test_webhook_payload_new_email(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: WebhookNewEmailPayload + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_test_webhook_payload_new_email_with_http_info(**kwargs) # noqa: E501 + + def get_test_webhook_payload_new_email_with_http_info(self, **kwargs): # noqa: E501 + """Get webhook test payload for new email event # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_test_webhook_payload_new_email_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(WebhookNewEmailPayload, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_test_webhook_payload_new_email" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/test/new-email-payload', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WebhookNewEmailPayload', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_test_webhook_payload_new_sms(self, **kwargs): # noqa: E501 + """Get webhook test payload for new sms event # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_test_webhook_payload_new_sms(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: WebhookNewSmsPayload + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_test_webhook_payload_new_sms_with_http_info(**kwargs) # noqa: E501 + + def get_test_webhook_payload_new_sms_with_http_info(self, **kwargs): # noqa: E501 + """Get webhook test payload for new sms event # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_test_webhook_payload_new_sms_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(WebhookNewSmsPayload, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_test_webhook_payload_new_sms" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/test/new-sms-payload', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WebhookNewSmsPayload', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_webhook(self, webhook_id, **kwargs): # noqa: E501 + """Get a webhook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_webhook(webhook_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str webhook_id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: WebhookDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_webhook_with_http_info(webhook_id, **kwargs) # noqa: E501 + + def get_webhook_with_http_info(self, webhook_id, **kwargs): # noqa: E501 + """Get a webhook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_webhook_with_http_info(webhook_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str webhook_id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(WebhookDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'webhook_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_webhook" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'webhook_id' is set + if self.api_client.client_side_validation and ('webhook_id' not in local_var_params or # noqa: E501 + local_var_params['webhook_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `webhook_id` when calling `get_webhook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'webhook_id' in local_var_params: + path_params['webhookId'] = local_var_params['webhook_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/{webhookId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WebhookDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_webhook_result(self, webhook_result_id, **kwargs): # noqa: E501 + """Get a webhook result for a webhook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_webhook_result(webhook_result_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str webhook_result_id: Webhook Result ID (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: WebhookResultDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_webhook_result_with_http_info(webhook_result_id, **kwargs) # noqa: E501 + + def get_webhook_result_with_http_info(self, webhook_result_id, **kwargs): # noqa: E501 + """Get a webhook result for a webhook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_webhook_result_with_http_info(webhook_result_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str webhook_result_id: Webhook Result ID (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(WebhookResultDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'webhook_result_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_webhook_result" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'webhook_result_id' is set + if self.api_client.client_side_validation and ('webhook_result_id' not in local_var_params or # noqa: E501 + local_var_params['webhook_result_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `webhook_result_id` when calling `get_webhook_result`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'webhook_result_id' in local_var_params: + path_params['webhookResultId'] = local_var_params['webhook_result_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/results/{webhookResultId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WebhookResultDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_webhook_results(self, webhook_id, **kwargs): # noqa: E501 + """Get a webhook results for a webhook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_webhook_results(webhook_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str webhook_id: ID of webhook to get results for (required) + :param int page: Optional page index in list pagination + :param int size: Optional page size in list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param bool unseen_only: Filter for unseen exceptions only + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: PageWebhookResult + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_webhook_results_with_http_info(webhook_id, **kwargs) # noqa: E501 + + def get_webhook_results_with_http_info(self, webhook_id, **kwargs): # noqa: E501 + """Get a webhook results for a webhook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_webhook_results_with_http_info(webhook_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str webhook_id: ID of webhook to get results for (required) + :param int page: Optional page index in list pagination + :param int size: Optional page size in list pagination + :param str sort: Optional createdAt sort direction ASC or DESC + :param str search_filter: Optional search filter + :param datetime since: Filter by created at after the given timestamp + :param datetime before: Filter by created at before the given timestamp + :param bool unseen_only: Filter for unseen exceptions only + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(PageWebhookResult, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'webhook_id', + 'page', + 'size', + 'sort', + 'search_filter', + 'since', + 'before', + 'unseen_only' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_webhook_results" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'webhook_id' is set + if self.api_client.client_side_validation and ('webhook_id' not in local_var_params or # noqa: E501 + local_var_params['webhook_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `webhook_id` when calling `get_webhook_results`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'webhook_id' in local_var_params: + path_params['webhookId'] = local_var_params['webhook_id'] # noqa: E501 + + query_params = [] + if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 + query_params.append(('page', local_var_params['page'])) # noqa: E501 + if 'size' in local_var_params and local_var_params['size'] is not None: # noqa: E501 + query_params.append(('size', local_var_params['size'])) # noqa: E501 + if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501 + query_params.append(('sort', local_var_params['sort'])) # noqa: E501 + if 'search_filter' in local_var_params and local_var_params['search_filter'] is not None: # noqa: E501 + query_params.append(('searchFilter', local_var_params['search_filter'])) # noqa: E501 + if 'since' in local_var_params and local_var_params['since'] is not None: # noqa: E501 + query_params.append(('since', local_var_params['since'])) # noqa: E501 + if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501 + query_params.append(('before', local_var_params['before'])) # noqa: E501 + if 'unseen_only' in local_var_params and local_var_params['unseen_only'] is not None: # noqa: E501 + query_params.append(('unseenOnly', local_var_params['unseen_only'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/{webhookId}/results', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PageWebhookResult', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_webhook_results_unseen_error_count(self, **kwargs): # noqa: E501 + """Get count of unseen webhook results with error status # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_webhook_results_unseen_error_count(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: UnseenErrorCountDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_webhook_results_unseen_error_count_with_http_info(**kwargs) # noqa: E501 + + def get_webhook_results_unseen_error_count_with_http_info(self, **kwargs): # noqa: E501 + """Get count of unseen webhook results with error status # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_webhook_results_unseen_error_count_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(UnseenErrorCountDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_webhook_results_unseen_error_count" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/results/unseen-count', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='UnseenErrorCountDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_webhooks(self, inbox_id, **kwargs): # noqa: E501 + """Get all webhooks for an Inbox # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_webhooks(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: list[WebhookDto] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.get_webhooks_with_http_info(inbox_id, **kwargs) # noqa: E501 + + def get_webhooks_with_http_info(self, inbox_id, **kwargs): # noqa: E501 + """Get all webhooks for an Inbox # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_webhooks_with_http_info(inbox_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str inbox_id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(list[WebhookDto], status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'inbox_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method get_webhooks" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'inbox_id' is set + if self.api_client.client_side_validation and ('inbox_id' not in local_var_params or # noqa: E501 + local_var_params['inbox_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `inbox_id` when calling `get_webhooks`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'inbox_id' in local_var_params: + path_params['inboxId'] = local_var_params['inbox_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/inboxes/{inboxId}/webhooks', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[WebhookDto]', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def redrive_webhook_result(self, webhook_result_id, **kwargs): # noqa: E501 + """Get a webhook result and try to resend the original webhook payload # noqa: E501 + + Allows you to resend a webhook payload that was already sent. Webhooks that fail are retried automatically for 24 hours and then put in a dead letter queue. You can retry results manually using this method. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.redrive_webhook_result(webhook_result_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str webhook_result_id: Webhook Result ID (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: WebhookRedriveResult + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.redrive_webhook_result_with_http_info(webhook_result_id, **kwargs) # noqa: E501 + + def redrive_webhook_result_with_http_info(self, webhook_result_id, **kwargs): # noqa: E501 + """Get a webhook result and try to resend the original webhook payload # noqa: E501 + + Allows you to resend a webhook payload that was already sent. Webhooks that fail are retried automatically for 24 hours and then put in a dead letter queue. You can retry results manually using this method. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.redrive_webhook_result_with_http_info(webhook_result_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str webhook_result_id: Webhook Result ID (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(WebhookRedriveResult, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'webhook_result_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method redrive_webhook_result" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'webhook_result_id' is set + if self.api_client.client_side_validation and ('webhook_result_id' not in local_var_params or # noqa: E501 + local_var_params['webhook_result_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `webhook_result_id` when calling `redrive_webhook_result`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'webhook_result_id' in local_var_params: + path_params['webhookResultId'] = local_var_params['webhook_result_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/results/{webhookResultId}/redrive', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WebhookRedriveResult', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def send_test_data(self, webhook_id, **kwargs): # noqa: E501 + """Send webhook test data # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.send_test_data(webhook_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str webhook_id: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: WebhookTestResult + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.send_test_data_with_http_info(webhook_id, **kwargs) # noqa: E501 + + def send_test_data_with_http_info(self, webhook_id, **kwargs): # noqa: E501 + """Send webhook test data # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.send_test_data_with_http_info(webhook_id, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str webhook_id: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(WebhookTestResult, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'webhook_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method send_test_data" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'webhook_id' is set + if self.api_client.client_side_validation and ('webhook_id' not in local_var_params or # noqa: E501 + local_var_params['webhook_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `webhook_id` when calling `send_test_data`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'webhook_id' in local_var_params: + path_params['webhookId'] = local_var_params['webhook_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/{webhookId}/test', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WebhookTestResult', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def update_webhook_headers(self, webhook_id, webhook_headers, **kwargs): # noqa: E501 + """Update a webhook request headers # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_webhook_headers(webhook_id, webhook_headers, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str webhook_id: (required) + :param WebhookHeaders webhook_headers: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: WebhookDto + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.update_webhook_headers_with_http_info(webhook_id, webhook_headers, **kwargs) # noqa: E501 + + def update_webhook_headers_with_http_info(self, webhook_id, webhook_headers, **kwargs): # noqa: E501 + """Update a webhook request headers # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.update_webhook_headers_with_http_info(webhook_id, webhook_headers, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param str webhook_id: (required) + :param WebhookHeaders webhook_headers: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(WebhookDto, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'webhook_id', + 'webhook_headers' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method update_webhook_headers" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'webhook_id' is set + if self.api_client.client_side_validation and ('webhook_id' not in local_var_params or # noqa: E501 + local_var_params['webhook_id'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `webhook_id` when calling `update_webhook_headers`") # noqa: E501 + # verify the required parameter 'webhook_headers' is set + if self.api_client.client_side_validation and ('webhook_headers' not in local_var_params or # noqa: E501 + local_var_params['webhook_headers'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `webhook_headers` when calling `update_webhook_headers`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'webhook_id' in local_var_params: + path_params['webhookId'] = local_var_params['webhook_id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'webhook_headers' in local_var_params: + body_params = local_var_params['webhook_headers'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/{webhookId}/headers', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WebhookDto', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) + + def verify_webhook_signature(self, verify_webhook_signature_options, **kwargs): # noqa: E501 + """Verify a webhook payload signature # noqa: E501 + + Verify a webhook payload using the messageId and signature. This allows you to be sure that MailSlurp sent the payload and not another server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.verify_webhook_signature(verify_webhook_signature_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param VerifyWebhookSignatureOptions verify_webhook_signature_options: (required) + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: VerifyWebhookSignatureResults + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + return self.verify_webhook_signature_with_http_info(verify_webhook_signature_options, **kwargs) # noqa: E501 + + def verify_webhook_signature_with_http_info(self, verify_webhook_signature_options, **kwargs): # noqa: E501 + """Verify a webhook payload signature # noqa: E501 + + Verify a webhook payload using the messageId and signature. This allows you to be sure that MailSlurp sent the payload and not another server. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.verify_webhook_signature_with_http_info(verify_webhook_signature_options, async_req=True) + >>> result = thread.get() + + :param async_req bool: execute request asynchronously + :param VerifyWebhookSignatureOptions verify_webhook_signature_options: (required) + :param _return_http_data_only: response data without head status code + and headers + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: tuple(VerifyWebhookSignatureResults, status_code(int), headers(HTTPHeaderDict)) + If the method is called asynchronously, + returns the request thread. + """ + + local_var_params = locals() + + all_params = [ + 'verify_webhook_signature_options' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) + + for key, val in six.iteritems(local_var_params['kwargs']): + if key not in all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method verify_webhook_signature" % key + ) + local_var_params[key] = val + del local_var_params['kwargs'] + # verify the required parameter 'verify_webhook_signature_options' is set + if self.api_client.client_side_validation and ('verify_webhook_signature_options' not in local_var_params or # noqa: E501 + local_var_params['verify_webhook_signature_options'] is None): # noqa: E501 + raise ApiValueError("Missing the required parameter `verify_webhook_signature_options` when calling `verify_webhook_signature`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'verify_webhook_signature_options' in local_var_params: + body_params = local_var_params['verify_webhook_signature_options'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['*/*']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['API_KEY'] # noqa: E501 + + return self.api_client.call_api( + '/webhooks/verify', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='VerifyWebhookSignatureResults', # noqa: E501 + auth_settings=auth_settings, + async_req=local_var_params.get('async_req'), + _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=local_var_params.get('_preload_content', True), + _request_timeout=local_var_params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/mailslurp_client/api_client.py b/mailslurp_client/api_client.py new file mode 100644 index 00000000..f48e29f0 --- /dev/null +++ b/mailslurp_client/api_client.py @@ -0,0 +1,667 @@ +# coding: utf-8 +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + +from __future__ import absolute_import + +import atexit +import datetime +from dateutil.parser import parse +import json +import mimetypes +from multiprocessing.pool import ThreadPool +import os +import re +import tempfile + +# python 2 and python 3 compatibility library +import six +from six.moves.urllib.parse import quote + +from mailslurp_client.configuration import Configuration +import mailslurp_client.models +from mailslurp_client import rest +from mailslurp_client.exceptions import ApiValueError, ApiException + + +class ApiClient(object): + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + Do not edit the class manually. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int if six.PY3 else long, # noqa: F821 + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + _pool = None + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None, pool_threads=1): + if configuration is None: + configuration = Configuration.get_default_copy() + self.configuration = configuration + self.pool_threads = pool_threads + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/15.13.26/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: + self._pool.close() + self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) + + @property + def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ + if self._pool is None: + atexit.register(self.close) + self._pool = ThreadPool(self.pool_threads) + return self._pool + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + def __call_api( + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_type=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None, _host=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + query_params = self.parameters_to_tuples(query_params, + collection_formats) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth(header_params, query_params, auth_settings) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + try: + # perform request and return response + response_data = self.request( + method, url, query_params=query_params, headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + except ApiException as e: + e.body = e.body.decode('utf-8') if six.PY3 else e.body + raise e + + content_type = response_data.getheader('content-type') + + self.last_response = response_data + + return_data = response_data + + if not _preload_content: + return return_data + + if six.PY3 and response_type not in ["file", "bytes"]: + match = None + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_data.data = response_data.data.decode(encoding) + + # deserialize response data + if response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return (return_data) + else: + return (return_data, response_data.status, + response_data.getheaders()) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) + for attr, _ in six.iteritems(obj.openapi_types) + if getattr(obj, attr) is not None} + + return {key: self.sanitize_for_serialization(val) + for key, val in six.iteritems(obj_dict)} + + def deserialize(self, response, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('list['): + sub_kls = re.match(r'list\[(.*)\]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('dict('): + sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in six.iteritems(data)} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(mailslurp_client.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datetime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_type=None, auth_settings=None, async_req=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None, _host=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async_req request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response: Response data type. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + if not async_req: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_type, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout, _host) + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_type, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host)) + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.GET(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.HEAD(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.OPTIONS(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + elif method == "POST": + return self.rest_client.POST(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.PUT(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.PATCH(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.DELETE(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ApiValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def files_parameters(self, files=None): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if files: + for k, v in six.iteritems(files): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + accepts = [x.lower() for x in accepts] + + if 'application/json' in accepts: + return 'application/json' + else: + return ', '.join(accepts) + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return 'application/json' + + content_types = [x.lower() for x in content_types] + + if 'application/json' in content_types or '*/*' in content_types: + return 'application/json' + else: + return content_types[0] + + def update_params_for_auth(self, headers, querys, auth_settings): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param querys: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + """ + if not auth_settings: + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + querys.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return six.text_type(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + has_discriminator = False + if (hasattr(klass, 'get_real_child_model') + and klass.discriminator_value_class_map): + has_discriminator = True + + if not klass.openapi_types and has_discriminator is False: + return data + + kwargs = {} + if (data is not None and + klass.openapi_types is not None and + isinstance(data, (list, dict))): + for attr, attr_type in six.iteritems(klass.openapi_types): + if klass.attribute_map[attr] in data: + value = data[klass.attribute_map[attr]] + kwargs[attr] = self.__deserialize(value, attr_type) + + instance = klass(**kwargs) + + if has_discriminator: + klass_name = instance.get_real_child_model(data) + if klass_name: + instance = self.__deserialize(data, klass_name) + return instance diff --git a/mailslurp_client/configuration.py b/mailslurp_client/configuration.py new file mode 100644 index 00000000..702cef89 --- /dev/null +++ b/mailslurp_client/configuration.py @@ -0,0 +1,404 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import copy +import logging +import multiprocessing +import sys +import urllib3 + +import six +from six.moves import http_client as httplib + + +class Configuration(object): + """NOTE: This class is auto generated by OpenAPI Generator + + Ref: https://openapi-generator.tech + Do not edit the class manually. + + :param host: Base url + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer) + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication + :param password: Password for HTTP basic authentication + :param discard_unknown_keys: Boolean value indicating whether to discard + unknown properties. A server may send a response that includes additional + properties that are not known by the client in the following scenarios: + 1. The OpenAPI document is incomplete, i.e. it does not match the server + implementation. + 2. The client was generated using an older version of the OpenAPI document + and the server has been upgraded since then. + If a schema in the OpenAPI document defines the additionalProperties attribute, + then all undeclared properties received by the server are injected into the + additional properties map. In that case, there are undeclared properties, and + nothing to discard. + + :Example: + + API Key Authentication Example. + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + cookieAuth: # name for the security scheme + type: apiKey + in: cookie + name: JSESSIONID # cookie name + + You can programmatically set the cookie: + +conf = mailslurp_client.Configuration( + api_key={'cookieAuth': 'abc123'} + api_key_prefix={'cookieAuth': 'JSESSIONID'} +) + + The following cookie will be added to the HTTP request: + Cookie: JSESSIONID abc123 + """ + + _default = None + + def __init__(self, host="https://python.api.mailslurp.com", + api_key=None, api_key_prefix=None, + username=None, password=None, + discard_unknown_keys=False, + ): + """Constructor + """ + self.host = host + """Default Base url + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.discard_unknown_keys = discard_unknown_keys + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("mailslurp_client") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + self.debug = False + """Debug switch + """ + + self.verify_ssl = True + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = None + """Set this to customize the certificate file to verify the peer. + """ + self.cert_file = None + """client certificate file + """ + self.key_file = None + """client key file + """ + self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ + + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ + + self.proxy = None + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ + self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Disable client side validation + self.client_side_validation = True + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = copy.deepcopy(default) + + @classmethod + def get_default_copy(cls): + """Return new instance of configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration passed by the set_default method. + + :return: The configuration object. + """ + if cls._default is not None: + return copy.deepcopy(cls._default) + return Configuration() + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in six.iteritems(self.logger): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in six.iteritems(self.logger): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in six.iteritems(self.logger): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth = {} + if 'x-api-key' in self.api_key: + auth['API_KEY'] = { + 'type': 'api_key', + 'in': 'header', + 'key': 'x-api-key', + 'value': self.get_api_key_with_prefix('x-api-key') + } + return auth + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 6.5.2\n"\ + "SDK Package Version: 15.13.26".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://python.api.mailslurp.com", + 'description': "MailSlurp API Server", + } + ] + + def get_host_from_settings(self, index, variables=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :return: URL based on host settings + """ + variables = {} if variables is None else variables + servers = self.get_host_settings() + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server['variables'].items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url diff --git a/mailslurp_client/exceptions.py b/mailslurp_client/exceptions.py new file mode 100644 index 00000000..6c97536c --- /dev/null +++ b/mailslurp_client/exceptions.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import six + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, six.integer_types): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/mailslurp_client/models/__init__.py b/mailslurp_client/models/__init__.py new file mode 100644 index 00000000..ec70f8a9 --- /dev/null +++ b/mailslurp_client/models/__init__.py @@ -0,0 +1,205 @@ +# coding: utf-8 + +# flake8: noqa +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +# import models into model package +from mailslurp_client.models.abstract_webhook_payload import AbstractWebhookPayload +from mailslurp_client.models.alias_dto import AliasDto +from mailslurp_client.models.alias_projection import AliasProjection +from mailslurp_client.models.attachment_entity import AttachmentEntity +from mailslurp_client.models.attachment_meta_data import AttachmentMetaData +from mailslurp_client.models.attachment_projection import AttachmentProjection +from mailslurp_client.models.basic_auth_options import BasicAuthOptions +from mailslurp_client.models.bounce_projection import BounceProjection +from mailslurp_client.models.bounce_recipient_projection import BounceRecipientProjection +from mailslurp_client.models.bounced_email_dto import BouncedEmailDto +from mailslurp_client.models.bounced_recipient_dto import BouncedRecipientDto +from mailslurp_client.models.bulk_send_email_options import BulkSendEmailOptions +from mailslurp_client.models.complaint import Complaint +from mailslurp_client.models.condition_option import ConditionOption +from mailslurp_client.models.contact_dto import ContactDto +from mailslurp_client.models.contact_projection import ContactProjection +from mailslurp_client.models.content_match_options import ContentMatchOptions +from mailslurp_client.models.count_dto import CountDto +from mailslurp_client.models.create_alias_options import CreateAliasOptions +from mailslurp_client.models.create_contact_options import CreateContactOptions +from mailslurp_client.models.create_domain_options import CreateDomainOptions +from mailslurp_client.models.create_emergency_address_options import CreateEmergencyAddressOptions +from mailslurp_client.models.create_group_options import CreateGroupOptions +from mailslurp_client.models.create_inbox_dto import CreateInboxDto +from mailslurp_client.models.create_inbox_forwarder_options import CreateInboxForwarderOptions +from mailslurp_client.models.create_inbox_ruleset_options import CreateInboxRulesetOptions +from mailslurp_client.models.create_template_options import CreateTemplateOptions +from mailslurp_client.models.create_tracking_pixel_options import CreateTrackingPixelOptions +from mailslurp_client.models.create_webhook_options import CreateWebhookOptions +from mailslurp_client.models.dns_lookup_options import DNSLookupOptions +from mailslurp_client.models.dns_lookup_result import DNSLookupResult +from mailslurp_client.models.dns_lookup_results import DNSLookupResults +from mailslurp_client.models.delivery_status_dto import DeliveryStatusDto +from mailslurp_client.models.describe_domain_options import DescribeDomainOptions +from mailslurp_client.models.describe_mail_server_domain_result import DescribeMailServerDomainResult +from mailslurp_client.models.domain_dto import DomainDto +from mailslurp_client.models.domain_name_record import DomainNameRecord +from mailslurp_client.models.domain_preview import DomainPreview +from mailslurp_client.models.download_attachment_dto import DownloadAttachmentDto +from mailslurp_client.models.email import Email +from mailslurp_client.models.email_analysis import EmailAnalysis +from mailslurp_client.models.email_content_match_result import EmailContentMatchResult +from mailslurp_client.models.email_html_dto import EmailHtmlDto +from mailslurp_client.models.email_links_result import EmailLinksResult +from mailslurp_client.models.email_preview import EmailPreview +from mailslurp_client.models.email_preview_urls import EmailPreviewUrls +from mailslurp_client.models.email_projection import EmailProjection +from mailslurp_client.models.email_recipients import EmailRecipients +from mailslurp_client.models.email_text_lines_result import EmailTextLinesResult +from mailslurp_client.models.email_validation_request import EmailValidationRequest +from mailslurp_client.models.email_verification_result import EmailVerificationResult +from mailslurp_client.models.emergency_address import EmergencyAddress +from mailslurp_client.models.emergency_address_dto import EmergencyAddressDto +from mailslurp_client.models.empty_response_dto import EmptyResponseDto +from mailslurp_client.models.expiration_defaults import ExpirationDefaults +from mailslurp_client.models.expired_inbox_dto import ExpiredInboxDto +from mailslurp_client.models.expired_inbox_record_projection import ExpiredInboxRecordProjection +from mailslurp_client.models.export_link import ExportLink +from mailslurp_client.models.export_options import ExportOptions +from mailslurp_client.models.filter_bounced_recipients_options import FilterBouncedRecipientsOptions +from mailslurp_client.models.filter_bounced_recipients_result import FilterBouncedRecipientsResult +from mailslurp_client.models.flush_expired_inboxes_result import FlushExpiredInboxesResult +from mailslurp_client.models.forward_email_options import ForwardEmailOptions +from mailslurp_client.models.gravatar_url import GravatarUrl +from mailslurp_client.models.group_contacts_dto import GroupContactsDto +from mailslurp_client.models.group_dto import GroupDto +from mailslurp_client.models.group_projection import GroupProjection +from mailslurp_client.models.html_validation_result import HTMLValidationResult +from mailslurp_client.models.ip_address_result import IPAddressResult +from mailslurp_client.models.imap_flag_operation_options import ImapFlagOperationOptions +from mailslurp_client.models.imap_smtp_access_details import ImapSmtpAccessDetails +from mailslurp_client.models.inbox_by_email_address_result import InboxByEmailAddressResult +from mailslurp_client.models.inbox_by_name_result import InboxByNameResult +from mailslurp_client.models.inbox_dto import InboxDto +from mailslurp_client.models.inbox_exists_dto import InboxExistsDto +from mailslurp_client.models.inbox_forwarder_dto import InboxForwarderDto +from mailslurp_client.models.inbox_forwarder_test_options import InboxForwarderTestOptions +from mailslurp_client.models.inbox_forwarder_test_result import InboxForwarderTestResult +from mailslurp_client.models.inbox_id_item import InboxIdItem +from mailslurp_client.models.inbox_ids_result import InboxIdsResult +from mailslurp_client.models.inbox_preview import InboxPreview +from mailslurp_client.models.inbox_ruleset_dto import InboxRulesetDto +from mailslurp_client.models.inbox_ruleset_test_options import InboxRulesetTestOptions +from mailslurp_client.models.inbox_ruleset_test_result import InboxRulesetTestResult +from mailslurp_client.models.inline_object import InlineObject +from mailslurp_client.models.inline_object1 import InlineObject1 +from mailslurp_client.models.json_schema_dto import JSONSchemaDto +from mailslurp_client.models.match_option import MatchOption +from mailslurp_client.models.match_options import MatchOptions +from mailslurp_client.models.missed_email import MissedEmail +from mailslurp_client.models.missed_email_projection import MissedEmailProjection +from mailslurp_client.models.name_server_record import NameServerRecord +from mailslurp_client.models.organization_inbox_projection import OrganizationInboxProjection +from mailslurp_client.models.page_alias import PageAlias +from mailslurp_client.models.page_attachment_entity import PageAttachmentEntity +from mailslurp_client.models.page_bounced_email import PageBouncedEmail +from mailslurp_client.models.page_bounced_recipients import PageBouncedRecipients +from mailslurp_client.models.page_complaint import PageComplaint +from mailslurp_client.models.page_contact_projection import PageContactProjection +from mailslurp_client.models.page_delivery_status import PageDeliveryStatus +from mailslurp_client.models.page_email_preview import PageEmailPreview +from mailslurp_client.models.page_email_projection import PageEmailProjection +from mailslurp_client.models.page_email_validation_request import PageEmailValidationRequest +from mailslurp_client.models.page_expired_inbox_record_projection import PageExpiredInboxRecordProjection +from mailslurp_client.models.page_group_projection import PageGroupProjection +from mailslurp_client.models.page_inbox_forwarder_dto import PageInboxForwarderDto +from mailslurp_client.models.page_inbox_projection import PageInboxProjection +from mailslurp_client.models.page_inbox_ruleset_dto import PageInboxRulesetDto +from mailslurp_client.models.page_missed_email_projection import PageMissedEmailProjection +from mailslurp_client.models.page_organization_inbox_projection import PageOrganizationInboxProjection +from mailslurp_client.models.page_phone_number_projection import PagePhoneNumberProjection +from mailslurp_client.models.page_sent_email_projection import PageSentEmailProjection +from mailslurp_client.models.page_sent_email_with_queue_projection import PageSentEmailWithQueueProjection +from mailslurp_client.models.page_sms_projection import PageSmsProjection +from mailslurp_client.models.page_template_projection import PageTemplateProjection +from mailslurp_client.models.page_thread_projection import PageThreadProjection +from mailslurp_client.models.page_tracking_pixel_projection import PageTrackingPixelProjection +from mailslurp_client.models.page_unknown_missed_email_projection import PageUnknownMissedEmailProjection +from mailslurp_client.models.page_webhook_projection import PageWebhookProjection +from mailslurp_client.models.page_webhook_result import PageWebhookResult +from mailslurp_client.models.pageable_object import PageableObject +from mailslurp_client.models.phone_number_dto import PhoneNumberDto +from mailslurp_client.models.phone_number_projection import PhoneNumberProjection +from mailslurp_client.models.phone_plan_dto import PhonePlanDto +from mailslurp_client.models.raw_email_json import RawEmailJson +from mailslurp_client.models.recipient import Recipient +from mailslurp_client.models.reply_to_alias_email_options import ReplyToAliasEmailOptions +from mailslurp_client.models.reply_to_email_options import ReplyToEmailOptions +from mailslurp_client.models.send_email_options import SendEmailOptions +from mailslurp_client.models.send_smtp_envelope_options import SendSMTPEnvelopeOptions +from mailslurp_client.models.send_with_queue_result import SendWithQueueResult +from mailslurp_client.models.sender import Sender +from mailslurp_client.models.sent_email_dto import SentEmailDto +from mailslurp_client.models.sent_email_projection import SentEmailProjection +from mailslurp_client.models.set_inbox_favourited_options import SetInboxFavouritedOptions +from mailslurp_client.models.simple_send_email_options import SimpleSendEmailOptions +from mailslurp_client.models.sms_dto import SmsDto +from mailslurp_client.models.sms_match_option import SmsMatchOption +from mailslurp_client.models.sms_preview import SmsPreview +from mailslurp_client.models.sms_projection import SmsProjection +from mailslurp_client.models.sort import Sort +from mailslurp_client.models.template_dto import TemplateDto +from mailslurp_client.models.template_preview import TemplatePreview +from mailslurp_client.models.template_projection import TemplateProjection +from mailslurp_client.models.template_variable import TemplateVariable +from mailslurp_client.models.test_new_inbox_forwarder_options import TestNewInboxForwarderOptions +from mailslurp_client.models.test_new_inbox_ruleset_options import TestNewInboxRulesetOptions +from mailslurp_client.models.test_phone_number_options import TestPhoneNumberOptions +from mailslurp_client.models.thread_projection import ThreadProjection +from mailslurp_client.models.tracking_pixel_dto import TrackingPixelDto +from mailslurp_client.models.tracking_pixel_projection import TrackingPixelProjection +from mailslurp_client.models.unknown_missed_email_projection import UnknownMissedEmailProjection +from mailslurp_client.models.unread_count import UnreadCount +from mailslurp_client.models.unseen_error_count_dto import UnseenErrorCountDto +from mailslurp_client.models.update_alias_options import UpdateAliasOptions +from mailslurp_client.models.update_domain_options import UpdateDomainOptions +from mailslurp_client.models.update_group_contacts import UpdateGroupContacts +from mailslurp_client.models.update_inbox_options import UpdateInboxOptions +from mailslurp_client.models.upload_attachment_options import UploadAttachmentOptions +from mailslurp_client.models.user_info_dto import UserInfoDto +from mailslurp_client.models.validate_email_address_list_options import ValidateEmailAddressListOptions +from mailslurp_client.models.validate_email_address_list_result import ValidateEmailAddressListResult +from mailslurp_client.models.validation_dto import ValidationDto +from mailslurp_client.models.validation_message import ValidationMessage +from mailslurp_client.models.verify_email_address_options import VerifyEmailAddressOptions +from mailslurp_client.models.verify_webhook_signature_options import VerifyWebhookSignatureOptions +from mailslurp_client.models.verify_webhook_signature_results import VerifyWebhookSignatureResults +from mailslurp_client.models.wait_for_conditions import WaitForConditions +from mailslurp_client.models.wait_for_single_sms_options import WaitForSingleSmsOptions +from mailslurp_client.models.wait_for_sms_conditions import WaitForSmsConditions +from mailslurp_client.models.webhook_bounce_payload import WebhookBouncePayload +from mailslurp_client.models.webhook_bounce_recipient_payload import WebhookBounceRecipientPayload +from mailslurp_client.models.webhook_delivery_status_payload import WebhookDeliveryStatusPayload +from mailslurp_client.models.webhook_dto import WebhookDto +from mailslurp_client.models.webhook_email_opened_payload import WebhookEmailOpenedPayload +from mailslurp_client.models.webhook_email_read_payload import WebhookEmailReadPayload +from mailslurp_client.models.webhook_header_name_value import WebhookHeaderNameValue +from mailslurp_client.models.webhook_headers import WebhookHeaders +from mailslurp_client.models.webhook_new_attachment_payload import WebhookNewAttachmentPayload +from mailslurp_client.models.webhook_new_contact_payload import WebhookNewContactPayload +from mailslurp_client.models.webhook_new_email_payload import WebhookNewEmailPayload +from mailslurp_client.models.webhook_new_sms_payload import WebhookNewSmsPayload +from mailslurp_client.models.webhook_projection import WebhookProjection +from mailslurp_client.models.webhook_redrive_result import WebhookRedriveResult +from mailslurp_client.models.webhook_result_dto import WebhookResultDto +from mailslurp_client.models.webhook_test_request import WebhookTestRequest +from mailslurp_client.models.webhook_test_response import WebhookTestResponse +from mailslurp_client.models.webhook_test_result import WebhookTestResult diff --git a/mailslurp_client/models/abstract_webhook_payload.py b/mailslurp_client/models/abstract_webhook_payload.py new file mode 100644 index 00000000..1d471f77 --- /dev/null +++ b/mailslurp_client/models/abstract_webhook_payload.py @@ -0,0 +1,208 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class AbstractWebhookPayload(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'event_name': 'str', + 'message_id': 'str', + 'webhook_id': 'str', + 'webhook_name': 'str' + } + + attribute_map = { + 'event_name': 'eventName', + 'message_id': 'messageId', + 'webhook_id': 'webhookId', + 'webhook_name': 'webhookName' + } + + def __init__(self, event_name=None, message_id=None, webhook_id=None, webhook_name=None, local_vars_configuration=None): # noqa: E501 + """AbstractWebhookPayload - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._event_name = None + self._message_id = None + self._webhook_id = None + self._webhook_name = None + self.discriminator = None + + self.event_name = event_name + self.message_id = message_id + self.webhook_id = webhook_id + if webhook_name is not None: + self.webhook_name = webhook_name + + @property + def event_name(self): + """Gets the event_name of this AbstractWebhookPayload. # noqa: E501 + + + :return: The event_name of this AbstractWebhookPayload. # noqa: E501 + :rtype: str + """ + return self._event_name + + @event_name.setter + def event_name(self, event_name): + """Sets the event_name of this AbstractWebhookPayload. + + + :param event_name: The event_name of this AbstractWebhookPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and event_name is None: # noqa: E501 + raise ValueError("Invalid value for `event_name`, must not be `None`") # noqa: E501 + allowed_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and event_name not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `event_name` ({0}), must be one of {1}" # noqa: E501 + .format(event_name, allowed_values) + ) + + self._event_name = event_name + + @property + def message_id(self): + """Gets the message_id of this AbstractWebhookPayload. # noqa: E501 + + + :return: The message_id of this AbstractWebhookPayload. # noqa: E501 + :rtype: str + """ + return self._message_id + + @message_id.setter + def message_id(self, message_id): + """Sets the message_id of this AbstractWebhookPayload. + + + :param message_id: The message_id of this AbstractWebhookPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message_id is None: # noqa: E501 + raise ValueError("Invalid value for `message_id`, must not be `None`") # noqa: E501 + + self._message_id = message_id + + @property + def webhook_id(self): + """Gets the webhook_id of this AbstractWebhookPayload. # noqa: E501 + + + :return: The webhook_id of this AbstractWebhookPayload. # noqa: E501 + :rtype: str + """ + return self._webhook_id + + @webhook_id.setter + def webhook_id(self, webhook_id): + """Sets the webhook_id of this AbstractWebhookPayload. + + + :param webhook_id: The webhook_id of this AbstractWebhookPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and webhook_id is None: # noqa: E501 + raise ValueError("Invalid value for `webhook_id`, must not be `None`") # noqa: E501 + + self._webhook_id = webhook_id + + @property + def webhook_name(self): + """Gets the webhook_name of this AbstractWebhookPayload. # noqa: E501 + + + :return: The webhook_name of this AbstractWebhookPayload. # noqa: E501 + :rtype: str + """ + return self._webhook_name + + @webhook_name.setter + def webhook_name(self, webhook_name): + """Sets the webhook_name of this AbstractWebhookPayload. + + + :param webhook_name: The webhook_name of this AbstractWebhookPayload. # noqa: E501 + :type: str + """ + + self._webhook_name = webhook_name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AbstractWebhookPayload): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AbstractWebhookPayload): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/alias_dto.py b/mailslurp_client/models/alias_dto.py new file mode 100644 index 00000000..6b6e159b --- /dev/null +++ b/mailslurp_client/models/alias_dto.py @@ -0,0 +1,370 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class AliasDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'email_address': 'str', + 'masked_email_address': 'str', + 'user_id': 'str', + 'inbox_id': 'str', + 'name': 'str', + 'use_threads': 'bool', + 'is_verified': 'bool', + 'created_at': 'datetime', + 'updated_at': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'email_address': 'emailAddress', + 'masked_email_address': 'maskedEmailAddress', + 'user_id': 'userId', + 'inbox_id': 'inboxId', + 'name': 'name', + 'use_threads': 'useThreads', + 'is_verified': 'isVerified', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt' + } + + def __init__(self, id=None, email_address=None, masked_email_address=None, user_id=None, inbox_id=None, name=None, use_threads=None, is_verified=None, created_at=None, updated_at=None, local_vars_configuration=None): # noqa: E501 + """AliasDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._email_address = None + self._masked_email_address = None + self._user_id = None + self._inbox_id = None + self._name = None + self._use_threads = None + self._is_verified = None + self._created_at = None + self._updated_at = None + self.discriminator = None + + self.id = id + self.email_address = email_address + if masked_email_address is not None: + self.masked_email_address = masked_email_address + self.user_id = user_id + self.inbox_id = inbox_id + if name is not None: + self.name = name + if use_threads is not None: + self.use_threads = use_threads + self.is_verified = is_verified + if created_at is not None: + self.created_at = created_at + if updated_at is not None: + self.updated_at = updated_at + + @property + def id(self): + """Gets the id of this AliasDto. # noqa: E501 + + + :return: The id of this AliasDto. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AliasDto. + + + :param id: The id of this AliasDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def email_address(self): + """Gets the email_address of this AliasDto. # noqa: E501 + + The alias's email address for receiving email # noqa: E501 + + :return: The email_address of this AliasDto. # noqa: E501 + :rtype: str + """ + return self._email_address + + @email_address.setter + def email_address(self, email_address): + """Sets the email_address of this AliasDto. + + The alias's email address for receiving email # noqa: E501 + + :param email_address: The email_address of this AliasDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and email_address is None: # noqa: E501 + raise ValueError("Invalid value for `email_address`, must not be `None`") # noqa: E501 + + self._email_address = email_address + + @property + def masked_email_address(self): + """Gets the masked_email_address of this AliasDto. # noqa: E501 + + The underlying email address that is hidden and will received forwarded email # noqa: E501 + + :return: The masked_email_address of this AliasDto. # noqa: E501 + :rtype: str + """ + return self._masked_email_address + + @masked_email_address.setter + def masked_email_address(self, masked_email_address): + """Sets the masked_email_address of this AliasDto. + + The underlying email address that is hidden and will received forwarded email # noqa: E501 + + :param masked_email_address: The masked_email_address of this AliasDto. # noqa: E501 + :type: str + """ + + self._masked_email_address = masked_email_address + + @property + def user_id(self): + """Gets the user_id of this AliasDto. # noqa: E501 + + + :return: The user_id of this AliasDto. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this AliasDto. + + + :param user_id: The user_id of this AliasDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def inbox_id(self): + """Gets the inbox_id of this AliasDto. # noqa: E501 + + Inbox that is associated with the alias # noqa: E501 + + :return: The inbox_id of this AliasDto. # noqa: E501 + :rtype: str + """ + return self._inbox_id + + @inbox_id.setter + def inbox_id(self, inbox_id): + """Sets the inbox_id of this AliasDto. + + Inbox that is associated with the alias # noqa: E501 + + :param inbox_id: The inbox_id of this AliasDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and inbox_id is None: # noqa: E501 + raise ValueError("Invalid value for `inbox_id`, must not be `None`") # noqa: E501 + + self._inbox_id = inbox_id + + @property + def name(self): + """Gets the name of this AliasDto. # noqa: E501 + + + :return: The name of this AliasDto. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this AliasDto. + + + :param name: The name of this AliasDto. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def use_threads(self): + """Gets the use_threads of this AliasDto. # noqa: E501 + + If alias will generate response threads or not when email are received by it # noqa: E501 + + :return: The use_threads of this AliasDto. # noqa: E501 + :rtype: bool + """ + return self._use_threads + + @use_threads.setter + def use_threads(self, use_threads): + """Sets the use_threads of this AliasDto. + + If alias will generate response threads or not when email are received by it # noqa: E501 + + :param use_threads: The use_threads of this AliasDto. # noqa: E501 + :type: bool + """ + + self._use_threads = use_threads + + @property + def is_verified(self): + """Gets the is_verified of this AliasDto. # noqa: E501 + + Has the alias been verified. You must verify an alias if the masked email address has not yet been verified by your account # noqa: E501 + + :return: The is_verified of this AliasDto. # noqa: E501 + :rtype: bool + """ + return self._is_verified + + @is_verified.setter + def is_verified(self, is_verified): + """Sets the is_verified of this AliasDto. + + Has the alias been verified. You must verify an alias if the masked email address has not yet been verified by your account # noqa: E501 + + :param is_verified: The is_verified of this AliasDto. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and is_verified is None: # noqa: E501 + raise ValueError("Invalid value for `is_verified`, must not be `None`") # noqa: E501 + + self._is_verified = is_verified + + @property + def created_at(self): + """Gets the created_at of this AliasDto. # noqa: E501 + + + :return: The created_at of this AliasDto. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this AliasDto. + + + :param created_at: The created_at of this AliasDto. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def updated_at(self): + """Gets the updated_at of this AliasDto. # noqa: E501 + + + :return: The updated_at of this AliasDto. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this AliasDto. + + + :param updated_at: The updated_at of this AliasDto. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AliasDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AliasDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/alias_projection.py b/mailslurp_client/models/alias_projection.py new file mode 100644 index 00000000..ebaffc62 --- /dev/null +++ b/mailslurp_client/models/alias_projection.py @@ -0,0 +1,309 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class AliasProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'id': 'str', + 'inbox_id': 'str', + 'user_id': 'str', + 'email_address': 'str', + 'created_at': 'datetime', + 'use_threads': 'bool', + 'updated_at': 'datetime' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'inbox_id': 'inboxId', + 'user_id': 'userId', + 'email_address': 'emailAddress', + 'created_at': 'createdAt', + 'use_threads': 'useThreads', + 'updated_at': 'updatedAt' + } + + def __init__(self, name=None, id=None, inbox_id=None, user_id=None, email_address=None, created_at=None, use_threads=None, updated_at=None, local_vars_configuration=None): # noqa: E501 + """AliasProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._id = None + self._inbox_id = None + self._user_id = None + self._email_address = None + self._created_at = None + self._use_threads = None + self._updated_at = None + self.discriminator = None + + if name is not None: + self.name = name + self.id = id + self.inbox_id = inbox_id + self.user_id = user_id + self.email_address = email_address + self.created_at = created_at + if use_threads is not None: + self.use_threads = use_threads + self.updated_at = updated_at + + @property + def name(self): + """Gets the name of this AliasProjection. # noqa: E501 + + + :return: The name of this AliasProjection. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this AliasProjection. + + + :param name: The name of this AliasProjection. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def id(self): + """Gets the id of this AliasProjection. # noqa: E501 + + + :return: The id of this AliasProjection. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AliasProjection. + + + :param id: The id of this AliasProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def inbox_id(self): + """Gets the inbox_id of this AliasProjection. # noqa: E501 + + + :return: The inbox_id of this AliasProjection. # noqa: E501 + :rtype: str + """ + return self._inbox_id + + @inbox_id.setter + def inbox_id(self, inbox_id): + """Sets the inbox_id of this AliasProjection. + + + :param inbox_id: The inbox_id of this AliasProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and inbox_id is None: # noqa: E501 + raise ValueError("Invalid value for `inbox_id`, must not be `None`") # noqa: E501 + + self._inbox_id = inbox_id + + @property + def user_id(self): + """Gets the user_id of this AliasProjection. # noqa: E501 + + + :return: The user_id of this AliasProjection. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this AliasProjection. + + + :param user_id: The user_id of this AliasProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def email_address(self): + """Gets the email_address of this AliasProjection. # noqa: E501 + + + :return: The email_address of this AliasProjection. # noqa: E501 + :rtype: str + """ + return self._email_address + + @email_address.setter + def email_address(self, email_address): + """Sets the email_address of this AliasProjection. + + + :param email_address: The email_address of this AliasProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and email_address is None: # noqa: E501 + raise ValueError("Invalid value for `email_address`, must not be `None`") # noqa: E501 + + self._email_address = email_address + + @property + def created_at(self): + """Gets the created_at of this AliasProjection. # noqa: E501 + + + :return: The created_at of this AliasProjection. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this AliasProjection. + + + :param created_at: The created_at of this AliasProjection. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + @property + def use_threads(self): + """Gets the use_threads of this AliasProjection. # noqa: E501 + + + :return: The use_threads of this AliasProjection. # noqa: E501 + :rtype: bool + """ + return self._use_threads + + @use_threads.setter + def use_threads(self, use_threads): + """Sets the use_threads of this AliasProjection. + + + :param use_threads: The use_threads of this AliasProjection. # noqa: E501 + :type: bool + """ + + self._use_threads = use_threads + + @property + def updated_at(self): + """Gets the updated_at of this AliasProjection. # noqa: E501 + + + :return: The updated_at of this AliasProjection. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this AliasProjection. + + + :param updated_at: The updated_at of this AliasProjection. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and updated_at is None: # noqa: E501 + raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501 + + self._updated_at = updated_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AliasProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AliasProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/attachment_entity.py b/mailslurp_client/models/attachment_entity.py new file mode 100644 index 00000000..65bb7db9 --- /dev/null +++ b/mailslurp_client/models/attachment_entity.py @@ -0,0 +1,333 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class AttachmentEntity(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'attachment_id': 'str', + 'bucket': 'str', + 'user_id': 'str', + 'content_type': 'str', + 'content_length': 'int', + 'name': 'str', + 'created_at': 'datetime', + 'updated_at': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'attachment_id': 'attachmentId', + 'bucket': 'bucket', + 'user_id': 'userId', + 'content_type': 'contentType', + 'content_length': 'contentLength', + 'name': 'name', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt' + } + + def __init__(self, id=None, attachment_id=None, bucket=None, user_id=None, content_type=None, content_length=None, name=None, created_at=None, updated_at=None, local_vars_configuration=None): # noqa: E501 + """AttachmentEntity - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._attachment_id = None + self._bucket = None + self._user_id = None + self._content_type = None + self._content_length = None + self._name = None + self._created_at = None + self._updated_at = None + self.discriminator = None + + if id is not None: + self.id = id + self.attachment_id = attachment_id + if bucket is not None: + self.bucket = bucket + self.user_id = user_id + if content_type is not None: + self.content_type = content_type + if content_length is not None: + self.content_length = content_length + if name is not None: + self.name = name + self.created_at = created_at + self.updated_at = updated_at + + @property + def id(self): + """Gets the id of this AttachmentEntity. # noqa: E501 + + + :return: The id of this AttachmentEntity. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AttachmentEntity. + + + :param id: The id of this AttachmentEntity. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def attachment_id(self): + """Gets the attachment_id of this AttachmentEntity. # noqa: E501 + + + :return: The attachment_id of this AttachmentEntity. # noqa: E501 + :rtype: str + """ + return self._attachment_id + + @attachment_id.setter + def attachment_id(self, attachment_id): + """Sets the attachment_id of this AttachmentEntity. + + + :param attachment_id: The attachment_id of this AttachmentEntity. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and attachment_id is None: # noqa: E501 + raise ValueError("Invalid value for `attachment_id`, must not be `None`") # noqa: E501 + + self._attachment_id = attachment_id + + @property + def bucket(self): + """Gets the bucket of this AttachmentEntity. # noqa: E501 + + + :return: The bucket of this AttachmentEntity. # noqa: E501 + :rtype: str + """ + return self._bucket + + @bucket.setter + def bucket(self, bucket): + """Sets the bucket of this AttachmentEntity. + + + :param bucket: The bucket of this AttachmentEntity. # noqa: E501 + :type: str + """ + + self._bucket = bucket + + @property + def user_id(self): + """Gets the user_id of this AttachmentEntity. # noqa: E501 + + + :return: The user_id of this AttachmentEntity. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this AttachmentEntity. + + + :param user_id: The user_id of this AttachmentEntity. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def content_type(self): + """Gets the content_type of this AttachmentEntity. # noqa: E501 + + + :return: The content_type of this AttachmentEntity. # noqa: E501 + :rtype: str + """ + return self._content_type + + @content_type.setter + def content_type(self, content_type): + """Sets the content_type of this AttachmentEntity. + + + :param content_type: The content_type of this AttachmentEntity. # noqa: E501 + :type: str + """ + + self._content_type = content_type + + @property + def content_length(self): + """Gets the content_length of this AttachmentEntity. # noqa: E501 + + + :return: The content_length of this AttachmentEntity. # noqa: E501 + :rtype: int + """ + return self._content_length + + @content_length.setter + def content_length(self, content_length): + """Sets the content_length of this AttachmentEntity. + + + :param content_length: The content_length of this AttachmentEntity. # noqa: E501 + :type: int + """ + + self._content_length = content_length + + @property + def name(self): + """Gets the name of this AttachmentEntity. # noqa: E501 + + + :return: The name of this AttachmentEntity. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this AttachmentEntity. + + + :param name: The name of this AttachmentEntity. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def created_at(self): + """Gets the created_at of this AttachmentEntity. # noqa: E501 + + + :return: The created_at of this AttachmentEntity. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this AttachmentEntity. + + + :param created_at: The created_at of this AttachmentEntity. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + @property + def updated_at(self): + """Gets the updated_at of this AttachmentEntity. # noqa: E501 + + + :return: The updated_at of this AttachmentEntity. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this AttachmentEntity. + + + :param updated_at: The updated_at of this AttachmentEntity. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and updated_at is None: # noqa: E501 + raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501 + + self._updated_at = updated_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AttachmentEntity): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AttachmentEntity): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/attachment_meta_data.py b/mailslurp_client/models/attachment_meta_data.py new file mode 100644 index 00000000..7b2a1ce9 --- /dev/null +++ b/mailslurp_client/models/attachment_meta_data.py @@ -0,0 +1,211 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class AttachmentMetaData(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'content_type': 'str', + 'content_length': 'int', + 'id': 'str' + } + + attribute_map = { + 'name': 'name', + 'content_type': 'contentType', + 'content_length': 'contentLength', + 'id': 'id' + } + + def __init__(self, name=None, content_type=None, content_length=None, id=None, local_vars_configuration=None): # noqa: E501 + """AttachmentMetaData - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._content_type = None + self._content_length = None + self._id = None + self.discriminator = None + + self.name = name + self.content_type = content_type + self.content_length = content_length + self.id = id + + @property + def name(self): + """Gets the name of this AttachmentMetaData. # noqa: E501 + + Name of attachment if given # noqa: E501 + + :return: The name of this AttachmentMetaData. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this AttachmentMetaData. + + Name of attachment if given # noqa: E501 + + :param name: The name of this AttachmentMetaData. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def content_type(self): + """Gets the content_type of this AttachmentMetaData. # noqa: E501 + + Content type of attachment such as `image/png` # noqa: E501 + + :return: The content_type of this AttachmentMetaData. # noqa: E501 + :rtype: str + """ + return self._content_type + + @content_type.setter + def content_type(self, content_type): + """Sets the content_type of this AttachmentMetaData. + + Content type of attachment such as `image/png` # noqa: E501 + + :param content_type: The content_type of this AttachmentMetaData. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and content_type is None: # noqa: E501 + raise ValueError("Invalid value for `content_type`, must not be `None`") # noqa: E501 + + self._content_type = content_type + + @property + def content_length(self): + """Gets the content_length of this AttachmentMetaData. # noqa: E501 + + Size of attachment in bytes # noqa: E501 + + :return: The content_length of this AttachmentMetaData. # noqa: E501 + :rtype: int + """ + return self._content_length + + @content_length.setter + def content_length(self, content_length): + """Sets the content_length of this AttachmentMetaData. + + Size of attachment in bytes # noqa: E501 + + :param content_length: The content_length of this AttachmentMetaData. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and content_length is None: # noqa: E501 + raise ValueError("Invalid value for `content_length`, must not be `None`") # noqa: E501 + + self._content_length = content_length + + @property + def id(self): + """Gets the id of this AttachmentMetaData. # noqa: E501 + + ID of attachment. Can be used to with attachment controller endpoints to download attachment or with sending methods to attach to an email. # noqa: E501 + + :return: The id of this AttachmentMetaData. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this AttachmentMetaData. + + ID of attachment. Can be used to with attachment controller endpoints to download attachment or with sending methods to attach to an email. # noqa: E501 + + :param id: The id of this AttachmentMetaData. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AttachmentMetaData): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AttachmentMetaData): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/attachment_projection.py b/mailslurp_client/models/attachment_projection.py new file mode 100644 index 00000000..ee767f3e --- /dev/null +++ b/mailslurp_client/models/attachment_projection.py @@ -0,0 +1,287 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class AttachmentProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'content_length': 'int', + 'content_type': 'str', + 'user_id': 'str', + 'attachment_id': 'str', + 'created_at': 'datetime', + 'updated_at': 'datetime' + } + + attribute_map = { + 'name': 'name', + 'content_length': 'contentLength', + 'content_type': 'contentType', + 'user_id': 'userId', + 'attachment_id': 'attachmentId', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt' + } + + def __init__(self, name=None, content_length=None, content_type=None, user_id=None, attachment_id=None, created_at=None, updated_at=None, local_vars_configuration=None): # noqa: E501 + """AttachmentProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._content_length = None + self._content_type = None + self._user_id = None + self._attachment_id = None + self._created_at = None + self._updated_at = None + self.discriminator = None + + if name is not None: + self.name = name + if content_length is not None: + self.content_length = content_length + if content_type is not None: + self.content_type = content_type + self.user_id = user_id + self.attachment_id = attachment_id + self.created_at = created_at + self.updated_at = updated_at + + @property + def name(self): + """Gets the name of this AttachmentProjection. # noqa: E501 + + + :return: The name of this AttachmentProjection. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this AttachmentProjection. + + + :param name: The name of this AttachmentProjection. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def content_length(self): + """Gets the content_length of this AttachmentProjection. # noqa: E501 + + Content length of attachment in bytes # noqa: E501 + + :return: The content_length of this AttachmentProjection. # noqa: E501 + :rtype: int + """ + return self._content_length + + @content_length.setter + def content_length(self, content_length): + """Sets the content_length of this AttachmentProjection. + + Content length of attachment in bytes # noqa: E501 + + :param content_length: The content_length of this AttachmentProjection. # noqa: E501 + :type: int + """ + + self._content_length = content_length + + @property + def content_type(self): + """Gets the content_type of this AttachmentProjection. # noqa: E501 + + Content type of attachment. # noqa: E501 + + :return: The content_type of this AttachmentProjection. # noqa: E501 + :rtype: str + """ + return self._content_type + + @content_type.setter + def content_type(self, content_type): + """Sets the content_type of this AttachmentProjection. + + Content type of attachment. # noqa: E501 + + :param content_type: The content_type of this AttachmentProjection. # noqa: E501 + :type: str + """ + + self._content_type = content_type + + @property + def user_id(self): + """Gets the user_id of this AttachmentProjection. # noqa: E501 + + + :return: The user_id of this AttachmentProjection. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this AttachmentProjection. + + + :param user_id: The user_id of this AttachmentProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def attachment_id(self): + """Gets the attachment_id of this AttachmentProjection. # noqa: E501 + + Attachment ID # noqa: E501 + + :return: The attachment_id of this AttachmentProjection. # noqa: E501 + :rtype: str + """ + return self._attachment_id + + @attachment_id.setter + def attachment_id(self, attachment_id): + """Sets the attachment_id of this AttachmentProjection. + + Attachment ID # noqa: E501 + + :param attachment_id: The attachment_id of this AttachmentProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and attachment_id is None: # noqa: E501 + raise ValueError("Invalid value for `attachment_id`, must not be `None`") # noqa: E501 + + self._attachment_id = attachment_id + + @property + def created_at(self): + """Gets the created_at of this AttachmentProjection. # noqa: E501 + + + :return: The created_at of this AttachmentProjection. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this AttachmentProjection. + + + :param created_at: The created_at of this AttachmentProjection. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + @property + def updated_at(self): + """Gets the updated_at of this AttachmentProjection. # noqa: E501 + + + :return: The updated_at of this AttachmentProjection. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this AttachmentProjection. + + + :param updated_at: The updated_at of this AttachmentProjection. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and updated_at is None: # noqa: E501 + raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501 + + self._updated_at = updated_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AttachmentProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, AttachmentProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/basic_auth_options.py b/mailslurp_client/models/basic_auth_options.py new file mode 100644 index 00000000..f99d8496 --- /dev/null +++ b/mailslurp_client/models/basic_auth_options.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class BasicAuthOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'username': 'str', + 'password': 'str' + } + + attribute_map = { + 'username': 'username', + 'password': 'password' + } + + def __init__(self, username=None, password=None, local_vars_configuration=None): # noqa: E501 + """BasicAuthOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._username = None + self._password = None + self.discriminator = None + + self.username = username + self.password = password + + @property + def username(self): + """Gets the username of this BasicAuthOptions. # noqa: E501 + + + :return: The username of this BasicAuthOptions. # noqa: E501 + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this BasicAuthOptions. + + + :param username: The username of this BasicAuthOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and username is None: # noqa: E501 + raise ValueError("Invalid value for `username`, must not be `None`") # noqa: E501 + + self._username = username + + @property + def password(self): + """Gets the password of this BasicAuthOptions. # noqa: E501 + + + :return: The password of this BasicAuthOptions. # noqa: E501 + :rtype: str + """ + return self._password + + @password.setter + def password(self, password): + """Sets the password of this BasicAuthOptions. + + + :param password: The password of this BasicAuthOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and password is None: # noqa: E501 + raise ValueError("Invalid value for `password`, must not be `None`") # noqa: E501 + + self._password = password + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BasicAuthOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BasicAuthOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/bounce_projection.py b/mailslurp_client/models/bounce_projection.py new file mode 100644 index 00000000..22796eec --- /dev/null +++ b/mailslurp_client/models/bounce_projection.py @@ -0,0 +1,253 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class BounceProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'sender': 'str', + 'subject': 'str', + 'created_at': 'datetime', + 'bounce_mta': 'str', + 'bounce_type': 'str' + } + + attribute_map = { + 'id': 'id', + 'sender': 'sender', + 'subject': 'subject', + 'created_at': 'createdAt', + 'bounce_mta': 'bounceMta', + 'bounce_type': 'bounceType' + } + + def __init__(self, id=None, sender=None, subject=None, created_at=None, bounce_mta=None, bounce_type=None, local_vars_configuration=None): # noqa: E501 + """BounceProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._sender = None + self._subject = None + self._created_at = None + self._bounce_mta = None + self._bounce_type = None + self.discriminator = None + + if id is not None: + self.id = id + self.sender = sender + if subject is not None: + self.subject = subject + self.created_at = created_at + if bounce_mta is not None: + self.bounce_mta = bounce_mta + if bounce_type is not None: + self.bounce_type = bounce_type + + @property + def id(self): + """Gets the id of this BounceProjection. # noqa: E501 + + + :return: The id of this BounceProjection. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this BounceProjection. + + + :param id: The id of this BounceProjection. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def sender(self): + """Gets the sender of this BounceProjection. # noqa: E501 + + + :return: The sender of this BounceProjection. # noqa: E501 + :rtype: str + """ + return self._sender + + @sender.setter + def sender(self, sender): + """Sets the sender of this BounceProjection. + + + :param sender: The sender of this BounceProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and sender is None: # noqa: E501 + raise ValueError("Invalid value for `sender`, must not be `None`") # noqa: E501 + + self._sender = sender + + @property + def subject(self): + """Gets the subject of this BounceProjection. # noqa: E501 + + + :return: The subject of this BounceProjection. # noqa: E501 + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this BounceProjection. + + + :param subject: The subject of this BounceProjection. # noqa: E501 + :type: str + """ + + self._subject = subject + + @property + def created_at(self): + """Gets the created_at of this BounceProjection. # noqa: E501 + + + :return: The created_at of this BounceProjection. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this BounceProjection. + + + :param created_at: The created_at of this BounceProjection. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + @property + def bounce_mta(self): + """Gets the bounce_mta of this BounceProjection. # noqa: E501 + + + :return: The bounce_mta of this BounceProjection. # noqa: E501 + :rtype: str + """ + return self._bounce_mta + + @bounce_mta.setter + def bounce_mta(self, bounce_mta): + """Sets the bounce_mta of this BounceProjection. + + + :param bounce_mta: The bounce_mta of this BounceProjection. # noqa: E501 + :type: str + """ + + self._bounce_mta = bounce_mta + + @property + def bounce_type(self): + """Gets the bounce_type of this BounceProjection. # noqa: E501 + + + :return: The bounce_type of this BounceProjection. # noqa: E501 + :rtype: str + """ + return self._bounce_type + + @bounce_type.setter + def bounce_type(self, bounce_type): + """Sets the bounce_type of this BounceProjection. + + + :param bounce_type: The bounce_type of this BounceProjection. # noqa: E501 + :type: str + """ + + self._bounce_type = bounce_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BounceProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BounceProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/bounce_recipient_projection.py b/mailslurp_client/models/bounce_recipient_projection.py new file mode 100644 index 00000000..23758aa1 --- /dev/null +++ b/mailslurp_client/models/bounce_recipient_projection.py @@ -0,0 +1,253 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class BounceRecipientProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'action': 'str', + 'status': 'str', + 'sent_email_id': 'str', + 'created_at': 'datetime', + 'recipient': 'str' + } + + attribute_map = { + 'id': 'id', + 'action': 'action', + 'status': 'status', + 'sent_email_id': 'sentEmailId', + 'created_at': 'createdAt', + 'recipient': 'recipient' + } + + def __init__(self, id=None, action=None, status=None, sent_email_id=None, created_at=None, recipient=None, local_vars_configuration=None): # noqa: E501 + """BounceRecipientProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._action = None + self._status = None + self._sent_email_id = None + self._created_at = None + self._recipient = None + self.discriminator = None + + if id is not None: + self.id = id + if action is not None: + self.action = action + if status is not None: + self.status = status + if sent_email_id is not None: + self.sent_email_id = sent_email_id + self.created_at = created_at + self.recipient = recipient + + @property + def id(self): + """Gets the id of this BounceRecipientProjection. # noqa: E501 + + + :return: The id of this BounceRecipientProjection. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this BounceRecipientProjection. + + + :param id: The id of this BounceRecipientProjection. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def action(self): + """Gets the action of this BounceRecipientProjection. # noqa: E501 + + + :return: The action of this BounceRecipientProjection. # noqa: E501 + :rtype: str + """ + return self._action + + @action.setter + def action(self, action): + """Sets the action of this BounceRecipientProjection. + + + :param action: The action of this BounceRecipientProjection. # noqa: E501 + :type: str + """ + + self._action = action + + @property + def status(self): + """Gets the status of this BounceRecipientProjection. # noqa: E501 + + + :return: The status of this BounceRecipientProjection. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this BounceRecipientProjection. + + + :param status: The status of this BounceRecipientProjection. # noqa: E501 + :type: str + """ + + self._status = status + + @property + def sent_email_id(self): + """Gets the sent_email_id of this BounceRecipientProjection. # noqa: E501 + + + :return: The sent_email_id of this BounceRecipientProjection. # noqa: E501 + :rtype: str + """ + return self._sent_email_id + + @sent_email_id.setter + def sent_email_id(self, sent_email_id): + """Sets the sent_email_id of this BounceRecipientProjection. + + + :param sent_email_id: The sent_email_id of this BounceRecipientProjection. # noqa: E501 + :type: str + """ + + self._sent_email_id = sent_email_id + + @property + def created_at(self): + """Gets the created_at of this BounceRecipientProjection. # noqa: E501 + + + :return: The created_at of this BounceRecipientProjection. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this BounceRecipientProjection. + + + :param created_at: The created_at of this BounceRecipientProjection. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + @property + def recipient(self): + """Gets the recipient of this BounceRecipientProjection. # noqa: E501 + + + :return: The recipient of this BounceRecipientProjection. # noqa: E501 + :rtype: str + """ + return self._recipient + + @recipient.setter + def recipient(self, recipient): + """Sets the recipient of this BounceRecipientProjection. + + + :param recipient: The recipient of this BounceRecipientProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and recipient is None: # noqa: E501 + raise ValueError("Invalid value for `recipient`, must not be `None`") # noqa: E501 + + self._recipient = recipient + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BounceRecipientProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BounceRecipientProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/bounced_email_dto.py b/mailslurp_client/models/bounced_email_dto.py new file mode 100644 index 00000000..63985679 --- /dev/null +++ b/mailslurp_client/models/bounced_email_dto.py @@ -0,0 +1,411 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class BouncedEmailDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'user_id': 'str', + 'notification_type': 'str', + 'sent_to_recipients': 'list[str]', + 'sender': 'str', + 'bounce_mta': 'str', + 'bounce_type': 'str', + 'bounce_recipients': 'list[str]', + 'bounce_sub_type': 'str', + 'sent_email_id': 'str', + 'subject': 'str', + 'created_at': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'user_id': 'userId', + 'notification_type': 'notificationType', + 'sent_to_recipients': 'sentToRecipients', + 'sender': 'sender', + 'bounce_mta': 'bounceMta', + 'bounce_type': 'bounceType', + 'bounce_recipients': 'bounceRecipients', + 'bounce_sub_type': 'bounceSubType', + 'sent_email_id': 'sentEmailId', + 'subject': 'subject', + 'created_at': 'createdAt' + } + + def __init__(self, id=None, user_id=None, notification_type=None, sent_to_recipients=None, sender=None, bounce_mta=None, bounce_type=None, bounce_recipients=None, bounce_sub_type=None, sent_email_id=None, subject=None, created_at=None, local_vars_configuration=None): # noqa: E501 + """BouncedEmailDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._user_id = None + self._notification_type = None + self._sent_to_recipients = None + self._sender = None + self._bounce_mta = None + self._bounce_type = None + self._bounce_recipients = None + self._bounce_sub_type = None + self._sent_email_id = None + self._subject = None + self._created_at = None + self.discriminator = None + + if id is not None: + self.id = id + self.user_id = user_id + self.notification_type = notification_type + if sent_to_recipients is not None: + self.sent_to_recipients = sent_to_recipients + self.sender = sender + if bounce_mta is not None: + self.bounce_mta = bounce_mta + if bounce_type is not None: + self.bounce_type = bounce_type + if bounce_recipients is not None: + self.bounce_recipients = bounce_recipients + if bounce_sub_type is not None: + self.bounce_sub_type = bounce_sub_type + if sent_email_id is not None: + self.sent_email_id = sent_email_id + if subject is not None: + self.subject = subject + self.created_at = created_at + + @property + def id(self): + """Gets the id of this BouncedEmailDto. # noqa: E501 + + + :return: The id of this BouncedEmailDto. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this BouncedEmailDto. + + + :param id: The id of this BouncedEmailDto. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def user_id(self): + """Gets the user_id of this BouncedEmailDto. # noqa: E501 + + + :return: The user_id of this BouncedEmailDto. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this BouncedEmailDto. + + + :param user_id: The user_id of this BouncedEmailDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def notification_type(self): + """Gets the notification_type of this BouncedEmailDto. # noqa: E501 + + + :return: The notification_type of this BouncedEmailDto. # noqa: E501 + :rtype: str + """ + return self._notification_type + + @notification_type.setter + def notification_type(self, notification_type): + """Sets the notification_type of this BouncedEmailDto. + + + :param notification_type: The notification_type of this BouncedEmailDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and notification_type is None: # noqa: E501 + raise ValueError("Invalid value for `notification_type`, must not be `None`") # noqa: E501 + + self._notification_type = notification_type + + @property + def sent_to_recipients(self): + """Gets the sent_to_recipients of this BouncedEmailDto. # noqa: E501 + + + :return: The sent_to_recipients of this BouncedEmailDto. # noqa: E501 + :rtype: list[str] + """ + return self._sent_to_recipients + + @sent_to_recipients.setter + def sent_to_recipients(self, sent_to_recipients): + """Sets the sent_to_recipients of this BouncedEmailDto. + + + :param sent_to_recipients: The sent_to_recipients of this BouncedEmailDto. # noqa: E501 + :type: list[str] + """ + + self._sent_to_recipients = sent_to_recipients + + @property + def sender(self): + """Gets the sender of this BouncedEmailDto. # noqa: E501 + + + :return: The sender of this BouncedEmailDto. # noqa: E501 + :rtype: str + """ + return self._sender + + @sender.setter + def sender(self, sender): + """Sets the sender of this BouncedEmailDto. + + + :param sender: The sender of this BouncedEmailDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and sender is None: # noqa: E501 + raise ValueError("Invalid value for `sender`, must not be `None`") # noqa: E501 + + self._sender = sender + + @property + def bounce_mta(self): + """Gets the bounce_mta of this BouncedEmailDto. # noqa: E501 + + + :return: The bounce_mta of this BouncedEmailDto. # noqa: E501 + :rtype: str + """ + return self._bounce_mta + + @bounce_mta.setter + def bounce_mta(self, bounce_mta): + """Sets the bounce_mta of this BouncedEmailDto. + + + :param bounce_mta: The bounce_mta of this BouncedEmailDto. # noqa: E501 + :type: str + """ + + self._bounce_mta = bounce_mta + + @property + def bounce_type(self): + """Gets the bounce_type of this BouncedEmailDto. # noqa: E501 + + + :return: The bounce_type of this BouncedEmailDto. # noqa: E501 + :rtype: str + """ + return self._bounce_type + + @bounce_type.setter + def bounce_type(self, bounce_type): + """Sets the bounce_type of this BouncedEmailDto. + + + :param bounce_type: The bounce_type of this BouncedEmailDto. # noqa: E501 + :type: str + """ + + self._bounce_type = bounce_type + + @property + def bounce_recipients(self): + """Gets the bounce_recipients of this BouncedEmailDto. # noqa: E501 + + + :return: The bounce_recipients of this BouncedEmailDto. # noqa: E501 + :rtype: list[str] + """ + return self._bounce_recipients + + @bounce_recipients.setter + def bounce_recipients(self, bounce_recipients): + """Sets the bounce_recipients of this BouncedEmailDto. + + + :param bounce_recipients: The bounce_recipients of this BouncedEmailDto. # noqa: E501 + :type: list[str] + """ + + self._bounce_recipients = bounce_recipients + + @property + def bounce_sub_type(self): + """Gets the bounce_sub_type of this BouncedEmailDto. # noqa: E501 + + + :return: The bounce_sub_type of this BouncedEmailDto. # noqa: E501 + :rtype: str + """ + return self._bounce_sub_type + + @bounce_sub_type.setter + def bounce_sub_type(self, bounce_sub_type): + """Sets the bounce_sub_type of this BouncedEmailDto. + + + :param bounce_sub_type: The bounce_sub_type of this BouncedEmailDto. # noqa: E501 + :type: str + """ + + self._bounce_sub_type = bounce_sub_type + + @property + def sent_email_id(self): + """Gets the sent_email_id of this BouncedEmailDto. # noqa: E501 + + + :return: The sent_email_id of this BouncedEmailDto. # noqa: E501 + :rtype: str + """ + return self._sent_email_id + + @sent_email_id.setter + def sent_email_id(self, sent_email_id): + """Sets the sent_email_id of this BouncedEmailDto. + + + :param sent_email_id: The sent_email_id of this BouncedEmailDto. # noqa: E501 + :type: str + """ + + self._sent_email_id = sent_email_id + + @property + def subject(self): + """Gets the subject of this BouncedEmailDto. # noqa: E501 + + + :return: The subject of this BouncedEmailDto. # noqa: E501 + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this BouncedEmailDto. + + + :param subject: The subject of this BouncedEmailDto. # noqa: E501 + :type: str + """ + + self._subject = subject + + @property + def created_at(self): + """Gets the created_at of this BouncedEmailDto. # noqa: E501 + + + :return: The created_at of this BouncedEmailDto. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this BouncedEmailDto. + + + :param created_at: The created_at of this BouncedEmailDto. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BouncedEmailDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BouncedEmailDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/bounced_recipient_dto.py b/mailslurp_client/models/bounced_recipient_dto.py new file mode 100644 index 00000000..274fe9f9 --- /dev/null +++ b/mailslurp_client/models/bounced_recipient_dto.py @@ -0,0 +1,305 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class BouncedRecipientDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'user_id': 'str', + 'sent_email_id': 'str', + 'recipient': 'str', + 'diagnostic_code': 'str', + 'action': 'str', + 'status': 'str', + 'created_at': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'user_id': 'userId', + 'sent_email_id': 'sentEmailId', + 'recipient': 'recipient', + 'diagnostic_code': 'diagnosticCode', + 'action': 'action', + 'status': 'status', + 'created_at': 'createdAt' + } + + def __init__(self, id=None, user_id=None, sent_email_id=None, recipient=None, diagnostic_code=None, action=None, status=None, created_at=None, local_vars_configuration=None): # noqa: E501 + """BouncedRecipientDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._user_id = None + self._sent_email_id = None + self._recipient = None + self._diagnostic_code = None + self._action = None + self._status = None + self._created_at = None + self.discriminator = None + + if id is not None: + self.id = id + if user_id is not None: + self.user_id = user_id + if sent_email_id is not None: + self.sent_email_id = sent_email_id + self.recipient = recipient + if diagnostic_code is not None: + self.diagnostic_code = diagnostic_code + if action is not None: + self.action = action + if status is not None: + self.status = status + self.created_at = created_at + + @property + def id(self): + """Gets the id of this BouncedRecipientDto. # noqa: E501 + + + :return: The id of this BouncedRecipientDto. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this BouncedRecipientDto. + + + :param id: The id of this BouncedRecipientDto. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def user_id(self): + """Gets the user_id of this BouncedRecipientDto. # noqa: E501 + + + :return: The user_id of this BouncedRecipientDto. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this BouncedRecipientDto. + + + :param user_id: The user_id of this BouncedRecipientDto. # noqa: E501 + :type: str + """ + + self._user_id = user_id + + @property + def sent_email_id(self): + """Gets the sent_email_id of this BouncedRecipientDto. # noqa: E501 + + + :return: The sent_email_id of this BouncedRecipientDto. # noqa: E501 + :rtype: str + """ + return self._sent_email_id + + @sent_email_id.setter + def sent_email_id(self, sent_email_id): + """Sets the sent_email_id of this BouncedRecipientDto. + + + :param sent_email_id: The sent_email_id of this BouncedRecipientDto. # noqa: E501 + :type: str + """ + + self._sent_email_id = sent_email_id + + @property + def recipient(self): + """Gets the recipient of this BouncedRecipientDto. # noqa: E501 + + + :return: The recipient of this BouncedRecipientDto. # noqa: E501 + :rtype: str + """ + return self._recipient + + @recipient.setter + def recipient(self, recipient): + """Sets the recipient of this BouncedRecipientDto. + + + :param recipient: The recipient of this BouncedRecipientDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and recipient is None: # noqa: E501 + raise ValueError("Invalid value for `recipient`, must not be `None`") # noqa: E501 + + self._recipient = recipient + + @property + def diagnostic_code(self): + """Gets the diagnostic_code of this BouncedRecipientDto. # noqa: E501 + + + :return: The diagnostic_code of this BouncedRecipientDto. # noqa: E501 + :rtype: str + """ + return self._diagnostic_code + + @diagnostic_code.setter + def diagnostic_code(self, diagnostic_code): + """Sets the diagnostic_code of this BouncedRecipientDto. + + + :param diagnostic_code: The diagnostic_code of this BouncedRecipientDto. # noqa: E501 + :type: str + """ + + self._diagnostic_code = diagnostic_code + + @property + def action(self): + """Gets the action of this BouncedRecipientDto. # noqa: E501 + + + :return: The action of this BouncedRecipientDto. # noqa: E501 + :rtype: str + """ + return self._action + + @action.setter + def action(self, action): + """Sets the action of this BouncedRecipientDto. + + + :param action: The action of this BouncedRecipientDto. # noqa: E501 + :type: str + """ + + self._action = action + + @property + def status(self): + """Gets the status of this BouncedRecipientDto. # noqa: E501 + + + :return: The status of this BouncedRecipientDto. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this BouncedRecipientDto. + + + :param status: The status of this BouncedRecipientDto. # noqa: E501 + :type: str + """ + + self._status = status + + @property + def created_at(self): + """Gets the created_at of this BouncedRecipientDto. # noqa: E501 + + + :return: The created_at of this BouncedRecipientDto. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this BouncedRecipientDto. + + + :param created_at: The created_at of this BouncedRecipientDto. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BouncedRecipientDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BouncedRecipientDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/bulk_send_email_options.py b/mailslurp_client/models/bulk_send_email_options.py new file mode 100644 index 00000000..2da40bc9 --- /dev/null +++ b/mailslurp_client/models/bulk_send_email_options.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class BulkSendEmailOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'inbox_ids': 'list[str]', + 'send_email_options': 'SendEmailOptions' + } + + attribute_map = { + 'inbox_ids': 'inboxIds', + 'send_email_options': 'sendEmailOptions' + } + + def __init__(self, inbox_ids=None, send_email_options=None, local_vars_configuration=None): # noqa: E501 + """BulkSendEmailOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._inbox_ids = None + self._send_email_options = None + self.discriminator = None + + self.inbox_ids = inbox_ids + self.send_email_options = send_email_options + + @property + def inbox_ids(self): + """Gets the inbox_ids of this BulkSendEmailOptions. # noqa: E501 + + Inboxes to send the email from # noqa: E501 + + :return: The inbox_ids of this BulkSendEmailOptions. # noqa: E501 + :rtype: list[str] + """ + return self._inbox_ids + + @inbox_ids.setter + def inbox_ids(self, inbox_ids): + """Sets the inbox_ids of this BulkSendEmailOptions. + + Inboxes to send the email from # noqa: E501 + + :param inbox_ids: The inbox_ids of this BulkSendEmailOptions. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and inbox_ids is None: # noqa: E501 + raise ValueError("Invalid value for `inbox_ids`, must not be `None`") # noqa: E501 + + self._inbox_ids = inbox_ids + + @property + def send_email_options(self): + """Gets the send_email_options of this BulkSendEmailOptions. # noqa: E501 + + + :return: The send_email_options of this BulkSendEmailOptions. # noqa: E501 + :rtype: SendEmailOptions + """ + return self._send_email_options + + @send_email_options.setter + def send_email_options(self, send_email_options): + """Sets the send_email_options of this BulkSendEmailOptions. + + + :param send_email_options: The send_email_options of this BulkSendEmailOptions. # noqa: E501 + :type: SendEmailOptions + """ + if self.local_vars_configuration.client_side_validation and send_email_options is None: # noqa: E501 + raise ValueError("Invalid value for `send_email_options`, must not be `None`") # noqa: E501 + + self._send_email_options = send_email_options + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BulkSendEmailOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, BulkSendEmailOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/complaint.py b/mailslurp_client/models/complaint.py new file mode 100644 index 00000000..f638652d --- /dev/null +++ b/mailslurp_client/models/complaint.py @@ -0,0 +1,307 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class Complaint(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'user_id': 'str', + 'event_type': 'str', + 'mail_source': 'str', + 'mail_message_id': 'str', + 'complaint_recipient': 'str', + 'created_at': 'datetime', + 'updated_at': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'user_id': 'userId', + 'event_type': 'eventType', + 'mail_source': 'mailSource', + 'mail_message_id': 'mailMessageId', + 'complaint_recipient': 'complaintRecipient', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt' + } + + def __init__(self, id=None, user_id=None, event_type=None, mail_source=None, mail_message_id=None, complaint_recipient=None, created_at=None, updated_at=None, local_vars_configuration=None): # noqa: E501 + """Complaint - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._user_id = None + self._event_type = None + self._mail_source = None + self._mail_message_id = None + self._complaint_recipient = None + self._created_at = None + self._updated_at = None + self.discriminator = None + + self.id = id + if user_id is not None: + self.user_id = user_id + if event_type is not None: + self.event_type = event_type + if mail_source is not None: + self.mail_source = mail_source + if mail_message_id is not None: + self.mail_message_id = mail_message_id + self.complaint_recipient = complaint_recipient + self.created_at = created_at + self.updated_at = updated_at + + @property + def id(self): + """Gets the id of this Complaint. # noqa: E501 + + + :return: The id of this Complaint. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Complaint. + + + :param id: The id of this Complaint. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def user_id(self): + """Gets the user_id of this Complaint. # noqa: E501 + + + :return: The user_id of this Complaint. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this Complaint. + + + :param user_id: The user_id of this Complaint. # noqa: E501 + :type: str + """ + + self._user_id = user_id + + @property + def event_type(self): + """Gets the event_type of this Complaint. # noqa: E501 + + + :return: The event_type of this Complaint. # noqa: E501 + :rtype: str + """ + return self._event_type + + @event_type.setter + def event_type(self, event_type): + """Sets the event_type of this Complaint. + + + :param event_type: The event_type of this Complaint. # noqa: E501 + :type: str + """ + + self._event_type = event_type + + @property + def mail_source(self): + """Gets the mail_source of this Complaint. # noqa: E501 + + + :return: The mail_source of this Complaint. # noqa: E501 + :rtype: str + """ + return self._mail_source + + @mail_source.setter + def mail_source(self, mail_source): + """Sets the mail_source of this Complaint. + + + :param mail_source: The mail_source of this Complaint. # noqa: E501 + :type: str + """ + + self._mail_source = mail_source + + @property + def mail_message_id(self): + """Gets the mail_message_id of this Complaint. # noqa: E501 + + + :return: The mail_message_id of this Complaint. # noqa: E501 + :rtype: str + """ + return self._mail_message_id + + @mail_message_id.setter + def mail_message_id(self, mail_message_id): + """Sets the mail_message_id of this Complaint. + + + :param mail_message_id: The mail_message_id of this Complaint. # noqa: E501 + :type: str + """ + + self._mail_message_id = mail_message_id + + @property + def complaint_recipient(self): + """Gets the complaint_recipient of this Complaint. # noqa: E501 + + + :return: The complaint_recipient of this Complaint. # noqa: E501 + :rtype: str + """ + return self._complaint_recipient + + @complaint_recipient.setter + def complaint_recipient(self, complaint_recipient): + """Sets the complaint_recipient of this Complaint. + + + :param complaint_recipient: The complaint_recipient of this Complaint. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and complaint_recipient is None: # noqa: E501 + raise ValueError("Invalid value for `complaint_recipient`, must not be `None`") # noqa: E501 + + self._complaint_recipient = complaint_recipient + + @property + def created_at(self): + """Gets the created_at of this Complaint. # noqa: E501 + + + :return: The created_at of this Complaint. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Complaint. + + + :param created_at: The created_at of this Complaint. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + @property + def updated_at(self): + """Gets the updated_at of this Complaint. # noqa: E501 + + + :return: The updated_at of this Complaint. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this Complaint. + + + :param updated_at: The updated_at of this Complaint. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and updated_at is None: # noqa: E501 + raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501 + + self._updated_at = updated_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Complaint): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Complaint): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/condition_option.py b/mailslurp_client/models/condition_option.py new file mode 100644 index 00000000..d57a3f4e --- /dev/null +++ b/mailslurp_client/models/condition_option.py @@ -0,0 +1,165 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class ConditionOption(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'condition': 'str', + 'value': 'str' + } + + attribute_map = { + 'condition': 'condition', + 'value': 'value' + } + + def __init__(self, condition=None, value=None, local_vars_configuration=None): # noqa: E501 + """ConditionOption - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._condition = None + self._value = None + self.discriminator = None + + self.condition = condition + self.value = value + + @property + def condition(self): + """Gets the condition of this ConditionOption. # noqa: E501 + + Condition of an email object that can be used to filter results # noqa: E501 + + :return: The condition of this ConditionOption. # noqa: E501 + :rtype: str + """ + return self._condition + + @condition.setter + def condition(self, condition): + """Sets the condition of this ConditionOption. + + Condition of an email object that can be used to filter results # noqa: E501 + + :param condition: The condition of this ConditionOption. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and condition is None: # noqa: E501 + raise ValueError("Invalid value for `condition`, must not be `None`") # noqa: E501 + allowed_values = ["HAS_ATTACHMENTS"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and condition not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `condition` ({0}), must be one of {1}" # noqa: E501 + .format(condition, allowed_values) + ) + + self._condition = condition + + @property + def value(self): + """Gets the value of this ConditionOption. # noqa: E501 + + Expected condition value # noqa: E501 + + :return: The value of this ConditionOption. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this ConditionOption. + + Expected condition value # noqa: E501 + + :param value: The value of this ConditionOption. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 + allowed_values = ["TRUE", "FALSE"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and value not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `value` ({0}), must be one of {1}" # noqa: E501 + .format(value, allowed_values) + ) + + self._value = value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConditionOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ConditionOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/contact_dto.py b/mailslurp_client/models/contact_dto.py new file mode 100644 index 00000000..77c475ef --- /dev/null +++ b/mailslurp_client/models/contact_dto.py @@ -0,0 +1,385 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class ContactDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'group_id': 'str', + 'first_name': 'str', + 'last_name': 'str', + 'company': 'str', + 'email_addresses': 'list[str]', + 'primary_email_address': 'str', + 'tags': 'list[str]', + 'meta_data': 'object', + 'opt_out': 'bool', + 'created_at': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'group_id': 'groupId', + 'first_name': 'firstName', + 'last_name': 'lastName', + 'company': 'company', + 'email_addresses': 'emailAddresses', + 'primary_email_address': 'primaryEmailAddress', + 'tags': 'tags', + 'meta_data': 'metaData', + 'opt_out': 'optOut', + 'created_at': 'createdAt' + } + + def __init__(self, id=None, group_id=None, first_name=None, last_name=None, company=None, email_addresses=None, primary_email_address=None, tags=None, meta_data=None, opt_out=None, created_at=None, local_vars_configuration=None): # noqa: E501 + """ContactDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._group_id = None + self._first_name = None + self._last_name = None + self._company = None + self._email_addresses = None + self._primary_email_address = None + self._tags = None + self._meta_data = None + self._opt_out = None + self._created_at = None + self.discriminator = None + + self.id = id + if group_id is not None: + self.group_id = group_id + if first_name is not None: + self.first_name = first_name + if last_name is not None: + self.last_name = last_name + if company is not None: + self.company = company + self.email_addresses = email_addresses + if primary_email_address is not None: + self.primary_email_address = primary_email_address + self.tags = tags + if meta_data is not None: + self.meta_data = meta_data + if opt_out is not None: + self.opt_out = opt_out + self.created_at = created_at + + @property + def id(self): + """Gets the id of this ContactDto. # noqa: E501 + + + :return: The id of this ContactDto. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ContactDto. + + + :param id: The id of this ContactDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def group_id(self): + """Gets the group_id of this ContactDto. # noqa: E501 + + + :return: The group_id of this ContactDto. # noqa: E501 + :rtype: str + """ + return self._group_id + + @group_id.setter + def group_id(self, group_id): + """Sets the group_id of this ContactDto. + + + :param group_id: The group_id of this ContactDto. # noqa: E501 + :type: str + """ + + self._group_id = group_id + + @property + def first_name(self): + """Gets the first_name of this ContactDto. # noqa: E501 + + + :return: The first_name of this ContactDto. # noqa: E501 + :rtype: str + """ + return self._first_name + + @first_name.setter + def first_name(self, first_name): + """Sets the first_name of this ContactDto. + + + :param first_name: The first_name of this ContactDto. # noqa: E501 + :type: str + """ + + self._first_name = first_name + + @property + def last_name(self): + """Gets the last_name of this ContactDto. # noqa: E501 + + + :return: The last_name of this ContactDto. # noqa: E501 + :rtype: str + """ + return self._last_name + + @last_name.setter + def last_name(self, last_name): + """Sets the last_name of this ContactDto. + + + :param last_name: The last_name of this ContactDto. # noqa: E501 + :type: str + """ + + self._last_name = last_name + + @property + def company(self): + """Gets the company of this ContactDto. # noqa: E501 + + + :return: The company of this ContactDto. # noqa: E501 + :rtype: str + """ + return self._company + + @company.setter + def company(self, company): + """Sets the company of this ContactDto. + + + :param company: The company of this ContactDto. # noqa: E501 + :type: str + """ + + self._company = company + + @property + def email_addresses(self): + """Gets the email_addresses of this ContactDto. # noqa: E501 + + + :return: The email_addresses of this ContactDto. # noqa: E501 + :rtype: list[str] + """ + return self._email_addresses + + @email_addresses.setter + def email_addresses(self, email_addresses): + """Sets the email_addresses of this ContactDto. + + + :param email_addresses: The email_addresses of this ContactDto. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and email_addresses is None: # noqa: E501 + raise ValueError("Invalid value for `email_addresses`, must not be `None`") # noqa: E501 + + self._email_addresses = email_addresses + + @property + def primary_email_address(self): + """Gets the primary_email_address of this ContactDto. # noqa: E501 + + + :return: The primary_email_address of this ContactDto. # noqa: E501 + :rtype: str + """ + return self._primary_email_address + + @primary_email_address.setter + def primary_email_address(self, primary_email_address): + """Sets the primary_email_address of this ContactDto. + + + :param primary_email_address: The primary_email_address of this ContactDto. # noqa: E501 + :type: str + """ + + self._primary_email_address = primary_email_address + + @property + def tags(self): + """Gets the tags of this ContactDto. # noqa: E501 + + + :return: The tags of this ContactDto. # noqa: E501 + :rtype: list[str] + """ + return self._tags + + @tags.setter + def tags(self, tags): + """Sets the tags of this ContactDto. + + + :param tags: The tags of this ContactDto. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and tags is None: # noqa: E501 + raise ValueError("Invalid value for `tags`, must not be `None`") # noqa: E501 + + self._tags = tags + + @property + def meta_data(self): + """Gets the meta_data of this ContactDto. # noqa: E501 + + + :return: The meta_data of this ContactDto. # noqa: E501 + :rtype: object + """ + return self._meta_data + + @meta_data.setter + def meta_data(self, meta_data): + """Sets the meta_data of this ContactDto. + + + :param meta_data: The meta_data of this ContactDto. # noqa: E501 + :type: object + """ + + self._meta_data = meta_data + + @property + def opt_out(self): + """Gets the opt_out of this ContactDto. # noqa: E501 + + + :return: The opt_out of this ContactDto. # noqa: E501 + :rtype: bool + """ + return self._opt_out + + @opt_out.setter + def opt_out(self, opt_out): + """Sets the opt_out of this ContactDto. + + + :param opt_out: The opt_out of this ContactDto. # noqa: E501 + :type: bool + """ + + self._opt_out = opt_out + + @property + def created_at(self): + """Gets the created_at of this ContactDto. # noqa: E501 + + + :return: The created_at of this ContactDto. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this ContactDto. + + + :param created_at: The created_at of this ContactDto. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ContactDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ContactDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/contact_projection.py b/mailslurp_client/models/contact_projection.py new file mode 100644 index 00000000..7bfb7679 --- /dev/null +++ b/mailslurp_client/models/contact_projection.py @@ -0,0 +1,306 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class ContactProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'group_id': 'str', + 'created_at': 'datetime', + 'first_name': 'str', + 'last_name': 'str', + 'company': 'str', + 'email_addresses': 'list[str]', + 'opt_out': 'bool' + } + + attribute_map = { + 'id': 'id', + 'group_id': 'groupId', + 'created_at': 'createdAt', + 'first_name': 'firstName', + 'last_name': 'lastName', + 'company': 'company', + 'email_addresses': 'emailAddresses', + 'opt_out': 'optOut' + } + + def __init__(self, id=None, group_id=None, created_at=None, first_name=None, last_name=None, company=None, email_addresses=None, opt_out=None, local_vars_configuration=None): # noqa: E501 + """ContactProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._group_id = None + self._created_at = None + self._first_name = None + self._last_name = None + self._company = None + self._email_addresses = None + self._opt_out = None + self.discriminator = None + + self.id = id + if group_id is not None: + self.group_id = group_id + self.created_at = created_at + if first_name is not None: + self.first_name = first_name + if last_name is not None: + self.last_name = last_name + if company is not None: + self.company = company + if email_addresses is not None: + self.email_addresses = email_addresses + self.opt_out = opt_out + + @property + def id(self): + """Gets the id of this ContactProjection. # noqa: E501 + + + :return: The id of this ContactProjection. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ContactProjection. + + + :param id: The id of this ContactProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def group_id(self): + """Gets the group_id of this ContactProjection. # noqa: E501 + + + :return: The group_id of this ContactProjection. # noqa: E501 + :rtype: str + """ + return self._group_id + + @group_id.setter + def group_id(self, group_id): + """Sets the group_id of this ContactProjection. + + + :param group_id: The group_id of this ContactProjection. # noqa: E501 + :type: str + """ + + self._group_id = group_id + + @property + def created_at(self): + """Gets the created_at of this ContactProjection. # noqa: E501 + + + :return: The created_at of this ContactProjection. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this ContactProjection. + + + :param created_at: The created_at of this ContactProjection. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + @property + def first_name(self): + """Gets the first_name of this ContactProjection. # noqa: E501 + + + :return: The first_name of this ContactProjection. # noqa: E501 + :rtype: str + """ + return self._first_name + + @first_name.setter + def first_name(self, first_name): + """Sets the first_name of this ContactProjection. + + + :param first_name: The first_name of this ContactProjection. # noqa: E501 + :type: str + """ + + self._first_name = first_name + + @property + def last_name(self): + """Gets the last_name of this ContactProjection. # noqa: E501 + + + :return: The last_name of this ContactProjection. # noqa: E501 + :rtype: str + """ + return self._last_name + + @last_name.setter + def last_name(self, last_name): + """Sets the last_name of this ContactProjection. + + + :param last_name: The last_name of this ContactProjection. # noqa: E501 + :type: str + """ + + self._last_name = last_name + + @property + def company(self): + """Gets the company of this ContactProjection. # noqa: E501 + + + :return: The company of this ContactProjection. # noqa: E501 + :rtype: str + """ + return self._company + + @company.setter + def company(self, company): + """Sets the company of this ContactProjection. + + + :param company: The company of this ContactProjection. # noqa: E501 + :type: str + """ + + self._company = company + + @property + def email_addresses(self): + """Gets the email_addresses of this ContactProjection. # noqa: E501 + + + :return: The email_addresses of this ContactProjection. # noqa: E501 + :rtype: list[str] + """ + return self._email_addresses + + @email_addresses.setter + def email_addresses(self, email_addresses): + """Sets the email_addresses of this ContactProjection. + + + :param email_addresses: The email_addresses of this ContactProjection. # noqa: E501 + :type: list[str] + """ + + self._email_addresses = email_addresses + + @property + def opt_out(self): + """Gets the opt_out of this ContactProjection. # noqa: E501 + + + :return: The opt_out of this ContactProjection. # noqa: E501 + :rtype: bool + """ + return self._opt_out + + @opt_out.setter + def opt_out(self, opt_out): + """Sets the opt_out of this ContactProjection. + + + :param opt_out: The opt_out of this ContactProjection. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and opt_out is None: # noqa: E501 + raise ValueError("Invalid value for `opt_out`, must not be `None`") # noqa: E501 + + self._opt_out = opt_out + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ContactProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ContactProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/content_match_options.py b/mailslurp_client/models/content_match_options.py new file mode 100644 index 00000000..94343646 --- /dev/null +++ b/mailslurp_client/models/content_match_options.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class ContentMatchOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'pattern': 'str' + } + + attribute_map = { + 'pattern': 'pattern' + } + + def __init__(self, pattern=None, local_vars_configuration=None): # noqa: E501 + """ContentMatchOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._pattern = None + self.discriminator = None + + self.pattern = pattern + + @property + def pattern(self): + """Gets the pattern of this ContentMatchOptions. # noqa: E501 + + Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns. # noqa: E501 + + :return: The pattern of this ContentMatchOptions. # noqa: E501 + :rtype: str + """ + return self._pattern + + @pattern.setter + def pattern(self, pattern): + """Sets the pattern of this ContentMatchOptions. + + Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns. # noqa: E501 + + :param pattern: The pattern of this ContentMatchOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and pattern is None: # noqa: E501 + raise ValueError("Invalid value for `pattern`, must not be `None`") # noqa: E501 + + self._pattern = pattern + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ContentMatchOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ContentMatchOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/count_dto.py b/mailslurp_client/models/count_dto.py new file mode 100644 index 00000000..0f8c2104 --- /dev/null +++ b/mailslurp_client/models/count_dto.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class CountDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'total_elements': 'int' + } + + attribute_map = { + 'total_elements': 'totalElements' + } + + def __init__(self, total_elements=None, local_vars_configuration=None): # noqa: E501 + """CountDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._total_elements = None + self.discriminator = None + + self.total_elements = total_elements + + @property + def total_elements(self): + """Gets the total_elements of this CountDto. # noqa: E501 + + + :return: The total_elements of this CountDto. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this CountDto. + + + :param total_elements: The total_elements of this CountDto. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and total_elements is None: # noqa: E501 + raise ValueError("Invalid value for `total_elements`, must not be `None`") # noqa: E501 + + self._total_elements = total_elements + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CountDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CountDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/create_alias_options.py b/mailslurp_client/models/create_alias_options.py new file mode 100644 index 00000000..c9f4b5b1 --- /dev/null +++ b/mailslurp_client/models/create_alias_options.py @@ -0,0 +1,209 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class CreateAliasOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'email_address': 'str', + 'inbox_id': 'str', + 'name': 'str', + 'use_threads': 'bool' + } + + attribute_map = { + 'email_address': 'emailAddress', + 'inbox_id': 'inboxId', + 'name': 'name', + 'use_threads': 'useThreads' + } + + def __init__(self, email_address=None, inbox_id=None, name=None, use_threads=None, local_vars_configuration=None): # noqa: E501 + """CreateAliasOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._email_address = None + self._inbox_id = None + self._name = None + self._use_threads = None + self.discriminator = None + + self.email_address = email_address + if inbox_id is not None: + self.inbox_id = inbox_id + if name is not None: + self.name = name + self.use_threads = use_threads + + @property + def email_address(self): + """Gets the email_address of this CreateAliasOptions. # noqa: E501 + + Email address to be hidden behind alias. Emails sent to the alias email address will be forwarded to this address. If you want to enable replies set useThreads true and the reply-to for the email will allow outbound communication via a thread. # noqa: E501 + + :return: The email_address of this CreateAliasOptions. # noqa: E501 + :rtype: str + """ + return self._email_address + + @email_address.setter + def email_address(self, email_address): + """Sets the email_address of this CreateAliasOptions. + + Email address to be hidden behind alias. Emails sent to the alias email address will be forwarded to this address. If you want to enable replies set useThreads true and the reply-to for the email will allow outbound communication via a thread. # noqa: E501 + + :param email_address: The email_address of this CreateAliasOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and email_address is None: # noqa: E501 + raise ValueError("Invalid value for `email_address`, must not be `None`") # noqa: E501 + + self._email_address = email_address + + @property + def inbox_id(self): + """Gets the inbox_id of this CreateAliasOptions. # noqa: E501 + + Optional inbox ID to attach to alias. Null by default means an a new inbox will be created for the alias. Use a custom inbox to control what email address the alias uses. To use custom email addresses create a domain and an inbox, the use the inbox ID with this call. Emails received by this inbox will be forwarded to the alias email address # noqa: E501 + + :return: The inbox_id of this CreateAliasOptions. # noqa: E501 + :rtype: str + """ + return self._inbox_id + + @inbox_id.setter + def inbox_id(self, inbox_id): + """Sets the inbox_id of this CreateAliasOptions. + + Optional inbox ID to attach to alias. Null by default means an a new inbox will be created for the alias. Use a custom inbox to control what email address the alias uses. To use custom email addresses create a domain and an inbox, the use the inbox ID with this call. Emails received by this inbox will be forwarded to the alias email address # noqa: E501 + + :param inbox_id: The inbox_id of this CreateAliasOptions. # noqa: E501 + :type: str + """ + + self._inbox_id = inbox_id + + @property + def name(self): + """Gets the name of this CreateAliasOptions. # noqa: E501 + + Optional name for alias # noqa: E501 + + :return: The name of this CreateAliasOptions. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateAliasOptions. + + Optional name for alias # noqa: E501 + + :param name: The name of this CreateAliasOptions. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def use_threads(self): + """Gets the use_threads of this CreateAliasOptions. # noqa: E501 + + Enable threads options. If true emails will be sent with a unique reply-to thread address. This means you can reply to the forwarded email and it will be sent to the recipients via your alias address. That way a thread conversation is preserved. # noqa: E501 + + :return: The use_threads of this CreateAliasOptions. # noqa: E501 + :rtype: bool + """ + return self._use_threads + + @use_threads.setter + def use_threads(self, use_threads): + """Sets the use_threads of this CreateAliasOptions. + + Enable threads options. If true emails will be sent with a unique reply-to thread address. This means you can reply to the forwarded email and it will be sent to the recipients via your alias address. That way a thread conversation is preserved. # noqa: E501 + + :param use_threads: The use_threads of this CreateAliasOptions. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and use_threads is None: # noqa: E501 + raise ValueError("Invalid value for `use_threads`, must not be `None`") # noqa: E501 + + self._use_threads = use_threads + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateAliasOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateAliasOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/create_contact_options.py b/mailslurp_client/models/create_contact_options.py new file mode 100644 index 00000000..f036695a --- /dev/null +++ b/mailslurp_client/models/create_contact_options.py @@ -0,0 +1,304 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class CreateContactOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'first_name': 'str', + 'last_name': 'str', + 'company': 'str', + 'email_addresses': 'list[str]', + 'tags': 'list[str]', + 'meta_data': 'object', + 'opt_out': 'bool', + 'group_id': 'str' + } + + attribute_map = { + 'first_name': 'firstName', + 'last_name': 'lastName', + 'company': 'company', + 'email_addresses': 'emailAddresses', + 'tags': 'tags', + 'meta_data': 'metaData', + 'opt_out': 'optOut', + 'group_id': 'groupId' + } + + def __init__(self, first_name=None, last_name=None, company=None, email_addresses=None, tags=None, meta_data=None, opt_out=None, group_id=None, local_vars_configuration=None): # noqa: E501 + """CreateContactOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._first_name = None + self._last_name = None + self._company = None + self._email_addresses = None + self._tags = None + self._meta_data = None + self._opt_out = None + self._group_id = None + self.discriminator = None + + self.first_name = first_name + self.last_name = last_name + self.company = company + self.email_addresses = email_addresses + self.tags = tags + if meta_data is not None: + self.meta_data = meta_data + self.opt_out = opt_out + self.group_id = group_id + + @property + def first_name(self): + """Gets the first_name of this CreateContactOptions. # noqa: E501 + + + :return: The first_name of this CreateContactOptions. # noqa: E501 + :rtype: str + """ + return self._first_name + + @first_name.setter + def first_name(self, first_name): + """Sets the first_name of this CreateContactOptions. + + + :param first_name: The first_name of this CreateContactOptions. # noqa: E501 + :type: str + """ + + self._first_name = first_name + + @property + def last_name(self): + """Gets the last_name of this CreateContactOptions. # noqa: E501 + + + :return: The last_name of this CreateContactOptions. # noqa: E501 + :rtype: str + """ + return self._last_name + + @last_name.setter + def last_name(self, last_name): + """Sets the last_name of this CreateContactOptions. + + + :param last_name: The last_name of this CreateContactOptions. # noqa: E501 + :type: str + """ + + self._last_name = last_name + + @property + def company(self): + """Gets the company of this CreateContactOptions. # noqa: E501 + + + :return: The company of this CreateContactOptions. # noqa: E501 + :rtype: str + """ + return self._company + + @company.setter + def company(self, company): + """Sets the company of this CreateContactOptions. + + + :param company: The company of this CreateContactOptions. # noqa: E501 + :type: str + """ + + self._company = company + + @property + def email_addresses(self): + """Gets the email_addresses of this CreateContactOptions. # noqa: E501 + + Set of email addresses belonging to the contact # noqa: E501 + + :return: The email_addresses of this CreateContactOptions. # noqa: E501 + :rtype: list[str] + """ + return self._email_addresses + + @email_addresses.setter + def email_addresses(self, email_addresses): + """Sets the email_addresses of this CreateContactOptions. + + Set of email addresses belonging to the contact # noqa: E501 + + :param email_addresses: The email_addresses of this CreateContactOptions. # noqa: E501 + :type: list[str] + """ + + self._email_addresses = email_addresses + + @property + def tags(self): + """Gets the tags of this CreateContactOptions. # noqa: E501 + + Tags that can be used to search and group contacts # noqa: E501 + + :return: The tags of this CreateContactOptions. # noqa: E501 + :rtype: list[str] + """ + return self._tags + + @tags.setter + def tags(self, tags): + """Sets the tags of this CreateContactOptions. + + Tags that can be used to search and group contacts # noqa: E501 + + :param tags: The tags of this CreateContactOptions. # noqa: E501 + :type: list[str] + """ + + self._tags = tags + + @property + def meta_data(self): + """Gets the meta_data of this CreateContactOptions. # noqa: E501 + + + :return: The meta_data of this CreateContactOptions. # noqa: E501 + :rtype: object + """ + return self._meta_data + + @meta_data.setter + def meta_data(self, meta_data): + """Sets the meta_data of this CreateContactOptions. + + + :param meta_data: The meta_data of this CreateContactOptions. # noqa: E501 + :type: object + """ + + self._meta_data = meta_data + + @property + def opt_out(self): + """Gets the opt_out of this CreateContactOptions. # noqa: E501 + + Has the user explicitly or implicitly opted out of being contacted? If so MailSlurp will ignore them in all actions. # noqa: E501 + + :return: The opt_out of this CreateContactOptions. # noqa: E501 + :rtype: bool + """ + return self._opt_out + + @opt_out.setter + def opt_out(self, opt_out): + """Sets the opt_out of this CreateContactOptions. + + Has the user explicitly or implicitly opted out of being contacted? If so MailSlurp will ignore them in all actions. # noqa: E501 + + :param opt_out: The opt_out of this CreateContactOptions. # noqa: E501 + :type: bool + """ + + self._opt_out = opt_out + + @property + def group_id(self): + """Gets the group_id of this CreateContactOptions. # noqa: E501 + + Group IDs that contact belongs to # noqa: E501 + + :return: The group_id of this CreateContactOptions. # noqa: E501 + :rtype: str + """ + return self._group_id + + @group_id.setter + def group_id(self, group_id): + """Sets the group_id of this CreateContactOptions. + + Group IDs that contact belongs to # noqa: E501 + + :param group_id: The group_id of this CreateContactOptions. # noqa: E501 + :type: str + """ + + self._group_id = group_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateContactOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateContactOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/create_domain_options.py b/mailslurp_client/models/create_domain_options.py new file mode 100644 index 00000000..e999f19d --- /dev/null +++ b/mailslurp_client/models/create_domain_options.py @@ -0,0 +1,211 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class CreateDomainOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'domain': 'str', + 'description': 'str', + 'created_catch_all_inbox': 'bool', + 'domain_type': 'str' + } + + attribute_map = { + 'domain': 'domain', + 'description': 'description', + 'created_catch_all_inbox': 'createdCatchAllInbox', + 'domain_type': 'domainType' + } + + def __init__(self, domain=None, description=None, created_catch_all_inbox=None, domain_type=None, local_vars_configuration=None): # noqa: E501 + """CreateDomainOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._domain = None + self._description = None + self._created_catch_all_inbox = None + self._domain_type = None + self.discriminator = None + + self.domain = domain + self.description = description + self.created_catch_all_inbox = created_catch_all_inbox + self.domain_type = domain_type + + @property + def domain(self): + """Gets the domain of this CreateDomainOptions. # noqa: E501 + + The top level domain you wish to use with MailSlurp. Do not specify subdomain just the top level. So `test.com` covers all subdomains such as `mail.test.com`. Don't include a protocol such as `http://`. Once added you must complete the verification steps by adding the returned records to your domain. # noqa: E501 + + :return: The domain of this CreateDomainOptions. # noqa: E501 + :rtype: str + """ + return self._domain + + @domain.setter + def domain(self, domain): + """Sets the domain of this CreateDomainOptions. + + The top level domain you wish to use with MailSlurp. Do not specify subdomain just the top level. So `test.com` covers all subdomains such as `mail.test.com`. Don't include a protocol such as `http://`. Once added you must complete the verification steps by adding the returned records to your domain. # noqa: E501 + + :param domain: The domain of this CreateDomainOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and domain is None: # noqa: E501 + raise ValueError("Invalid value for `domain`, must not be `None`") # noqa: E501 + + self._domain = domain + + @property + def description(self): + """Gets the description of this CreateDomainOptions. # noqa: E501 + + Optional description of the domain. # noqa: E501 + + :return: The description of this CreateDomainOptions. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CreateDomainOptions. + + Optional description of the domain. # noqa: E501 + + :param description: The description of this CreateDomainOptions. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def created_catch_all_inbox(self): + """Gets the created_catch_all_inbox of this CreateDomainOptions. # noqa: E501 + + Whether to create a catch all inbox for the domain. Any email sent to an address using your domain that cannot be matched to an existing inbox you created with the domain will be routed to the created catch all inbox. You can access emails using the regular methods on this inbox ID. # noqa: E501 + + :return: The created_catch_all_inbox of this CreateDomainOptions. # noqa: E501 + :rtype: bool + """ + return self._created_catch_all_inbox + + @created_catch_all_inbox.setter + def created_catch_all_inbox(self, created_catch_all_inbox): + """Sets the created_catch_all_inbox of this CreateDomainOptions. + + Whether to create a catch all inbox for the domain. Any email sent to an address using your domain that cannot be matched to an existing inbox you created with the domain will be routed to the created catch all inbox. You can access emails using the regular methods on this inbox ID. # noqa: E501 + + :param created_catch_all_inbox: The created_catch_all_inbox of this CreateDomainOptions. # noqa: E501 + :type: bool + """ + + self._created_catch_all_inbox = created_catch_all_inbox + + @property + def domain_type(self): + """Gets the domain_type of this CreateDomainOptions. # noqa: E501 + + Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails. # noqa: E501 + + :return: The domain_type of this CreateDomainOptions. # noqa: E501 + :rtype: str + """ + return self._domain_type + + @domain_type.setter + def domain_type(self, domain_type): + """Sets the domain_type of this CreateDomainOptions. + + Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails. # noqa: E501 + + :param domain_type: The domain_type of this CreateDomainOptions. # noqa: E501 + :type: str + """ + allowed_values = [None,"HTTP_INBOX", "SMTP_DOMAIN"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and domain_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `domain_type` ({0}), must be one of {1}" # noqa: E501 + .format(domain_type, allowed_values) + ) + + self._domain_type = domain_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateDomainOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateDomainOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/create_emergency_address_options.py b/mailslurp_client/models/create_emergency_address_options.py new file mode 100644 index 00000000..a8dccecb --- /dev/null +++ b/mailslurp_client/models/create_emergency_address_options.py @@ -0,0 +1,289 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class CreateEmergencyAddressOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'customer_name': 'str', + 'address1': 'str', + 'city': 'str', + 'region': 'str', + 'postal_code': 'str', + 'iso_country_code': 'str', + 'display_name': 'str' + } + + attribute_map = { + 'customer_name': 'customerName', + 'address1': 'address1', + 'city': 'city', + 'region': 'region', + 'postal_code': 'postalCode', + 'iso_country_code': 'isoCountryCode', + 'display_name': 'displayName' + } + + def __init__(self, customer_name=None, address1=None, city=None, region=None, postal_code=None, iso_country_code=None, display_name=None, local_vars_configuration=None): # noqa: E501 + """CreateEmergencyAddressOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._customer_name = None + self._address1 = None + self._city = None + self._region = None + self._postal_code = None + self._iso_country_code = None + self._display_name = None + self.discriminator = None + + self.customer_name = customer_name + self.address1 = address1 + self.city = city + self.region = region + self.postal_code = postal_code + self.iso_country_code = iso_country_code + if display_name is not None: + self.display_name = display_name + + @property + def customer_name(self): + """Gets the customer_name of this CreateEmergencyAddressOptions. # noqa: E501 + + + :return: The customer_name of this CreateEmergencyAddressOptions. # noqa: E501 + :rtype: str + """ + return self._customer_name + + @customer_name.setter + def customer_name(self, customer_name): + """Sets the customer_name of this CreateEmergencyAddressOptions. + + + :param customer_name: The customer_name of this CreateEmergencyAddressOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and customer_name is None: # noqa: E501 + raise ValueError("Invalid value for `customer_name`, must not be `None`") # noqa: E501 + + self._customer_name = customer_name + + @property + def address1(self): + """Gets the address1 of this CreateEmergencyAddressOptions. # noqa: E501 + + + :return: The address1 of this CreateEmergencyAddressOptions. # noqa: E501 + :rtype: str + """ + return self._address1 + + @address1.setter + def address1(self, address1): + """Sets the address1 of this CreateEmergencyAddressOptions. + + + :param address1: The address1 of this CreateEmergencyAddressOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and address1 is None: # noqa: E501 + raise ValueError("Invalid value for `address1`, must not be `None`") # noqa: E501 + + self._address1 = address1 + + @property + def city(self): + """Gets the city of this CreateEmergencyAddressOptions. # noqa: E501 + + + :return: The city of this CreateEmergencyAddressOptions. # noqa: E501 + :rtype: str + """ + return self._city + + @city.setter + def city(self, city): + """Sets the city of this CreateEmergencyAddressOptions. + + + :param city: The city of this CreateEmergencyAddressOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and city is None: # noqa: E501 + raise ValueError("Invalid value for `city`, must not be `None`") # noqa: E501 + + self._city = city + + @property + def region(self): + """Gets the region of this CreateEmergencyAddressOptions. # noqa: E501 + + + :return: The region of this CreateEmergencyAddressOptions. # noqa: E501 + :rtype: str + """ + return self._region + + @region.setter + def region(self, region): + """Sets the region of this CreateEmergencyAddressOptions. + + + :param region: The region of this CreateEmergencyAddressOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and region is None: # noqa: E501 + raise ValueError("Invalid value for `region`, must not be `None`") # noqa: E501 + + self._region = region + + @property + def postal_code(self): + """Gets the postal_code of this CreateEmergencyAddressOptions. # noqa: E501 + + + :return: The postal_code of this CreateEmergencyAddressOptions. # noqa: E501 + :rtype: str + """ + return self._postal_code + + @postal_code.setter + def postal_code(self, postal_code): + """Sets the postal_code of this CreateEmergencyAddressOptions. + + + :param postal_code: The postal_code of this CreateEmergencyAddressOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and postal_code is None: # noqa: E501 + raise ValueError("Invalid value for `postal_code`, must not be `None`") # noqa: E501 + + self._postal_code = postal_code + + @property + def iso_country_code(self): + """Gets the iso_country_code of this CreateEmergencyAddressOptions. # noqa: E501 + + + :return: The iso_country_code of this CreateEmergencyAddressOptions. # noqa: E501 + :rtype: str + """ + return self._iso_country_code + + @iso_country_code.setter + def iso_country_code(self, iso_country_code): + """Sets the iso_country_code of this CreateEmergencyAddressOptions. + + + :param iso_country_code: The iso_country_code of this CreateEmergencyAddressOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and iso_country_code is None: # noqa: E501 + raise ValueError("Invalid value for `iso_country_code`, must not be `None`") # noqa: E501 + allowed_values = ["US", "GB"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and iso_country_code not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `iso_country_code` ({0}), must be one of {1}" # noqa: E501 + .format(iso_country_code, allowed_values) + ) + + self._iso_country_code = iso_country_code + + @property + def display_name(self): + """Gets the display_name of this CreateEmergencyAddressOptions. # noqa: E501 + + + :return: The display_name of this CreateEmergencyAddressOptions. # noqa: E501 + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """Sets the display_name of this CreateEmergencyAddressOptions. + + + :param display_name: The display_name of this CreateEmergencyAddressOptions. # noqa: E501 + :type: str + """ + + self._display_name = display_name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateEmergencyAddressOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateEmergencyAddressOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/create_group_options.py b/mailslurp_client/models/create_group_options.py new file mode 100644 index 00000000..0e9e2614 --- /dev/null +++ b/mailslurp_client/models/create_group_options.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class CreateGroupOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'description': 'str' + } + + attribute_map = { + 'name': 'name', + 'description': 'description' + } + + def __init__(self, name=None, description=None, local_vars_configuration=None): # noqa: E501 + """CreateGroupOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._description = None + self.discriminator = None + + self.name = name + if description is not None: + self.description = description + + @property + def name(self): + """Gets the name of this CreateGroupOptions. # noqa: E501 + + + :return: The name of this CreateGroupOptions. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateGroupOptions. + + + :param name: The name of this CreateGroupOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def description(self): + """Gets the description of this CreateGroupOptions. # noqa: E501 + + + :return: The description of this CreateGroupOptions. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CreateGroupOptions. + + + :param description: The description of this CreateGroupOptions. # noqa: E501 + :type: str + """ + + self._description = description + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateGroupOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateGroupOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/create_inbox_dto.py b/mailslurp_client/models/create_inbox_dto.py new file mode 100644 index 00000000..843ffc74 --- /dev/null +++ b/mailslurp_client/models/create_inbox_dto.py @@ -0,0 +1,399 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class CreateInboxDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'email_address': 'str', + 'name': 'str', + 'description': 'str', + 'use_domain_pool': 'bool', + 'tags': 'list[str]', + 'expires_at': 'datetime', + 'favourite': 'bool', + 'expires_in': 'int', + 'allow_team_access': 'bool', + 'inbox_type': 'str', + 'virtual_inbox': 'bool' + } + + attribute_map = { + 'email_address': 'emailAddress', + 'name': 'name', + 'description': 'description', + 'use_domain_pool': 'useDomainPool', + 'tags': 'tags', + 'expires_at': 'expiresAt', + 'favourite': 'favourite', + 'expires_in': 'expiresIn', + 'allow_team_access': 'allowTeamAccess', + 'inbox_type': 'inboxType', + 'virtual_inbox': 'virtualInbox' + } + + def __init__(self, email_address=None, name=None, description=None, use_domain_pool=None, tags=None, expires_at=None, favourite=None, expires_in=None, allow_team_access=None, inbox_type=None, virtual_inbox=None, local_vars_configuration=None): # noqa: E501 + """CreateInboxDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._email_address = None + self._name = None + self._description = None + self._use_domain_pool = None + self._tags = None + self._expires_at = None + self._favourite = None + self._expires_in = None + self._allow_team_access = None + self._inbox_type = None + self._virtual_inbox = None + self.discriminator = None + + if email_address is not None: + self.email_address = email_address + self.name = name + self.description = description + self.use_domain_pool = use_domain_pool + self.tags = tags + self.expires_at = expires_at + self.favourite = favourite + self.expires_in = expires_in + self.allow_team_access = allow_team_access + self.inbox_type = inbox_type + self.virtual_inbox = virtual_inbox + + @property + def email_address(self): + """Gets the email_address of this CreateInboxDto. # noqa: E501 + + A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as `123@mailslurp.com`. If you use the `useDomainPool` option when the email address is null it will generate an email address with a more varied domain ending such as `123@mailslurp.info` or `123@mailslurp.biz`. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Note domain types must match the inbox type - so `SMTP` inboxes will only work with `SMTP` type domains. Avoid `SMTP` inboxes if you need to send emails as they can only receive. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. # noqa: E501 + + :return: The email_address of this CreateInboxDto. # noqa: E501 + :rtype: str + """ + return self._email_address + + @email_address.setter + def email_address(self, email_address): + """Sets the email_address of this CreateInboxDto. + + A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as `123@mailslurp.com`. If you use the `useDomainPool` option when the email address is null it will generate an email address with a more varied domain ending such as `123@mailslurp.info` or `123@mailslurp.biz`. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Note domain types must match the inbox type - so `SMTP` inboxes will only work with `SMTP` type domains. Avoid `SMTP` inboxes if you need to send emails as they can only receive. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. # noqa: E501 + + :param email_address: The email_address of this CreateInboxDto. # noqa: E501 + :type: str + """ + + self._email_address = email_address + + @property + def name(self): + """Gets the name of this CreateInboxDto. # noqa: E501 + + Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails. # noqa: E501 + + :return: The name of this CreateInboxDto. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateInboxDto. + + Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails. # noqa: E501 + + :param name: The name of this CreateInboxDto. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def description(self): + """Gets the description of this CreateInboxDto. # noqa: E501 + + Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with # noqa: E501 + + :return: The description of this CreateInboxDto. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CreateInboxDto. + + Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with # noqa: E501 + + :param description: The description of this CreateInboxDto. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def use_domain_pool(self): + """Gets the use_domain_pool of this CreateInboxDto. # noqa: E501 + + Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default `@mailslurp.com` email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in `@mailslurp.{world,info,xyz,...}` . This means a TLD is randomly selecting from a list of `.biz`, `.info`, `.xyz` etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of `@mailslurp.com` or custom email address provided by the emailAddress field. Note this feature is only available for `HTTP` inbox types. # noqa: E501 + + :return: The use_domain_pool of this CreateInboxDto. # noqa: E501 + :rtype: bool + """ + return self._use_domain_pool + + @use_domain_pool.setter + def use_domain_pool(self, use_domain_pool): + """Sets the use_domain_pool of this CreateInboxDto. + + Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default `@mailslurp.com` email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in `@mailslurp.{world,info,xyz,...}` . This means a TLD is randomly selecting from a list of `.biz`, `.info`, `.xyz` etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of `@mailslurp.com` or custom email address provided by the emailAddress field. Note this feature is only available for `HTTP` inbox types. # noqa: E501 + + :param use_domain_pool: The use_domain_pool of this CreateInboxDto. # noqa: E501 + :type: bool + """ + + self._use_domain_pool = use_domain_pool + + @property + def tags(self): + """Gets the tags of this CreateInboxDto. # noqa: E501 + + Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. # noqa: E501 + + :return: The tags of this CreateInboxDto. # noqa: E501 + :rtype: list[str] + """ + return self._tags + + @tags.setter + def tags(self, tags): + """Sets the tags of this CreateInboxDto. + + Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. # noqa: E501 + + :param tags: The tags of this CreateInboxDto. # noqa: E501 + :type: list[str] + """ + + self._tags = tags + + @property + def expires_at(self): + """Gets the expires_at of this CreateInboxDto. # noqa: E501 + + Optional inbox expiration date. If null then this inbox is permanent and the emails in it won't be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX. # noqa: E501 + + :return: The expires_at of this CreateInboxDto. # noqa: E501 + :rtype: datetime + """ + return self._expires_at + + @expires_at.setter + def expires_at(self, expires_at): + """Sets the expires_at of this CreateInboxDto. + + Optional inbox expiration date. If null then this inbox is permanent and the emails in it won't be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX. # noqa: E501 + + :param expires_at: The expires_at of this CreateInboxDto. # noqa: E501 + :type: datetime + """ + + self._expires_at = expires_at + + @property + def favourite(self): + """Gets the favourite of this CreateInboxDto. # noqa: E501 + + Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering # noqa: E501 + + :return: The favourite of this CreateInboxDto. # noqa: E501 + :rtype: bool + """ + return self._favourite + + @favourite.setter + def favourite(self, favourite): + """Sets the favourite of this CreateInboxDto. + + Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering # noqa: E501 + + :param favourite: The favourite of this CreateInboxDto. # noqa: E501 + :type: bool + """ + + self._favourite = favourite + + @property + def expires_in(self): + """Gets the expires_in of this CreateInboxDto. # noqa: E501 + + Number of milliseconds that inbox should exist for # noqa: E501 + + :return: The expires_in of this CreateInboxDto. # noqa: E501 + :rtype: int + """ + return self._expires_in + + @expires_in.setter + def expires_in(self, expires_in): + """Sets the expires_in of this CreateInboxDto. + + Number of milliseconds that inbox should exist for # noqa: E501 + + :param expires_in: The expires_in of this CreateInboxDto. # noqa: E501 + :type: int + """ + + self._expires_in = expires_in + + @property + def allow_team_access(self): + """Gets the allow_team_access of this CreateInboxDto. # noqa: E501 + + DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization. # noqa: E501 + + :return: The allow_team_access of this CreateInboxDto. # noqa: E501 + :rtype: bool + """ + return self._allow_team_access + + @allow_team_access.setter + def allow_team_access(self, allow_team_access): + """Sets the allow_team_access of this CreateInboxDto. + + DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization. # noqa: E501 + + :param allow_team_access: The allow_team_access of this CreateInboxDto. # noqa: E501 + :type: bool + """ + + self._allow_team_access = allow_team_access + + @property + def inbox_type(self): + """Gets the inbox_type of this CreateInboxDto. # noqa: E501 + + Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). # noqa: E501 + + :return: The inbox_type of this CreateInboxDto. # noqa: E501 + :rtype: str + """ + return self._inbox_type + + @inbox_type.setter + def inbox_type(self, inbox_type): + """Sets the inbox_type of this CreateInboxDto. + + Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). # noqa: E501 + + :param inbox_type: The inbox_type of this CreateInboxDto. # noqa: E501 + :type: str + """ + allowed_values = [None,"HTTP_INBOX", "SMTP_INBOX"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and inbox_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `inbox_type` ({0}), must be one of {1}" # noqa: E501 + .format(inbox_type, allowed_values) + ) + + self._inbox_type = inbox_type + + @property + def virtual_inbox(self): + """Gets the virtual_inbox of this CreateInboxDto. # noqa: E501 + + Virtual inbox prevents any outbound emails from being sent. It creates sent email records but will never send real emails to recipients. Great for testing and faking email sending. # noqa: E501 + + :return: The virtual_inbox of this CreateInboxDto. # noqa: E501 + :rtype: bool + """ + return self._virtual_inbox + + @virtual_inbox.setter + def virtual_inbox(self, virtual_inbox): + """Sets the virtual_inbox of this CreateInboxDto. + + Virtual inbox prevents any outbound emails from being sent. It creates sent email records but will never send real emails to recipients. Great for testing and faking email sending. # noqa: E501 + + :param virtual_inbox: The virtual_inbox of this CreateInboxDto. # noqa: E501 + :type: bool + """ + + self._virtual_inbox = virtual_inbox + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateInboxDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateInboxDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/create_inbox_forwarder_options.py b/mailslurp_client/models/create_inbox_forwarder_options.py new file mode 100644 index 00000000..c3c840cf --- /dev/null +++ b/mailslurp_client/models/create_inbox_forwarder_options.py @@ -0,0 +1,188 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class CreateInboxForwarderOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'field': 'str', + 'match': 'str', + 'forward_to_recipients': 'list[str]' + } + + attribute_map = { + 'field': 'field', + 'match': 'match', + 'forward_to_recipients': 'forwardToRecipients' + } + + def __init__(self, field=None, match=None, forward_to_recipients=None, local_vars_configuration=None): # noqa: E501 + """CreateInboxForwarderOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._field = None + self._match = None + self._forward_to_recipients = None + self.discriminator = None + + self.field = field + self.match = match + self.forward_to_recipients = forward_to_recipients + + @property + def field(self): + """Gets the field of this CreateInboxForwarderOptions. # noqa: E501 + + Field to match against to trigger inbox forwarding for inbound email # noqa: E501 + + :return: The field of this CreateInboxForwarderOptions. # noqa: E501 + :rtype: str + """ + return self._field + + @field.setter + def field(self, field): + """Sets the field of this CreateInboxForwarderOptions. + + Field to match against to trigger inbox forwarding for inbound email # noqa: E501 + + :param field: The field of this CreateInboxForwarderOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and field is None: # noqa: E501 + raise ValueError("Invalid value for `field`, must not be `None`") # noqa: E501 + allowed_values = ["RECIPIENTS", "SENDER", "SUBJECT", "ATTACHMENTS"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and field not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `field` ({0}), must be one of {1}" # noqa: E501 + .format(field, allowed_values) + ) + + self._field = field + + @property + def match(self): + """Gets the match of this CreateInboxForwarderOptions. # noqa: E501 + + String or wildcard style match for field specified when evaluating forwarding rules # noqa: E501 + + :return: The match of this CreateInboxForwarderOptions. # noqa: E501 + :rtype: str + """ + return self._match + + @match.setter + def match(self, match): + """Sets the match of this CreateInboxForwarderOptions. + + String or wildcard style match for field specified when evaluating forwarding rules # noqa: E501 + + :param match: The match of this CreateInboxForwarderOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and match is None: # noqa: E501 + raise ValueError("Invalid value for `match`, must not be `None`") # noqa: E501 + + self._match = match + + @property + def forward_to_recipients(self): + """Gets the forward_to_recipients of this CreateInboxForwarderOptions. # noqa: E501 + + Email addresses to forward an email to if it matches the field and match criteria of the forwarder # noqa: E501 + + :return: The forward_to_recipients of this CreateInboxForwarderOptions. # noqa: E501 + :rtype: list[str] + """ + return self._forward_to_recipients + + @forward_to_recipients.setter + def forward_to_recipients(self, forward_to_recipients): + """Sets the forward_to_recipients of this CreateInboxForwarderOptions. + + Email addresses to forward an email to if it matches the field and match criteria of the forwarder # noqa: E501 + + :param forward_to_recipients: The forward_to_recipients of this CreateInboxForwarderOptions. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and forward_to_recipients is None: # noqa: E501 + raise ValueError("Invalid value for `forward_to_recipients`, must not be `None`") # noqa: E501 + + self._forward_to_recipients = forward_to_recipients + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateInboxForwarderOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateInboxForwarderOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/create_inbox_ruleset_options.py b/mailslurp_client/models/create_inbox_ruleset_options.py new file mode 100644 index 00000000..d0d7f08f --- /dev/null +++ b/mailslurp_client/models/create_inbox_ruleset_options.py @@ -0,0 +1,194 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class CreateInboxRulesetOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'scope': 'str', + 'action': 'str', + 'target': 'str' + } + + attribute_map = { + 'scope': 'scope', + 'action': 'action', + 'target': 'target' + } + + def __init__(self, scope=None, action=None, target=None, local_vars_configuration=None): # noqa: E501 + """CreateInboxRulesetOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._scope = None + self._action = None + self._target = None + self.discriminator = None + + self.scope = scope + self.action = action + self.target = target + + @property + def scope(self): + """Gets the scope of this CreateInboxRulesetOptions. # noqa: E501 + + What type of emails actions to apply ruleset to. Either `SENDING_EMAILS` or `RECEIVING_EMAILS` will apply action and target to any sending or receiving of emails respectively. # noqa: E501 + + :return: The scope of this CreateInboxRulesetOptions. # noqa: E501 + :rtype: str + """ + return self._scope + + @scope.setter + def scope(self, scope): + """Sets the scope of this CreateInboxRulesetOptions. + + What type of emails actions to apply ruleset to. Either `SENDING_EMAILS` or `RECEIVING_EMAILS` will apply action and target to any sending or receiving of emails respectively. # noqa: E501 + + :param scope: The scope of this CreateInboxRulesetOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and scope is None: # noqa: E501 + raise ValueError("Invalid value for `scope`, must not be `None`") # noqa: E501 + allowed_values = ["RECEIVING_EMAILS", "SENDING_EMAILS"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and scope not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `scope` ({0}), must be one of {1}" # noqa: E501 + .format(scope, allowed_values) + ) + + self._scope = scope + + @property + def action(self): + """Gets the action of this CreateInboxRulesetOptions. # noqa: E501 + + Action to be taken when the ruleset matches an email for the given scope. For example: `BLOCK` action with target `*` and scope `SENDING_EMAILS` blocks sending to all recipients. Note `ALLOW` takes precedent over `BLOCK`. `FILTER_REMOVE` is like block but will remove offending email addresses during a send or receive event instead of blocking the action. # noqa: E501 + + :return: The action of this CreateInboxRulesetOptions. # noqa: E501 + :rtype: str + """ + return self._action + + @action.setter + def action(self, action): + """Sets the action of this CreateInboxRulesetOptions. + + Action to be taken when the ruleset matches an email for the given scope. For example: `BLOCK` action with target `*` and scope `SENDING_EMAILS` blocks sending to all recipients. Note `ALLOW` takes precedent over `BLOCK`. `FILTER_REMOVE` is like block but will remove offending email addresses during a send or receive event instead of blocking the action. # noqa: E501 + + :param action: The action of this CreateInboxRulesetOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and action is None: # noqa: E501 + raise ValueError("Invalid value for `action`, must not be `None`") # noqa: E501 + allowed_values = ["BLOCK", "ALLOW", "FILTER_REMOVE"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and action not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `action` ({0}), must be one of {1}" # noqa: E501 + .format(action, allowed_values) + ) + + self._action = action + + @property + def target(self): + """Gets the target of this CreateInboxRulesetOptions. # noqa: E501 + + Target to match emails with. Can be a wild-card type pattern or a valid email address. For instance `*@gmail.com` matches all gmail addresses while `test@gmail.com` matches one address exactly. The target is applied to every recipient field email address when `SENDING_EMAILS` is the scope and is applied to sender of email when `RECEIVING_EMAILS`. # noqa: E501 + + :return: The target of this CreateInboxRulesetOptions. # noqa: E501 + :rtype: str + """ + return self._target + + @target.setter + def target(self, target): + """Sets the target of this CreateInboxRulesetOptions. + + Target to match emails with. Can be a wild-card type pattern or a valid email address. For instance `*@gmail.com` matches all gmail addresses while `test@gmail.com` matches one address exactly. The target is applied to every recipient field email address when `SENDING_EMAILS` is the scope and is applied to sender of email when `RECEIVING_EMAILS`. # noqa: E501 + + :param target: The target of this CreateInboxRulesetOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and target is None: # noqa: E501 + raise ValueError("Invalid value for `target`, must not be `None`") # noqa: E501 + + self._target = target + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateInboxRulesetOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateInboxRulesetOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/create_template_options.py b/mailslurp_client/models/create_template_options.py new file mode 100644 index 00000000..39fbfba3 --- /dev/null +++ b/mailslurp_client/models/create_template_options.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class CreateTemplateOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'content': 'str' + } + + attribute_map = { + 'name': 'name', + 'content': 'content' + } + + def __init__(self, name=None, content=None, local_vars_configuration=None): # noqa: E501 + """CreateTemplateOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._content = None + self.discriminator = None + + self.name = name + self.content = content + + @property + def name(self): + """Gets the name of this CreateTemplateOptions. # noqa: E501 + + Name of template # noqa: E501 + + :return: The name of this CreateTemplateOptions. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateTemplateOptions. + + Name of template # noqa: E501 + + :param name: The name of this CreateTemplateOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def content(self): + """Gets the content of this CreateTemplateOptions. # noqa: E501 + + Template content. Can include moustache style variables such as {{var_name}} # noqa: E501 + + :return: The content of this CreateTemplateOptions. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this CreateTemplateOptions. + + Template content. Can include moustache style variables such as {{var_name}} # noqa: E501 + + :param content: The content of this CreateTemplateOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and content is None: # noqa: E501 + raise ValueError("Invalid value for `content`, must not be `None`") # noqa: E501 + + self._content = content + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateTemplateOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateTemplateOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/create_tracking_pixel_options.py b/mailslurp_client/models/create_tracking_pixel_options.py new file mode 100644 index 00000000..44cccf72 --- /dev/null +++ b/mailslurp_client/models/create_tracking_pixel_options.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class CreateTrackingPixelOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'recipient': 'str' + } + + attribute_map = { + 'name': 'name', + 'recipient': 'recipient' + } + + def __init__(self, name=None, recipient=None, local_vars_configuration=None): # noqa: E501 + """CreateTrackingPixelOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._recipient = None + self.discriminator = None + + if name is not None: + self.name = name + if recipient is not None: + self.recipient = recipient + + @property + def name(self): + """Gets the name of this CreateTrackingPixelOptions. # noqa: E501 + + + :return: The name of this CreateTrackingPixelOptions. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateTrackingPixelOptions. + + + :param name: The name of this CreateTrackingPixelOptions. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def recipient(self): + """Gets the recipient of this CreateTrackingPixelOptions. # noqa: E501 + + + :return: The recipient of this CreateTrackingPixelOptions. # noqa: E501 + :rtype: str + """ + return self._recipient + + @recipient.setter + def recipient(self, recipient): + """Sets the recipient of this CreateTrackingPixelOptions. + + + :param recipient: The recipient of this CreateTrackingPixelOptions. # noqa: E501 + :type: str + """ + + self._recipient = recipient + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateTrackingPixelOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateTrackingPixelOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/create_webhook_options.py b/mailslurp_client/models/create_webhook_options.py new file mode 100644 index 00000000..b3919f88 --- /dev/null +++ b/mailslurp_client/models/create_webhook_options.py @@ -0,0 +1,237 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class CreateWebhookOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'url': 'str', + 'basic_auth': 'BasicAuthOptions', + 'name': 'str', + 'event_name': 'str', + 'include_headers': 'WebhookHeaders' + } + + attribute_map = { + 'url': 'url', + 'basic_auth': 'basicAuth', + 'name': 'name', + 'event_name': 'eventName', + 'include_headers': 'includeHeaders' + } + + def __init__(self, url=None, basic_auth=None, name=None, event_name=None, include_headers=None, local_vars_configuration=None): # noqa: E501 + """CreateWebhookOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._url = None + self._basic_auth = None + self._name = None + self._event_name = None + self._include_headers = None + self.discriminator = None + + self.url = url + self.basic_auth = basic_auth + if name is not None: + self.name = name + if event_name is not None: + self.event_name = event_name + if include_headers is not None: + self.include_headers = include_headers + + @property + def url(self): + """Gets the url of this CreateWebhookOptions. # noqa: E501 + + Public URL on your server that MailSlurp can post WebhookNotification payload to when an email is received or an event is trigger. The payload of the submitted JSON is dependent on the webhook event type. See docs.mailslurp.com/webhooks for event payload documentation. # noqa: E501 + + :return: The url of this CreateWebhookOptions. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this CreateWebhookOptions. + + Public URL on your server that MailSlurp can post WebhookNotification payload to when an email is received or an event is trigger. The payload of the submitted JSON is dependent on the webhook event type. See docs.mailslurp.com/webhooks for event payload documentation. # noqa: E501 + + :param url: The url of this CreateWebhookOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and url is None: # noqa: E501 + raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501 + + self._url = url + + @property + def basic_auth(self): + """Gets the basic_auth of this CreateWebhookOptions. # noqa: E501 + + + :return: The basic_auth of this CreateWebhookOptions. # noqa: E501 + :rtype: BasicAuthOptions + """ + return self._basic_auth + + @basic_auth.setter + def basic_auth(self, basic_auth): + """Sets the basic_auth of this CreateWebhookOptions. + + + :param basic_auth: The basic_auth of this CreateWebhookOptions. # noqa: E501 + :type: BasicAuthOptions + """ + + self._basic_auth = basic_auth + + @property + def name(self): + """Gets the name of this CreateWebhookOptions. # noqa: E501 + + Optional name for the webhook # noqa: E501 + + :return: The name of this CreateWebhookOptions. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateWebhookOptions. + + Optional name for the webhook # noqa: E501 + + :param name: The name of this CreateWebhookOptions. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def event_name(self): + """Gets the event_name of this CreateWebhookOptions. # noqa: E501 + + Optional webhook event name. Default is `EMAIL_RECEIVED` and is triggered when an email is received by the inbox associated with the webhook. Payload differ according to the webhook event name. # noqa: E501 + + :return: The event_name of this CreateWebhookOptions. # noqa: E501 + :rtype: str + """ + return self._event_name + + @event_name.setter + def event_name(self, event_name): + """Sets the event_name of this CreateWebhookOptions. + + Optional webhook event name. Default is `EMAIL_RECEIVED` and is triggered when an email is received by the inbox associated with the webhook. Payload differ according to the webhook event name. # noqa: E501 + + :param event_name: The event_name of this CreateWebhookOptions. # noqa: E501 + :type: str + """ + allowed_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and event_name not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `event_name` ({0}), must be one of {1}" # noqa: E501 + .format(event_name, allowed_values) + ) + + self._event_name = event_name + + @property + def include_headers(self): + """Gets the include_headers of this CreateWebhookOptions. # noqa: E501 + + + :return: The include_headers of this CreateWebhookOptions. # noqa: E501 + :rtype: WebhookHeaders + """ + return self._include_headers + + @include_headers.setter + def include_headers(self, include_headers): + """Sets the include_headers of this CreateWebhookOptions. + + + :param include_headers: The include_headers of this CreateWebhookOptions. # noqa: E501 + :type: WebhookHeaders + """ + + self._include_headers = include_headers + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateWebhookOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, CreateWebhookOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/delivery_status_dto.py b/mailslurp_client/models/delivery_status_dto.py new file mode 100644 index 00000000..59ff7512 --- /dev/null +++ b/mailslurp_client/models/delivery_status_dto.py @@ -0,0 +1,463 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class DeliveryStatusDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'user_id': 'str', + 'sent_id': 'str', + 'remote_mta_ip': 'str', + 'inbox_id': 'str', + 'reporting_mta': 'str', + 'recipients': 'list[str]', + 'smtp_response': 'str', + 'smtp_status_code': 'int', + 'processing_time_millis': 'int', + 'received': 'datetime', + 'subject': 'str', + 'created_at': 'datetime', + 'updated_at': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'user_id': 'userId', + 'sent_id': 'sentId', + 'remote_mta_ip': 'remoteMtaIp', + 'inbox_id': 'inboxId', + 'reporting_mta': 'reportingMta', + 'recipients': 'recipients', + 'smtp_response': 'smtpResponse', + 'smtp_status_code': 'smtpStatusCode', + 'processing_time_millis': 'processingTimeMillis', + 'received': 'received', + 'subject': 'subject', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt' + } + + def __init__(self, id=None, user_id=None, sent_id=None, remote_mta_ip=None, inbox_id=None, reporting_mta=None, recipients=None, smtp_response=None, smtp_status_code=None, processing_time_millis=None, received=None, subject=None, created_at=None, updated_at=None, local_vars_configuration=None): # noqa: E501 + """DeliveryStatusDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._user_id = None + self._sent_id = None + self._remote_mta_ip = None + self._inbox_id = None + self._reporting_mta = None + self._recipients = None + self._smtp_response = None + self._smtp_status_code = None + self._processing_time_millis = None + self._received = None + self._subject = None + self._created_at = None + self._updated_at = None + self.discriminator = None + + self.id = id + self.user_id = user_id + if sent_id is not None: + self.sent_id = sent_id + if remote_mta_ip is not None: + self.remote_mta_ip = remote_mta_ip + if inbox_id is not None: + self.inbox_id = inbox_id + if reporting_mta is not None: + self.reporting_mta = reporting_mta + if recipients is not None: + self.recipients = recipients + if smtp_response is not None: + self.smtp_response = smtp_response + if smtp_status_code is not None: + self.smtp_status_code = smtp_status_code + if processing_time_millis is not None: + self.processing_time_millis = processing_time_millis + if received is not None: + self.received = received + if subject is not None: + self.subject = subject + self.created_at = created_at + self.updated_at = updated_at + + @property + def id(self): + """Gets the id of this DeliveryStatusDto. # noqa: E501 + + + :return: The id of this DeliveryStatusDto. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this DeliveryStatusDto. + + + :param id: The id of this DeliveryStatusDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def user_id(self): + """Gets the user_id of this DeliveryStatusDto. # noqa: E501 + + + :return: The user_id of this DeliveryStatusDto. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this DeliveryStatusDto. + + + :param user_id: The user_id of this DeliveryStatusDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def sent_id(self): + """Gets the sent_id of this DeliveryStatusDto. # noqa: E501 + + + :return: The sent_id of this DeliveryStatusDto. # noqa: E501 + :rtype: str + """ + return self._sent_id + + @sent_id.setter + def sent_id(self, sent_id): + """Sets the sent_id of this DeliveryStatusDto. + + + :param sent_id: The sent_id of this DeliveryStatusDto. # noqa: E501 + :type: str + """ + + self._sent_id = sent_id + + @property + def remote_mta_ip(self): + """Gets the remote_mta_ip of this DeliveryStatusDto. # noqa: E501 + + + :return: The remote_mta_ip of this DeliveryStatusDto. # noqa: E501 + :rtype: str + """ + return self._remote_mta_ip + + @remote_mta_ip.setter + def remote_mta_ip(self, remote_mta_ip): + """Sets the remote_mta_ip of this DeliveryStatusDto. + + + :param remote_mta_ip: The remote_mta_ip of this DeliveryStatusDto. # noqa: E501 + :type: str + """ + + self._remote_mta_ip = remote_mta_ip + + @property + def inbox_id(self): + """Gets the inbox_id of this DeliveryStatusDto. # noqa: E501 + + + :return: The inbox_id of this DeliveryStatusDto. # noqa: E501 + :rtype: str + """ + return self._inbox_id + + @inbox_id.setter + def inbox_id(self, inbox_id): + """Sets the inbox_id of this DeliveryStatusDto. + + + :param inbox_id: The inbox_id of this DeliveryStatusDto. # noqa: E501 + :type: str + """ + + self._inbox_id = inbox_id + + @property + def reporting_mta(self): + """Gets the reporting_mta of this DeliveryStatusDto. # noqa: E501 + + + :return: The reporting_mta of this DeliveryStatusDto. # noqa: E501 + :rtype: str + """ + return self._reporting_mta + + @reporting_mta.setter + def reporting_mta(self, reporting_mta): + """Sets the reporting_mta of this DeliveryStatusDto. + + + :param reporting_mta: The reporting_mta of this DeliveryStatusDto. # noqa: E501 + :type: str + """ + + self._reporting_mta = reporting_mta + + @property + def recipients(self): + """Gets the recipients of this DeliveryStatusDto. # noqa: E501 + + + :return: The recipients of this DeliveryStatusDto. # noqa: E501 + :rtype: list[str] + """ + return self._recipients + + @recipients.setter + def recipients(self, recipients): + """Sets the recipients of this DeliveryStatusDto. + + + :param recipients: The recipients of this DeliveryStatusDto. # noqa: E501 + :type: list[str] + """ + + self._recipients = recipients + + @property + def smtp_response(self): + """Gets the smtp_response of this DeliveryStatusDto. # noqa: E501 + + + :return: The smtp_response of this DeliveryStatusDto. # noqa: E501 + :rtype: str + """ + return self._smtp_response + + @smtp_response.setter + def smtp_response(self, smtp_response): + """Sets the smtp_response of this DeliveryStatusDto. + + + :param smtp_response: The smtp_response of this DeliveryStatusDto. # noqa: E501 + :type: str + """ + + self._smtp_response = smtp_response + + @property + def smtp_status_code(self): + """Gets the smtp_status_code of this DeliveryStatusDto. # noqa: E501 + + + :return: The smtp_status_code of this DeliveryStatusDto. # noqa: E501 + :rtype: int + """ + return self._smtp_status_code + + @smtp_status_code.setter + def smtp_status_code(self, smtp_status_code): + """Sets the smtp_status_code of this DeliveryStatusDto. + + + :param smtp_status_code: The smtp_status_code of this DeliveryStatusDto. # noqa: E501 + :type: int + """ + + self._smtp_status_code = smtp_status_code + + @property + def processing_time_millis(self): + """Gets the processing_time_millis of this DeliveryStatusDto. # noqa: E501 + + + :return: The processing_time_millis of this DeliveryStatusDto. # noqa: E501 + :rtype: int + """ + return self._processing_time_millis + + @processing_time_millis.setter + def processing_time_millis(self, processing_time_millis): + """Sets the processing_time_millis of this DeliveryStatusDto. + + + :param processing_time_millis: The processing_time_millis of this DeliveryStatusDto. # noqa: E501 + :type: int + """ + + self._processing_time_millis = processing_time_millis + + @property + def received(self): + """Gets the received of this DeliveryStatusDto. # noqa: E501 + + + :return: The received of this DeliveryStatusDto. # noqa: E501 + :rtype: datetime + """ + return self._received + + @received.setter + def received(self, received): + """Sets the received of this DeliveryStatusDto. + + + :param received: The received of this DeliveryStatusDto. # noqa: E501 + :type: datetime + """ + + self._received = received + + @property + def subject(self): + """Gets the subject of this DeliveryStatusDto. # noqa: E501 + + + :return: The subject of this DeliveryStatusDto. # noqa: E501 + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this DeliveryStatusDto. + + + :param subject: The subject of this DeliveryStatusDto. # noqa: E501 + :type: str + """ + + self._subject = subject + + @property + def created_at(self): + """Gets the created_at of this DeliveryStatusDto. # noqa: E501 + + + :return: The created_at of this DeliveryStatusDto. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this DeliveryStatusDto. + + + :param created_at: The created_at of this DeliveryStatusDto. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + @property + def updated_at(self): + """Gets the updated_at of this DeliveryStatusDto. # noqa: E501 + + + :return: The updated_at of this DeliveryStatusDto. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this DeliveryStatusDto. + + + :param updated_at: The updated_at of this DeliveryStatusDto. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and updated_at is None: # noqa: E501 + raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501 + + self._updated_at = updated_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeliveryStatusDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DeliveryStatusDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/describe_domain_options.py b/mailslurp_client/models/describe_domain_options.py new file mode 100644 index 00000000..daf11c44 --- /dev/null +++ b/mailslurp_client/models/describe_domain_options.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class DescribeDomainOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'domain': 'str' + } + + attribute_map = { + 'domain': 'domain' + } + + def __init__(self, domain=None, local_vars_configuration=None): # noqa: E501 + """DescribeDomainOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._domain = None + self.discriminator = None + + self.domain = domain + + @property + def domain(self): + """Gets the domain of this DescribeDomainOptions. # noqa: E501 + + + :return: The domain of this DescribeDomainOptions. # noqa: E501 + :rtype: str + """ + return self._domain + + @domain.setter + def domain(self, domain): + """Sets the domain of this DescribeDomainOptions. + + + :param domain: The domain of this DescribeDomainOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and domain is None: # noqa: E501 + raise ValueError("Invalid value for `domain`, must not be `None`") # noqa: E501 + + self._domain = domain + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DescribeDomainOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DescribeDomainOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/describe_mail_server_domain_result.py b/mailslurp_client/models/describe_mail_server_domain_result.py new file mode 100644 index 00000000..49fade8b --- /dev/null +++ b/mailslurp_client/models/describe_mail_server_domain_result.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class DescribeMailServerDomainResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'mx_records': 'list[NameServerRecord]', + 'domain': 'str', + 'message': 'str' + } + + attribute_map = { + 'mx_records': 'mxRecords', + 'domain': 'domain', + 'message': 'message' + } + + def __init__(self, mx_records=None, domain=None, message=None, local_vars_configuration=None): # noqa: E501 + """DescribeMailServerDomainResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._mx_records = None + self._domain = None + self._message = None + self.discriminator = None + + self.mx_records = mx_records + self.domain = domain + if message is not None: + self.message = message + + @property + def mx_records(self): + """Gets the mx_records of this DescribeMailServerDomainResult. # noqa: E501 + + + :return: The mx_records of this DescribeMailServerDomainResult. # noqa: E501 + :rtype: list[NameServerRecord] + """ + return self._mx_records + + @mx_records.setter + def mx_records(self, mx_records): + """Sets the mx_records of this DescribeMailServerDomainResult. + + + :param mx_records: The mx_records of this DescribeMailServerDomainResult. # noqa: E501 + :type: list[NameServerRecord] + """ + if self.local_vars_configuration.client_side_validation and mx_records is None: # noqa: E501 + raise ValueError("Invalid value for `mx_records`, must not be `None`") # noqa: E501 + + self._mx_records = mx_records + + @property + def domain(self): + """Gets the domain of this DescribeMailServerDomainResult. # noqa: E501 + + + :return: The domain of this DescribeMailServerDomainResult. # noqa: E501 + :rtype: str + """ + return self._domain + + @domain.setter + def domain(self, domain): + """Sets the domain of this DescribeMailServerDomainResult. + + + :param domain: The domain of this DescribeMailServerDomainResult. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and domain is None: # noqa: E501 + raise ValueError("Invalid value for `domain`, must not be `None`") # noqa: E501 + + self._domain = domain + + @property + def message(self): + """Gets the message of this DescribeMailServerDomainResult. # noqa: E501 + + + :return: The message of this DescribeMailServerDomainResult. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this DescribeMailServerDomainResult. + + + :param message: The message of this DescribeMailServerDomainResult. # noqa: E501 + :type: str + """ + + self._message = message + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DescribeMailServerDomainResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DescribeMailServerDomainResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/dns_lookup_options.py b/mailslurp_client/models/dns_lookup_options.py new file mode 100644 index 00000000..d8e6eaf2 --- /dev/null +++ b/mailslurp_client/models/dns_lookup_options.py @@ -0,0 +1,190 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class DNSLookupOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'hostname': 'str', + 'record_types': 'list[str]', + 'omit_final_dns_dot': 'bool' + } + + attribute_map = { + 'hostname': 'hostname', + 'record_types': 'recordTypes', + 'omit_final_dns_dot': 'omitFinalDNSDot' + } + + def __init__(self, hostname=None, record_types=None, omit_final_dns_dot=None, local_vars_configuration=None): # noqa: E501 + """DNSLookupOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._hostname = None + self._record_types = None + self._omit_final_dns_dot = None + self.discriminator = None + + self.hostname = hostname + self.record_types = record_types + self.omit_final_dns_dot = omit_final_dns_dot + + @property + def hostname(self): + """Gets the hostname of this DNSLookupOptions. # noqa: E501 + + List of record types you wish to query such as MX, DNS, TXT, NS, A etc. # noqa: E501 + + :return: The hostname of this DNSLookupOptions. # noqa: E501 + :rtype: str + """ + return self._hostname + + @hostname.setter + def hostname(self, hostname): + """Sets the hostname of this DNSLookupOptions. + + List of record types you wish to query such as MX, DNS, TXT, NS, A etc. # noqa: E501 + + :param hostname: The hostname of this DNSLookupOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and hostname is None: # noqa: E501 + raise ValueError("Invalid value for `hostname`, must not be `None`") # noqa: E501 + + self._hostname = hostname + + @property + def record_types(self): + """Gets the record_types of this DNSLookupOptions. # noqa: E501 + + List of record types you wish to query such as MX, DNS, TXT, NS, A etc. # noqa: E501 + + :return: The record_types of this DNSLookupOptions. # noqa: E501 + :rtype: list[str] + """ + return self._record_types + + @record_types.setter + def record_types(self, record_types): + """Sets the record_types of this DNSLookupOptions. + + List of record types you wish to query such as MX, DNS, TXT, NS, A etc. # noqa: E501 + + :param record_types: The record_types of this DNSLookupOptions. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and record_types is None: # noqa: E501 + raise ValueError("Invalid value for `record_types`, must not be `None`") # noqa: E501 + allowed_values = ["A", "NS", "MD", "MF", "CNAME", "SOA", "MB", "MG", "MR", "NULL", "WKS", "PTR", "HINFO", "MINFO", "MX", "TXT", "RP", "AFSDB", "X25", "ISDN", "RT", "NSAP", "NSAP_PTR", "SIG", "KEY", "PX", "GPOS", "AAAA", "LOC", "NXT", "EID", "NIMLOC", "SRV", "ATMA", "NAPTR", "KX", "CERT", "A6", "DNAME", "SINK", "OPT", "APL", "DS", "SSHFP", "IPSECKEY", "RRSIG", "NSEC", "DNSKEY", "DHCID", "NSEC3", "NSEC3PARAM", "TLSA", "SMIMEA", "HIP", "NINFO", "RKEY", "TALINK", "CDS", "CDNSKEY", "OPENPGPKEY", "CSYNC", "ZONEMD", "SVCB", "HTTPS", "SPF", "UINFO", "UID", "GID", "UNSPEC", "NID", "L32", "L64", "LP", "EUI48", "EUI64", "TKEY", "TSIG", "IXFR", "AXFR", "MAILB", "MAILA", "ANY", "URI", "CAA", "AVC", "DOA", "AMTRELAY", "TA", "DLV"] # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + not set(record_types).issubset(set(allowed_values))): # noqa: E501 + raise ValueError( + "Invalid values for `record_types` [{0}], must be a subset of [{1}]" # noqa: E501 + .format(", ".join(map(str, set(record_types) - set(allowed_values))), # noqa: E501 + ", ".join(map(str, allowed_values))) + ) + + self._record_types = record_types + + @property + def omit_final_dns_dot(self): + """Gets the omit_final_dns_dot of this DNSLookupOptions. # noqa: E501 + + Optionally control whether to omit the final dot in full DNS name values. # noqa: E501 + + :return: The omit_final_dns_dot of this DNSLookupOptions. # noqa: E501 + :rtype: bool + """ + return self._omit_final_dns_dot + + @omit_final_dns_dot.setter + def omit_final_dns_dot(self, omit_final_dns_dot): + """Sets the omit_final_dns_dot of this DNSLookupOptions. + + Optionally control whether to omit the final dot in full DNS name values. # noqa: E501 + + :param omit_final_dns_dot: The omit_final_dns_dot of this DNSLookupOptions. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and omit_final_dns_dot is None: # noqa: E501 + raise ValueError("Invalid value for `omit_final_dns_dot`, must not be `None`") # noqa: E501 + + self._omit_final_dns_dot = omit_final_dns_dot + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DNSLookupOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DNSLookupOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/dns_lookup_result.py b/mailslurp_client/models/dns_lookup_result.py new file mode 100644 index 00000000..9f76d2c2 --- /dev/null +++ b/mailslurp_client/models/dns_lookup_result.py @@ -0,0 +1,211 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class DNSLookupResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'record_type': 'str', + 'ttl': 'int', + 'record_entries': 'list[str]', + 'name': 'str' + } + + attribute_map = { + 'record_type': 'recordType', + 'ttl': 'ttl', + 'record_entries': 'recordEntries', + 'name': 'name' + } + + def __init__(self, record_type=None, ttl=None, record_entries=None, name=None, local_vars_configuration=None): # noqa: E501 + """DNSLookupResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._record_type = None + self._ttl = None + self._record_entries = None + self._name = None + self.discriminator = None + + self.record_type = record_type + self.ttl = ttl + self.record_entries = record_entries + self.name = name + + @property + def record_type(self): + """Gets the record_type of this DNSLookupResult. # noqa: E501 + + Domain Name Server Record Types # noqa: E501 + + :return: The record_type of this DNSLookupResult. # noqa: E501 + :rtype: str + """ + return self._record_type + + @record_type.setter + def record_type(self, record_type): + """Sets the record_type of this DNSLookupResult. + + Domain Name Server Record Types # noqa: E501 + + :param record_type: The record_type of this DNSLookupResult. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and record_type is None: # noqa: E501 + raise ValueError("Invalid value for `record_type`, must not be `None`") # noqa: E501 + allowed_values = ["A", "NS", "MD", "MF", "CNAME", "SOA", "MB", "MG", "MR", "NULL", "WKS", "PTR", "HINFO", "MINFO", "MX", "TXT", "RP", "AFSDB", "X25", "ISDN", "RT", "NSAP", "NSAP_PTR", "SIG", "KEY", "PX", "GPOS", "AAAA", "LOC", "NXT", "EID", "NIMLOC", "SRV", "ATMA", "NAPTR", "KX", "CERT", "A6", "DNAME", "SINK", "OPT", "APL", "DS", "SSHFP", "IPSECKEY", "RRSIG", "NSEC", "DNSKEY", "DHCID", "NSEC3", "NSEC3PARAM", "TLSA", "SMIMEA", "HIP", "NINFO", "RKEY", "TALINK", "CDS", "CDNSKEY", "OPENPGPKEY", "CSYNC", "ZONEMD", "SVCB", "HTTPS", "SPF", "UINFO", "UID", "GID", "UNSPEC", "NID", "L32", "L64", "LP", "EUI48", "EUI64", "TKEY", "TSIG", "IXFR", "AXFR", "MAILB", "MAILA", "ANY", "URI", "CAA", "AVC", "DOA", "AMTRELAY", "TA", "DLV"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and record_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `record_type` ({0}), must be one of {1}" # noqa: E501 + .format(record_type, allowed_values) + ) + + self._record_type = record_type + + @property + def ttl(self): + """Gets the ttl of this DNSLookupResult. # noqa: E501 + + + :return: The ttl of this DNSLookupResult. # noqa: E501 + :rtype: int + """ + return self._ttl + + @ttl.setter + def ttl(self, ttl): + """Sets the ttl of this DNSLookupResult. + + + :param ttl: The ttl of this DNSLookupResult. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and ttl is None: # noqa: E501 + raise ValueError("Invalid value for `ttl`, must not be `None`") # noqa: E501 + + self._ttl = ttl + + @property + def record_entries(self): + """Gets the record_entries of this DNSLookupResult. # noqa: E501 + + + :return: The record_entries of this DNSLookupResult. # noqa: E501 + :rtype: list[str] + """ + return self._record_entries + + @record_entries.setter + def record_entries(self, record_entries): + """Sets the record_entries of this DNSLookupResult. + + + :param record_entries: The record_entries of this DNSLookupResult. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and record_entries is None: # noqa: E501 + raise ValueError("Invalid value for `record_entries`, must not be `None`") # noqa: E501 + + self._record_entries = record_entries + + @property + def name(self): + """Gets the name of this DNSLookupResult. # noqa: E501 + + + :return: The name of this DNSLookupResult. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this DNSLookupResult. + + + :param name: The name of this DNSLookupResult. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DNSLookupResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DNSLookupResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/dns_lookup_results.py b/mailslurp_client/models/dns_lookup_results.py new file mode 100644 index 00000000..451f4bd7 --- /dev/null +++ b/mailslurp_client/models/dns_lookup_results.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class DNSLookupResults(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'results': 'list[DNSLookupResult]' + } + + attribute_map = { + 'results': 'results' + } + + def __init__(self, results=None, local_vars_configuration=None): # noqa: E501 + """DNSLookupResults - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._results = None + self.discriminator = None + + self.results = results + + @property + def results(self): + """Gets the results of this DNSLookupResults. # noqa: E501 + + + :return: The results of this DNSLookupResults. # noqa: E501 + :rtype: list[DNSLookupResult] + """ + return self._results + + @results.setter + def results(self, results): + """Sets the results of this DNSLookupResults. + + + :param results: The results of this DNSLookupResults. # noqa: E501 + :type: list[DNSLookupResult] + """ + if self.local_vars_configuration.client_side_validation and results is None: # noqa: E501 + raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501 + + self._results = results + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DNSLookupResults): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DNSLookupResults): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/domain_dto.py b/mailslurp_client/models/domain_dto.py new file mode 100644 index 00000000..2d9ca1db --- /dev/null +++ b/mailslurp_client/models/domain_dto.py @@ -0,0 +1,411 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class DomainDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'user_id': 'str', + 'domain': 'str', + 'verification_token': 'str', + 'dkim_tokens': 'list[str]', + 'is_verified': 'bool', + 'domain_name_records': 'list[DomainNameRecord]', + 'catch_all_inbox_id': 'str', + 'created_at': 'datetime', + 'updated_at': 'datetime', + 'domain_type': 'str' + } + + attribute_map = { + 'id': 'id', + 'user_id': 'userId', + 'domain': 'domain', + 'verification_token': 'verificationToken', + 'dkim_tokens': 'dkimTokens', + 'is_verified': 'isVerified', + 'domain_name_records': 'domainNameRecords', + 'catch_all_inbox_id': 'catchAllInboxId', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt', + 'domain_type': 'domainType' + } + + def __init__(self, id=None, user_id=None, domain=None, verification_token=None, dkim_tokens=None, is_verified=None, domain_name_records=None, catch_all_inbox_id=None, created_at=None, updated_at=None, domain_type=None, local_vars_configuration=None): # noqa: E501 + """DomainDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._user_id = None + self._domain = None + self._verification_token = None + self._dkim_tokens = None + self._is_verified = None + self._domain_name_records = None + self._catch_all_inbox_id = None + self._created_at = None + self._updated_at = None + self._domain_type = None + self.discriminator = None + + self.id = id + self.user_id = user_id + self.domain = domain + self.verification_token = verification_token + self.dkim_tokens = dkim_tokens + self.is_verified = is_verified + self.domain_name_records = domain_name_records + if catch_all_inbox_id is not None: + self.catch_all_inbox_id = catch_all_inbox_id + self.created_at = created_at + self.updated_at = updated_at + self.domain_type = domain_type + + @property + def id(self): + """Gets the id of this DomainDto. # noqa: E501 + + + :return: The id of this DomainDto. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this DomainDto. + + + :param id: The id of this DomainDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def user_id(self): + """Gets the user_id of this DomainDto. # noqa: E501 + + + :return: The user_id of this DomainDto. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this DomainDto. + + + :param user_id: The user_id of this DomainDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def domain(self): + """Gets the domain of this DomainDto. # noqa: E501 + + Custom domain name # noqa: E501 + + :return: The domain of this DomainDto. # noqa: E501 + :rtype: str + """ + return self._domain + + @domain.setter + def domain(self, domain): + """Sets the domain of this DomainDto. + + Custom domain name # noqa: E501 + + :param domain: The domain of this DomainDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and domain is None: # noqa: E501 + raise ValueError("Invalid value for `domain`, must not be `None`") # noqa: E501 + + self._domain = domain + + @property + def verification_token(self): + """Gets the verification_token of this DomainDto. # noqa: E501 + + Verification tokens # noqa: E501 + + :return: The verification_token of this DomainDto. # noqa: E501 + :rtype: str + """ + return self._verification_token + + @verification_token.setter + def verification_token(self, verification_token): + """Sets the verification_token of this DomainDto. + + Verification tokens # noqa: E501 + + :param verification_token: The verification_token of this DomainDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and verification_token is None: # noqa: E501 + raise ValueError("Invalid value for `verification_token`, must not be `None`") # noqa: E501 + + self._verification_token = verification_token + + @property + def dkim_tokens(self): + """Gets the dkim_tokens of this DomainDto. # noqa: E501 + + Unique token DKIM tokens # noqa: E501 + + :return: The dkim_tokens of this DomainDto. # noqa: E501 + :rtype: list[str] + """ + return self._dkim_tokens + + @dkim_tokens.setter + def dkim_tokens(self, dkim_tokens): + """Sets the dkim_tokens of this DomainDto. + + Unique token DKIM tokens # noqa: E501 + + :param dkim_tokens: The dkim_tokens of this DomainDto. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and dkim_tokens is None: # noqa: E501 + raise ValueError("Invalid value for `dkim_tokens`, must not be `None`") # noqa: E501 + + self._dkim_tokens = dkim_tokens + + @property + def is_verified(self): + """Gets the is_verified of this DomainDto. # noqa: E501 + + Whether domain has been verified or not. If the domain is not verified after 72 hours there is most likely an issue with the domains DNS records. # noqa: E501 + + :return: The is_verified of this DomainDto. # noqa: E501 + :rtype: bool + """ + return self._is_verified + + @is_verified.setter + def is_verified(self, is_verified): + """Sets the is_verified of this DomainDto. + + Whether domain has been verified or not. If the domain is not verified after 72 hours there is most likely an issue with the domains DNS records. # noqa: E501 + + :param is_verified: The is_verified of this DomainDto. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and is_verified is None: # noqa: E501 + raise ValueError("Invalid value for `is_verified`, must not be `None`") # noqa: E501 + + self._is_verified = is_verified + + @property + def domain_name_records(self): + """Gets the domain_name_records of this DomainDto. # noqa: E501 + + List of DNS domain name records (C, MX, TXT) etc that you must add to the DNS server associated with your domain provider. # noqa: E501 + + :return: The domain_name_records of this DomainDto. # noqa: E501 + :rtype: list[DomainNameRecord] + """ + return self._domain_name_records + + @domain_name_records.setter + def domain_name_records(self, domain_name_records): + """Sets the domain_name_records of this DomainDto. + + List of DNS domain name records (C, MX, TXT) etc that you must add to the DNS server associated with your domain provider. # noqa: E501 + + :param domain_name_records: The domain_name_records of this DomainDto. # noqa: E501 + :type: list[DomainNameRecord] + """ + if self.local_vars_configuration.client_side_validation and domain_name_records is None: # noqa: E501 + raise ValueError("Invalid value for `domain_name_records`, must not be `None`") # noqa: E501 + + self._domain_name_records = domain_name_records + + @property + def catch_all_inbox_id(self): + """Gets the catch_all_inbox_id of this DomainDto. # noqa: E501 + + The optional catch all inbox that will receive emails sent to the domain that cannot be matched. # noqa: E501 + + :return: The catch_all_inbox_id of this DomainDto. # noqa: E501 + :rtype: str + """ + return self._catch_all_inbox_id + + @catch_all_inbox_id.setter + def catch_all_inbox_id(self, catch_all_inbox_id): + """Sets the catch_all_inbox_id of this DomainDto. + + The optional catch all inbox that will receive emails sent to the domain that cannot be matched. # noqa: E501 + + :param catch_all_inbox_id: The catch_all_inbox_id of this DomainDto. # noqa: E501 + :type: str + """ + + self._catch_all_inbox_id = catch_all_inbox_id + + @property + def created_at(self): + """Gets the created_at of this DomainDto. # noqa: E501 + + + :return: The created_at of this DomainDto. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this DomainDto. + + + :param created_at: The created_at of this DomainDto. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + @property + def updated_at(self): + """Gets the updated_at of this DomainDto. # noqa: E501 + + + :return: The updated_at of this DomainDto. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this DomainDto. + + + :param updated_at: The updated_at of this DomainDto. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and updated_at is None: # noqa: E501 + raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501 + + self._updated_at = updated_at + + @property + def domain_type(self): + """Gets the domain_type of this DomainDto. # noqa: E501 + + Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails. # noqa: E501 + + :return: The domain_type of this DomainDto. # noqa: E501 + :rtype: str + """ + return self._domain_type + + @domain_type.setter + def domain_type(self, domain_type): + """Sets the domain_type of this DomainDto. + + Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails. # noqa: E501 + + :param domain_type: The domain_type of this DomainDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and domain_type is None: # noqa: E501 + raise ValueError("Invalid value for `domain_type`, must not be `None`") # noqa: E501 + allowed_values = ["HTTP_INBOX", "SMTP_DOMAIN"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and domain_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `domain_type` ({0}), must be one of {1}" # noqa: E501 + .format(domain_type, allowed_values) + ) + + self._domain_type = domain_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DomainDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DomainDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/domain_name_record.py b/mailslurp_client/models/domain_name_record.py new file mode 100644 index 00000000..a48e540d --- /dev/null +++ b/mailslurp_client/models/domain_name_record.py @@ -0,0 +1,211 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class DomainNameRecord(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'record_type': 'str', + 'name': 'str', + 'record_entries': 'list[str]', + 'ttl': 'int' + } + + attribute_map = { + 'record_type': 'recordType', + 'name': 'name', + 'record_entries': 'recordEntries', + 'ttl': 'ttl' + } + + def __init__(self, record_type=None, name=None, record_entries=None, ttl=None, local_vars_configuration=None): # noqa: E501 + """DomainNameRecord - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._record_type = None + self._name = None + self._record_entries = None + self._ttl = None + self.discriminator = None + + self.record_type = record_type + self.name = name + self.record_entries = record_entries + self.ttl = ttl + + @property + def record_type(self): + """Gets the record_type of this DomainNameRecord. # noqa: E501 + + Domain Name Server Record Types # noqa: E501 + + :return: The record_type of this DomainNameRecord. # noqa: E501 + :rtype: str + """ + return self._record_type + + @record_type.setter + def record_type(self, record_type): + """Sets the record_type of this DomainNameRecord. + + Domain Name Server Record Types # noqa: E501 + + :param record_type: The record_type of this DomainNameRecord. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and record_type is None: # noqa: E501 + raise ValueError("Invalid value for `record_type`, must not be `None`") # noqa: E501 + allowed_values = ["A", "NS", "MD", "MF", "CNAME", "SOA", "MB", "MG", "MR", "NULL", "WKS", "PTR", "HINFO", "MINFO", "MX", "TXT", "RP", "AFSDB", "X25", "ISDN", "RT", "NSAP", "NSAP_PTR", "SIG", "KEY", "PX", "GPOS", "AAAA", "LOC", "NXT", "EID", "NIMLOC", "SRV", "ATMA", "NAPTR", "KX", "CERT", "A6", "DNAME", "SINK", "OPT", "APL", "DS", "SSHFP", "IPSECKEY", "RRSIG", "NSEC", "DNSKEY", "DHCID", "NSEC3", "NSEC3PARAM", "TLSA", "SMIMEA", "HIP", "NINFO", "RKEY", "TALINK", "CDS", "CDNSKEY", "OPENPGPKEY", "CSYNC", "ZONEMD", "SVCB", "HTTPS", "SPF", "UINFO", "UID", "GID", "UNSPEC", "NID", "L32", "L64", "LP", "EUI48", "EUI64", "TKEY", "TSIG", "IXFR", "AXFR", "MAILB", "MAILA", "ANY", "URI", "CAA", "AVC", "DOA", "AMTRELAY", "TA", "DLV"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and record_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `record_type` ({0}), must be one of {1}" # noqa: E501 + .format(record_type, allowed_values) + ) + + self._record_type = record_type + + @property + def name(self): + """Gets the name of this DomainNameRecord. # noqa: E501 + + + :return: The name of this DomainNameRecord. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this DomainNameRecord. + + + :param name: The name of this DomainNameRecord. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def record_entries(self): + """Gets the record_entries of this DomainNameRecord. # noqa: E501 + + + :return: The record_entries of this DomainNameRecord. # noqa: E501 + :rtype: list[str] + """ + return self._record_entries + + @record_entries.setter + def record_entries(self, record_entries): + """Sets the record_entries of this DomainNameRecord. + + + :param record_entries: The record_entries of this DomainNameRecord. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and record_entries is None: # noqa: E501 + raise ValueError("Invalid value for `record_entries`, must not be `None`") # noqa: E501 + + self._record_entries = record_entries + + @property + def ttl(self): + """Gets the ttl of this DomainNameRecord. # noqa: E501 + + + :return: The ttl of this DomainNameRecord. # noqa: E501 + :rtype: int + """ + return self._ttl + + @ttl.setter + def ttl(self, ttl): + """Sets the ttl of this DomainNameRecord. + + + :param ttl: The ttl of this DomainNameRecord. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and ttl is None: # noqa: E501 + raise ValueError("Invalid value for `ttl`, must not be `None`") # noqa: E501 + + self._ttl = ttl + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DomainNameRecord): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DomainNameRecord): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/domain_preview.py b/mailslurp_client/models/domain_preview.py new file mode 100644 index 00000000..83c924f3 --- /dev/null +++ b/mailslurp_client/models/domain_preview.py @@ -0,0 +1,264 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class DomainPreview(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'domain': 'str', + 'catch_all_inbox_id': 'str', + 'created_at': 'datetime', + 'domain_type': 'str', + 'is_verified': 'bool' + } + + attribute_map = { + 'id': 'id', + 'domain': 'domain', + 'catch_all_inbox_id': 'catchAllInboxId', + 'created_at': 'createdAt', + 'domain_type': 'domainType', + 'is_verified': 'isVerified' + } + + def __init__(self, id=None, domain=None, catch_all_inbox_id=None, created_at=None, domain_type=None, is_verified=None, local_vars_configuration=None): # noqa: E501 + """DomainPreview - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._domain = None + self._catch_all_inbox_id = None + self._created_at = None + self._domain_type = None + self._is_verified = None + self.discriminator = None + + self.id = id + self.domain = domain + if catch_all_inbox_id is not None: + self.catch_all_inbox_id = catch_all_inbox_id + self.created_at = created_at + self.domain_type = domain_type + self.is_verified = is_verified + + @property + def id(self): + """Gets the id of this DomainPreview. # noqa: E501 + + + :return: The id of this DomainPreview. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this DomainPreview. + + + :param id: The id of this DomainPreview. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def domain(self): + """Gets the domain of this DomainPreview. # noqa: E501 + + + :return: The domain of this DomainPreview. # noqa: E501 + :rtype: str + """ + return self._domain + + @domain.setter + def domain(self, domain): + """Sets the domain of this DomainPreview. + + + :param domain: The domain of this DomainPreview. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and domain is None: # noqa: E501 + raise ValueError("Invalid value for `domain`, must not be `None`") # noqa: E501 + + self._domain = domain + + @property + def catch_all_inbox_id(self): + """Gets the catch_all_inbox_id of this DomainPreview. # noqa: E501 + + + :return: The catch_all_inbox_id of this DomainPreview. # noqa: E501 + :rtype: str + """ + return self._catch_all_inbox_id + + @catch_all_inbox_id.setter + def catch_all_inbox_id(self, catch_all_inbox_id): + """Sets the catch_all_inbox_id of this DomainPreview. + + + :param catch_all_inbox_id: The catch_all_inbox_id of this DomainPreview. # noqa: E501 + :type: str + """ + + self._catch_all_inbox_id = catch_all_inbox_id + + @property + def created_at(self): + """Gets the created_at of this DomainPreview. # noqa: E501 + + + :return: The created_at of this DomainPreview. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this DomainPreview. + + + :param created_at: The created_at of this DomainPreview. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + @property + def domain_type(self): + """Gets the domain_type of this DomainPreview. # noqa: E501 + + Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails. # noqa: E501 + + :return: The domain_type of this DomainPreview. # noqa: E501 + :rtype: str + """ + return self._domain_type + + @domain_type.setter + def domain_type(self, domain_type): + """Sets the domain_type of this DomainPreview. + + Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails. # noqa: E501 + + :param domain_type: The domain_type of this DomainPreview. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and domain_type is None: # noqa: E501 + raise ValueError("Invalid value for `domain_type`, must not be `None`") # noqa: E501 + allowed_values = ["HTTP_INBOX", "SMTP_DOMAIN"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and domain_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `domain_type` ({0}), must be one of {1}" # noqa: E501 + .format(domain_type, allowed_values) + ) + + self._domain_type = domain_type + + @property + def is_verified(self): + """Gets the is_verified of this DomainPreview. # noqa: E501 + + + :return: The is_verified of this DomainPreview. # noqa: E501 + :rtype: bool + """ + return self._is_verified + + @is_verified.setter + def is_verified(self, is_verified): + """Sets the is_verified of this DomainPreview. + + + :param is_verified: The is_verified of this DomainPreview. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and is_verified is None: # noqa: E501 + raise ValueError("Invalid value for `is_verified`, must not be `None`") # noqa: E501 + + self._is_verified = is_verified + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DomainPreview): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DomainPreview): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/download_attachment_dto.py b/mailslurp_client/models/download_attachment_dto.py new file mode 100644 index 00000000..02511da4 --- /dev/null +++ b/mailslurp_client/models/download_attachment_dto.py @@ -0,0 +1,182 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class DownloadAttachmentDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'base64_file_contents': 'str', + 'content_type': 'str', + 'size_bytes': 'int' + } + + attribute_map = { + 'base64_file_contents': 'base64FileContents', + 'content_type': 'contentType', + 'size_bytes': 'sizeBytes' + } + + def __init__(self, base64_file_contents=None, content_type=None, size_bytes=None, local_vars_configuration=None): # noqa: E501 + """DownloadAttachmentDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._base64_file_contents = None + self._content_type = None + self._size_bytes = None + self.discriminator = None + + self.base64_file_contents = base64_file_contents + self.content_type = content_type + self.size_bytes = size_bytes + + @property + def base64_file_contents(self): + """Gets the base64_file_contents of this DownloadAttachmentDto. # noqa: E501 + + Base64 encoded string of attachment bytes. Decode the base64 encoded string to get the raw contents. If the file has a content type such as `text/html` you can read the contents directly by converting it to string using `utf-8` encoding. # noqa: E501 + + :return: The base64_file_contents of this DownloadAttachmentDto. # noqa: E501 + :rtype: str + """ + return self._base64_file_contents + + @base64_file_contents.setter + def base64_file_contents(self, base64_file_contents): + """Sets the base64_file_contents of this DownloadAttachmentDto. + + Base64 encoded string of attachment bytes. Decode the base64 encoded string to get the raw contents. If the file has a content type such as `text/html` you can read the contents directly by converting it to string using `utf-8` encoding. # noqa: E501 + + :param base64_file_contents: The base64_file_contents of this DownloadAttachmentDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and base64_file_contents is None: # noqa: E501 + raise ValueError("Invalid value for `base64_file_contents`, must not be `None`") # noqa: E501 + + self._base64_file_contents = base64_file_contents + + @property + def content_type(self): + """Gets the content_type of this DownloadAttachmentDto. # noqa: E501 + + Content type of attachment. Examples are `image/png`, `application/msword`, `text/csv` etc. # noqa: E501 + + :return: The content_type of this DownloadAttachmentDto. # noqa: E501 + :rtype: str + """ + return self._content_type + + @content_type.setter + def content_type(self, content_type): + """Sets the content_type of this DownloadAttachmentDto. + + Content type of attachment. Examples are `image/png`, `application/msword`, `text/csv` etc. # noqa: E501 + + :param content_type: The content_type of this DownloadAttachmentDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and content_type is None: # noqa: E501 + raise ValueError("Invalid value for `content_type`, must not be `None`") # noqa: E501 + + self._content_type = content_type + + @property + def size_bytes(self): + """Gets the size_bytes of this DownloadAttachmentDto. # noqa: E501 + + Size in bytes of attachment content # noqa: E501 + + :return: The size_bytes of this DownloadAttachmentDto. # noqa: E501 + :rtype: int + """ + return self._size_bytes + + @size_bytes.setter + def size_bytes(self, size_bytes): + """Sets the size_bytes of this DownloadAttachmentDto. + + Size in bytes of attachment content # noqa: E501 + + :param size_bytes: The size_bytes of this DownloadAttachmentDto. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and size_bytes is None: # noqa: E501 + raise ValueError("Invalid value for `size_bytes`, must not be `None`") # noqa: E501 + + self._size_bytes = size_bytes + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DownloadAttachmentDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DownloadAttachmentDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/email.py b/mailslurp_client/models/email.py new file mode 100644 index 00000000..b3b39f5d --- /dev/null +++ b/mailslurp_client/models/email.py @@ -0,0 +1,780 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class Email(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'user_id': 'str', + 'inbox_id': 'str', + 'domain_id': 'str', + 'to': 'list[str]', + '_from': 'str', + 'sender': 'Sender', + 'recipients': 'EmailRecipients', + 'reply_to': 'str', + 'cc': 'list[str]', + 'bcc': 'list[str]', + 'headers': 'dict(str, str)', + 'attachments': 'list[str]', + 'subject': 'str', + 'body': 'str', + 'body_excerpt': 'str', + 'body_md5_hash': 'str', + 'is_html': 'bool', + 'charset': 'str', + 'analysis': 'EmailAnalysis', + 'created_at': 'datetime', + 'updated_at': 'datetime', + 'read': 'bool', + 'team_access': 'bool', + 'html': 'bool' + } + + attribute_map = { + 'id': 'id', + 'user_id': 'userId', + 'inbox_id': 'inboxId', + 'domain_id': 'domainId', + 'to': 'to', + '_from': 'from', + 'sender': 'sender', + 'recipients': 'recipients', + 'reply_to': 'replyTo', + 'cc': 'cc', + 'bcc': 'bcc', + 'headers': 'headers', + 'attachments': 'attachments', + 'subject': 'subject', + 'body': 'body', + 'body_excerpt': 'bodyExcerpt', + 'body_md5_hash': 'bodyMD5Hash', + 'is_html': 'isHTML', + 'charset': 'charset', + 'analysis': 'analysis', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt', + 'read': 'read', + 'team_access': 'teamAccess', + 'html': 'html' + } + + def __init__(self, id=None, user_id=None, inbox_id=None, domain_id=None, to=None, _from=None, sender=None, recipients=None, reply_to=None, cc=None, bcc=None, headers=None, attachments=None, subject=None, body=None, body_excerpt=None, body_md5_hash=None, is_html=None, charset=None, analysis=None, created_at=None, updated_at=None, read=None, team_access=None, html=None, local_vars_configuration=None): # noqa: E501 + """Email - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._user_id = None + self._inbox_id = None + self._domain_id = None + self._to = None + self.__from = None + self._sender = None + self._recipients = None + self._reply_to = None + self._cc = None + self._bcc = None + self._headers = None + self._attachments = None + self._subject = None + self._body = None + self._body_excerpt = None + self._body_md5_hash = None + self._is_html = None + self._charset = None + self._analysis = None + self._created_at = None + self._updated_at = None + self._read = None + self._team_access = None + self._html = None + self.discriminator = None + + self.id = id + self.user_id = user_id + self.inbox_id = inbox_id + if domain_id is not None: + self.domain_id = domain_id + self.to = to + self._from = _from + self.sender = sender + self.recipients = recipients + self.reply_to = reply_to + self.cc = cc + self.bcc = bcc + self.headers = headers + self.attachments = attachments + self.subject = subject + self.body = body + self.body_excerpt = body_excerpt + self.body_md5_hash = body_md5_hash + self.is_html = is_html + self.charset = charset + self.analysis = analysis + self.created_at = created_at + self.updated_at = updated_at + self.read = read + self.team_access = team_access + if html is not None: + self.html = html + + @property + def id(self): + """Gets the id of this Email. # noqa: E501 + + ID of the email entity # noqa: E501 + + :return: The id of this Email. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this Email. + + ID of the email entity # noqa: E501 + + :param id: The id of this Email. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def user_id(self): + """Gets the user_id of this Email. # noqa: E501 + + ID of user that email belongs to # noqa: E501 + + :return: The user_id of this Email. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this Email. + + ID of user that email belongs to # noqa: E501 + + :param user_id: The user_id of this Email. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def inbox_id(self): + """Gets the inbox_id of this Email. # noqa: E501 + + ID of the inbox that received the email # noqa: E501 + + :return: The inbox_id of this Email. # noqa: E501 + :rtype: str + """ + return self._inbox_id + + @inbox_id.setter + def inbox_id(self, inbox_id): + """Sets the inbox_id of this Email. + + ID of the inbox that received the email # noqa: E501 + + :param inbox_id: The inbox_id of this Email. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and inbox_id is None: # noqa: E501 + raise ValueError("Invalid value for `inbox_id`, must not be `None`") # noqa: E501 + + self._inbox_id = inbox_id + + @property + def domain_id(self): + """Gets the domain_id of this Email. # noqa: E501 + + ID of the domain that received the email # noqa: E501 + + :return: The domain_id of this Email. # noqa: E501 + :rtype: str + """ + return self._domain_id + + @domain_id.setter + def domain_id(self, domain_id): + """Sets the domain_id of this Email. + + ID of the domain that received the email # noqa: E501 + + :param domain_id: The domain_id of this Email. # noqa: E501 + :type: str + """ + + self._domain_id = domain_id + + @property + def to(self): + """Gets the to of this Email. # noqa: E501 + + List of `To` recipient email addresses that the email was addressed to. See recipients object for names. # noqa: E501 + + :return: The to of this Email. # noqa: E501 + :rtype: list[str] + """ + return self._to + + @to.setter + def to(self, to): + """Sets the to of this Email. + + List of `To` recipient email addresses that the email was addressed to. See recipients object for names. # noqa: E501 + + :param to: The to of this Email. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and to is None: # noqa: E501 + raise ValueError("Invalid value for `to`, must not be `None`") # noqa: E501 + + self._to = to + + @property + def _from(self): + """Gets the _from of this Email. # noqa: E501 + + Who the email was sent from. An email address - see fromName for the sender name. # noqa: E501 + + :return: The _from of this Email. # noqa: E501 + :rtype: str + """ + return self.__from + + @_from.setter + def _from(self, _from): + """Sets the _from of this Email. + + Who the email was sent from. An email address - see fromName for the sender name. # noqa: E501 + + :param _from: The _from of this Email. # noqa: E501 + :type: str + """ + + self.__from = _from + + @property + def sender(self): + """Gets the sender of this Email. # noqa: E501 + + + :return: The sender of this Email. # noqa: E501 + :rtype: Sender + """ + return self._sender + + @sender.setter + def sender(self, sender): + """Sets the sender of this Email. + + + :param sender: The sender of this Email. # noqa: E501 + :type: Sender + """ + + self._sender = sender + + @property + def recipients(self): + """Gets the recipients of this Email. # noqa: E501 + + + :return: The recipients of this Email. # noqa: E501 + :rtype: EmailRecipients + """ + return self._recipients + + @recipients.setter + def recipients(self, recipients): + """Sets the recipients of this Email. + + + :param recipients: The recipients of this Email. # noqa: E501 + :type: EmailRecipients + """ + + self._recipients = recipients + + @property + def reply_to(self): + """Gets the reply_to of this Email. # noqa: E501 + + The `replyTo` field on the received email message # noqa: E501 + + :return: The reply_to of this Email. # noqa: E501 + :rtype: str + """ + return self._reply_to + + @reply_to.setter + def reply_to(self, reply_to): + """Sets the reply_to of this Email. + + The `replyTo` field on the received email message # noqa: E501 + + :param reply_to: The reply_to of this Email. # noqa: E501 + :type: str + """ + + self._reply_to = reply_to + + @property + def cc(self): + """Gets the cc of this Email. # noqa: E501 + + List of `CC` recipients email addresses that the email was addressed to. See recipients object for names. # noqa: E501 + + :return: The cc of this Email. # noqa: E501 + :rtype: list[str] + """ + return self._cc + + @cc.setter + def cc(self, cc): + """Sets the cc of this Email. + + List of `CC` recipients email addresses that the email was addressed to. See recipients object for names. # noqa: E501 + + :param cc: The cc of this Email. # noqa: E501 + :type: list[str] + """ + + self._cc = cc + + @property + def bcc(self): + """Gets the bcc of this Email. # noqa: E501 + + List of `BCC` recipients email addresses that the email was addressed to. See recipients object for names. # noqa: E501 + + :return: The bcc of this Email. # noqa: E501 + :rtype: list[str] + """ + return self._bcc + + @bcc.setter + def bcc(self, bcc): + """Sets the bcc of this Email. + + List of `BCC` recipients email addresses that the email was addressed to. See recipients object for names. # noqa: E501 + + :param bcc: The bcc of this Email. # noqa: E501 + :type: list[str] + """ + + self._bcc = bcc + + @property + def headers(self): + """Gets the headers of this Email. # noqa: E501 + + Collection of SMTP headers attached to email # noqa: E501 + + :return: The headers of this Email. # noqa: E501 + :rtype: dict(str, str) + """ + return self._headers + + @headers.setter + def headers(self, headers): + """Sets the headers of this Email. + + Collection of SMTP headers attached to email # noqa: E501 + + :param headers: The headers of this Email. # noqa: E501 + :type: dict(str, str) + """ + + self._headers = headers + + @property + def attachments(self): + """Gets the attachments of this Email. # noqa: E501 + + List of IDs of attachments found in the email. Use these IDs with the Inbox and Email Controllers to download attachments and attachment meta data such as filesize, name, extension. # noqa: E501 + + :return: The attachments of this Email. # noqa: E501 + :rtype: list[str] + """ + return self._attachments + + @attachments.setter + def attachments(self, attachments): + """Sets the attachments of this Email. + + List of IDs of attachments found in the email. Use these IDs with the Inbox and Email Controllers to download attachments and attachment meta data such as filesize, name, extension. # noqa: E501 + + :param attachments: The attachments of this Email. # noqa: E501 + :type: list[str] + """ + + self._attachments = attachments + + @property + def subject(self): + """Gets the subject of this Email. # noqa: E501 + + The subject line of the email message as specified by SMTP subject header # noqa: E501 + + :return: The subject of this Email. # noqa: E501 + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this Email. + + The subject line of the email message as specified by SMTP subject header # noqa: E501 + + :param subject: The subject of this Email. # noqa: E501 + :type: str + """ + + self._subject = subject + + @property + def body(self): + """Gets the body of this Email. # noqa: E501 + + The body of the email message as text parsed from the SMTP message body (does not include attachments). Fetch the raw content to access the SMTP message and use the attachments property to access attachments. The body is stored separately to the email entity so the body is not returned in paginated results only in full single email or wait requests. # noqa: E501 + + :return: The body of this Email. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this Email. + + The body of the email message as text parsed from the SMTP message body (does not include attachments). Fetch the raw content to access the SMTP message and use the attachments property to access attachments. The body is stored separately to the email entity so the body is not returned in paginated results only in full single email or wait requests. # noqa: E501 + + :param body: The body of this Email. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def body_excerpt(self): + """Gets the body_excerpt of this Email. # noqa: E501 + + An excerpt of the body of the email message for quick preview . # noqa: E501 + + :return: The body_excerpt of this Email. # noqa: E501 + :rtype: str + """ + return self._body_excerpt + + @body_excerpt.setter + def body_excerpt(self, body_excerpt): + """Sets the body_excerpt of this Email. + + An excerpt of the body of the email message for quick preview . # noqa: E501 + + :param body_excerpt: The body_excerpt of this Email. # noqa: E501 + :type: str + """ + + self._body_excerpt = body_excerpt + + @property + def body_md5_hash(self): + """Gets the body_md5_hash of this Email. # noqa: E501 + + A hash signature of the email message using MD5. Useful for comparing emails without fetching full body. # noqa: E501 + + :return: The body_md5_hash of this Email. # noqa: E501 + :rtype: str + """ + return self._body_md5_hash + + @body_md5_hash.setter + def body_md5_hash(self, body_md5_hash): + """Sets the body_md5_hash of this Email. + + A hash signature of the email message using MD5. Useful for comparing emails without fetching full body. # noqa: E501 + + :param body_md5_hash: The body_md5_hash of this Email. # noqa: E501 + :type: str + """ + + self._body_md5_hash = body_md5_hash + + @property + def is_html(self): + """Gets the is_html of this Email. # noqa: E501 + + Is the email body content type HTML? # noqa: E501 + + :return: The is_html of this Email. # noqa: E501 + :rtype: bool + """ + return self._is_html + + @is_html.setter + def is_html(self, is_html): + """Sets the is_html of this Email. + + Is the email body content type HTML? # noqa: E501 + + :param is_html: The is_html of this Email. # noqa: E501 + :type: bool + """ + + self._is_html = is_html + + @property + def charset(self): + """Gets the charset of this Email. # noqa: E501 + + Detected character set of the email body such as UTF-8 # noqa: E501 + + :return: The charset of this Email. # noqa: E501 + :rtype: str + """ + return self._charset + + @charset.setter + def charset(self, charset): + """Sets the charset of this Email. + + Detected character set of the email body such as UTF-8 # noqa: E501 + + :param charset: The charset of this Email. # noqa: E501 + :type: str + """ + + self._charset = charset + + @property + def analysis(self): + """Gets the analysis of this Email. # noqa: E501 + + + :return: The analysis of this Email. # noqa: E501 + :rtype: EmailAnalysis + """ + return self._analysis + + @analysis.setter + def analysis(self, analysis): + """Sets the analysis of this Email. + + + :param analysis: The analysis of this Email. # noqa: E501 + :type: EmailAnalysis + """ + + self._analysis = analysis + + @property + def created_at(self): + """Gets the created_at of this Email. # noqa: E501 + + When was the email received by MailSlurp # noqa: E501 + + :return: The created_at of this Email. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Email. + + When was the email received by MailSlurp # noqa: E501 + + :param created_at: The created_at of this Email. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + @property + def updated_at(self): + """Gets the updated_at of this Email. # noqa: E501 + + When was the email last updated # noqa: E501 + + :return: The updated_at of this Email. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this Email. + + When was the email last updated # noqa: E501 + + :param updated_at: The updated_at of this Email. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and updated_at is None: # noqa: E501 + raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501 + + self._updated_at = updated_at + + @property + def read(self): + """Gets the read of this Email. # noqa: E501 + + Read flag. Has the email ever been viewed in the dashboard or fetched via the API with a hydrated body? If so the email is marked as read. Paginated results do not affect read status. Read status is different to email opened event as it depends on your own account accessing the email. Email opened is determined by tracking pixels sent to other uses if enable during sending. You can listened for both email read and email opened events using webhooks. # noqa: E501 + + :return: The read of this Email. # noqa: E501 + :rtype: bool + """ + return self._read + + @read.setter + def read(self, read): + """Sets the read of this Email. + + Read flag. Has the email ever been viewed in the dashboard or fetched via the API with a hydrated body? If so the email is marked as read. Paginated results do not affect read status. Read status is different to email opened event as it depends on your own account accessing the email. Email opened is determined by tracking pixels sent to other uses if enable during sending. You can listened for both email read and email opened events using webhooks. # noqa: E501 + + :param read: The read of this Email. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and read is None: # noqa: E501 + raise ValueError("Invalid value for `read`, must not be `None`") # noqa: E501 + + self._read = read + + @property + def team_access(self): + """Gets the team_access of this Email. # noqa: E501 + + Can the email be accessed by organization team members # noqa: E501 + + :return: The team_access of this Email. # noqa: E501 + :rtype: bool + """ + return self._team_access + + @team_access.setter + def team_access(self, team_access): + """Sets the team_access of this Email. + + Can the email be accessed by organization team members # noqa: E501 + + :param team_access: The team_access of this Email. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and team_access is None: # noqa: E501 + raise ValueError("Invalid value for `team_access`, must not be `None`") # noqa: E501 + + self._team_access = team_access + + @property + def html(self): + """Gets the html of this Email. # noqa: E501 + + + :return: The html of this Email. # noqa: E501 + :rtype: bool + """ + return self._html + + @html.setter + def html(self, html): + """Sets the html of this Email. + + + :param html: The html of this Email. # noqa: E501 + :type: bool + """ + + self._html = html + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Email): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Email): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/email_analysis.py b/mailslurp_client/models/email_analysis.py new file mode 100644 index 00000000..092ff465 --- /dev/null +++ b/mailslurp_client/models/email_analysis.py @@ -0,0 +1,230 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class EmailAnalysis(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'spam_verdict': 'str', + 'virus_verdict': 'str', + 'spf_verdict': 'str', + 'dkim_verdict': 'str', + 'dmarc_verdict': 'str' + } + + attribute_map = { + 'spam_verdict': 'spamVerdict', + 'virus_verdict': 'virusVerdict', + 'spf_verdict': 'spfVerdict', + 'dkim_verdict': 'dkimVerdict', + 'dmarc_verdict': 'dmarcVerdict' + } + + def __init__(self, spam_verdict=None, virus_verdict=None, spf_verdict=None, dkim_verdict=None, dmarc_verdict=None, local_vars_configuration=None): # noqa: E501 + """EmailAnalysis - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._spam_verdict = None + self._virus_verdict = None + self._spf_verdict = None + self._dkim_verdict = None + self._dmarc_verdict = None + self.discriminator = None + + self.spam_verdict = spam_verdict + self.virus_verdict = virus_verdict + self.spf_verdict = spf_verdict + self.dkim_verdict = dkim_verdict + self.dmarc_verdict = dmarc_verdict + + @property + def spam_verdict(self): + """Gets the spam_verdict of this EmailAnalysis. # noqa: E501 + + Verdict of spam ranking analysis # noqa: E501 + + :return: The spam_verdict of this EmailAnalysis. # noqa: E501 + :rtype: str + """ + return self._spam_verdict + + @spam_verdict.setter + def spam_verdict(self, spam_verdict): + """Sets the spam_verdict of this EmailAnalysis. + + Verdict of spam ranking analysis # noqa: E501 + + :param spam_verdict: The spam_verdict of this EmailAnalysis. # noqa: E501 + :type: str + """ + + self._spam_verdict = spam_verdict + + @property + def virus_verdict(self): + """Gets the virus_verdict of this EmailAnalysis. # noqa: E501 + + Verdict of virus scan analysis # noqa: E501 + + :return: The virus_verdict of this EmailAnalysis. # noqa: E501 + :rtype: str + """ + return self._virus_verdict + + @virus_verdict.setter + def virus_verdict(self, virus_verdict): + """Sets the virus_verdict of this EmailAnalysis. + + Verdict of virus scan analysis # noqa: E501 + + :param virus_verdict: The virus_verdict of this EmailAnalysis. # noqa: E501 + :type: str + """ + + self._virus_verdict = virus_verdict + + @property + def spf_verdict(self): + """Gets the spf_verdict of this EmailAnalysis. # noqa: E501 + + Verdict of Send Policy Framework record spoofing analysis # noqa: E501 + + :return: The spf_verdict of this EmailAnalysis. # noqa: E501 + :rtype: str + """ + return self._spf_verdict + + @spf_verdict.setter + def spf_verdict(self, spf_verdict): + """Sets the spf_verdict of this EmailAnalysis. + + Verdict of Send Policy Framework record spoofing analysis # noqa: E501 + + :param spf_verdict: The spf_verdict of this EmailAnalysis. # noqa: E501 + :type: str + """ + + self._spf_verdict = spf_verdict + + @property + def dkim_verdict(self): + """Gets the dkim_verdict of this EmailAnalysis. # noqa: E501 + + Verdict of DomainKeys Identified Mail analysis # noqa: E501 + + :return: The dkim_verdict of this EmailAnalysis. # noqa: E501 + :rtype: str + """ + return self._dkim_verdict + + @dkim_verdict.setter + def dkim_verdict(self, dkim_verdict): + """Sets the dkim_verdict of this EmailAnalysis. + + Verdict of DomainKeys Identified Mail analysis # noqa: E501 + + :param dkim_verdict: The dkim_verdict of this EmailAnalysis. # noqa: E501 + :type: str + """ + + self._dkim_verdict = dkim_verdict + + @property + def dmarc_verdict(self): + """Gets the dmarc_verdict of this EmailAnalysis. # noqa: E501 + + Verdict of Domain-based Message Authentication Reporting and Conformance analysis # noqa: E501 + + :return: The dmarc_verdict of this EmailAnalysis. # noqa: E501 + :rtype: str + """ + return self._dmarc_verdict + + @dmarc_verdict.setter + def dmarc_verdict(self, dmarc_verdict): + """Sets the dmarc_verdict of this EmailAnalysis. + + Verdict of Domain-based Message Authentication Reporting and Conformance analysis # noqa: E501 + + :param dmarc_verdict: The dmarc_verdict of this EmailAnalysis. # noqa: E501 + :type: str + """ + + self._dmarc_verdict = dmarc_verdict + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EmailAnalysis): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EmailAnalysis): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/email_content_match_result.py b/mailslurp_client/models/email_content_match_result.py new file mode 100644 index 00000000..ed87cac3 --- /dev/null +++ b/mailslurp_client/models/email_content_match_result.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class EmailContentMatchResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'pattern': 'str', + 'matches': 'list[str]' + } + + attribute_map = { + 'pattern': 'pattern', + 'matches': 'matches' + } + + def __init__(self, pattern=None, matches=None, local_vars_configuration=None): # noqa: E501 + """EmailContentMatchResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._pattern = None + self._matches = None + self.discriminator = None + + self.pattern = pattern + self.matches = matches + + @property + def pattern(self): + """Gets the pattern of this EmailContentMatchResult. # noqa: E501 + + + :return: The pattern of this EmailContentMatchResult. # noqa: E501 + :rtype: str + """ + return self._pattern + + @pattern.setter + def pattern(self, pattern): + """Sets the pattern of this EmailContentMatchResult. + + + :param pattern: The pattern of this EmailContentMatchResult. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and pattern is None: # noqa: E501 + raise ValueError("Invalid value for `pattern`, must not be `None`") # noqa: E501 + + self._pattern = pattern + + @property + def matches(self): + """Gets the matches of this EmailContentMatchResult. # noqa: E501 + + + :return: The matches of this EmailContentMatchResult. # noqa: E501 + :rtype: list[str] + """ + return self._matches + + @matches.setter + def matches(self, matches): + """Sets the matches of this EmailContentMatchResult. + + + :param matches: The matches of this EmailContentMatchResult. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and matches is None: # noqa: E501 + raise ValueError("Invalid value for `matches`, must not be `None`") # noqa: E501 + + self._matches = matches + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EmailContentMatchResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EmailContentMatchResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/email_html_dto.py b/mailslurp_client/models/email_html_dto.py new file mode 100644 index 00000000..556a73f0 --- /dev/null +++ b/mailslurp_client/models/email_html_dto.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class EmailHtmlDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'subject': 'str', + 'body': 'str' + } + + attribute_map = { + 'subject': 'subject', + 'body': 'body' + } + + def __init__(self, subject=None, body=None, local_vars_configuration=None): # noqa: E501 + """EmailHtmlDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._subject = None + self._body = None + self.discriminator = None + + if subject is not None: + self.subject = subject + if body is not None: + self.body = body + + @property + def subject(self): + """Gets the subject of this EmailHtmlDto. # noqa: E501 + + + :return: The subject of this EmailHtmlDto. # noqa: E501 + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this EmailHtmlDto. + + + :param subject: The subject of this EmailHtmlDto. # noqa: E501 + :type: str + """ + + self._subject = subject + + @property + def body(self): + """Gets the body of this EmailHtmlDto. # noqa: E501 + + + :return: The body of this EmailHtmlDto. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this EmailHtmlDto. + + + :param body: The body of this EmailHtmlDto. # noqa: E501 + :type: str + """ + + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EmailHtmlDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EmailHtmlDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/email_links_result.py b/mailslurp_client/models/email_links_result.py new file mode 100644 index 00000000..be028368 --- /dev/null +++ b/mailslurp_client/models/email_links_result.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class EmailLinksResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'links': 'list[str]', + 'body': 'str' + } + + attribute_map = { + 'links': 'links', + 'body': 'body' + } + + def __init__(self, links=None, body=None, local_vars_configuration=None): # noqa: E501 + """EmailLinksResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._links = None + self._body = None + self.discriminator = None + + self.links = links + self.body = body + + @property + def links(self): + """Gets the links of this EmailLinksResult. # noqa: E501 + + + :return: The links of this EmailLinksResult. # noqa: E501 + :rtype: list[str] + """ + return self._links + + @links.setter + def links(self, links): + """Sets the links of this EmailLinksResult. + + + :param links: The links of this EmailLinksResult. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and links is None: # noqa: E501 + raise ValueError("Invalid value for `links`, must not be `None`") # noqa: E501 + + self._links = links + + @property + def body(self): + """Gets the body of this EmailLinksResult. # noqa: E501 + + + :return: The body of this EmailLinksResult. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this EmailLinksResult. + + + :param body: The body of this EmailLinksResult. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and body is None: # noqa: E501 + raise ValueError("Invalid value for `body`, must not be `None`") # noqa: E501 + + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EmailLinksResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EmailLinksResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/email_preview.py b/mailslurp_client/models/email_preview.py new file mode 100644 index 00000000..005d49b0 --- /dev/null +++ b/mailslurp_client/models/email_preview.py @@ -0,0 +1,372 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class EmailPreview(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'domain_id': 'str', + 'subject': 'str', + 'to': 'list[str]', + '_from': 'str', + 'bcc': 'list[str]', + 'cc': 'list[str]', + 'created_at': 'datetime', + 'read': 'bool', + 'attachments': 'list[str]' + } + + attribute_map = { + 'id': 'id', + 'domain_id': 'domainId', + 'subject': 'subject', + 'to': 'to', + '_from': 'from', + 'bcc': 'bcc', + 'cc': 'cc', + 'created_at': 'createdAt', + 'read': 'read', + 'attachments': 'attachments' + } + + def __init__(self, id=None, domain_id=None, subject=None, to=None, _from=None, bcc=None, cc=None, created_at=None, read=None, attachments=None, local_vars_configuration=None): # noqa: E501 + """EmailPreview - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._domain_id = None + self._subject = None + self._to = None + self.__from = None + self._bcc = None + self._cc = None + self._created_at = None + self._read = None + self._attachments = None + self.discriminator = None + + self.id = id + if domain_id is not None: + self.domain_id = domain_id + self.subject = subject + self.to = to + self._from = _from + self.bcc = bcc + self.cc = cc + self.created_at = created_at + self.read = read + self.attachments = attachments + + @property + def id(self): + """Gets the id of this EmailPreview. # noqa: E501 + + ID of the email entity # noqa: E501 + + :return: The id of this EmailPreview. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this EmailPreview. + + ID of the email entity # noqa: E501 + + :param id: The id of this EmailPreview. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def domain_id(self): + """Gets the domain_id of this EmailPreview. # noqa: E501 + + ID of the domain that received the email # noqa: E501 + + :return: The domain_id of this EmailPreview. # noqa: E501 + :rtype: str + """ + return self._domain_id + + @domain_id.setter + def domain_id(self, domain_id): + """Sets the domain_id of this EmailPreview. + + ID of the domain that received the email # noqa: E501 + + :param domain_id: The domain_id of this EmailPreview. # noqa: E501 + :type: str + """ + + self._domain_id = domain_id + + @property + def subject(self): + """Gets the subject of this EmailPreview. # noqa: E501 + + The subject line of the email message as specified by SMTP subject header # noqa: E501 + + :return: The subject of this EmailPreview. # noqa: E501 + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this EmailPreview. + + The subject line of the email message as specified by SMTP subject header # noqa: E501 + + :param subject: The subject of this EmailPreview. # noqa: E501 + :type: str + """ + + self._subject = subject + + @property + def to(self): + """Gets the to of this EmailPreview. # noqa: E501 + + List of `To` recipient email addresses that the email was addressed to. See recipients object for names. # noqa: E501 + + :return: The to of this EmailPreview. # noqa: E501 + :rtype: list[str] + """ + return self._to + + @to.setter + def to(self, to): + """Sets the to of this EmailPreview. + + List of `To` recipient email addresses that the email was addressed to. See recipients object for names. # noqa: E501 + + :param to: The to of this EmailPreview. # noqa: E501 + :type: list[str] + """ + + self._to = to + + @property + def _from(self): + """Gets the _from of this EmailPreview. # noqa: E501 + + Who the email was sent from. An email address - see fromName for the sender name. # noqa: E501 + + :return: The _from of this EmailPreview. # noqa: E501 + :rtype: str + """ + return self.__from + + @_from.setter + def _from(self, _from): + """Sets the _from of this EmailPreview. + + Who the email was sent from. An email address - see fromName for the sender name. # noqa: E501 + + :param _from: The _from of this EmailPreview. # noqa: E501 + :type: str + """ + + self.__from = _from + + @property + def bcc(self): + """Gets the bcc of this EmailPreview. # noqa: E501 + + List of `BCC` recipients email addresses that the email was addressed to. See recipients object for names. # noqa: E501 + + :return: The bcc of this EmailPreview. # noqa: E501 + :rtype: list[str] + """ + return self._bcc + + @bcc.setter + def bcc(self, bcc): + """Sets the bcc of this EmailPreview. + + List of `BCC` recipients email addresses that the email was addressed to. See recipients object for names. # noqa: E501 + + :param bcc: The bcc of this EmailPreview. # noqa: E501 + :type: list[str] + """ + + self._bcc = bcc + + @property + def cc(self): + """Gets the cc of this EmailPreview. # noqa: E501 + + List of `CC` recipients email addresses that the email was addressed to. See recipients object for names. # noqa: E501 + + :return: The cc of this EmailPreview. # noqa: E501 + :rtype: list[str] + """ + return self._cc + + @cc.setter + def cc(self, cc): + """Sets the cc of this EmailPreview. + + List of `CC` recipients email addresses that the email was addressed to. See recipients object for names. # noqa: E501 + + :param cc: The cc of this EmailPreview. # noqa: E501 + :type: list[str] + """ + + self._cc = cc + + @property + def created_at(self): + """Gets the created_at of this EmailPreview. # noqa: E501 + + When was the email received by MailSlurp # noqa: E501 + + :return: The created_at of this EmailPreview. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this EmailPreview. + + When was the email received by MailSlurp # noqa: E501 + + :param created_at: The created_at of this EmailPreview. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + @property + def read(self): + """Gets the read of this EmailPreview. # noqa: E501 + + Read flag. Has the email ever been viewed in the dashboard or fetched via the API with a hydrated body? If so the email is marked as read. Paginated results do not affect read status. Read status is different to email opened event as it depends on your own account accessing the email. Email opened is determined by tracking pixels sent to other uses if enable during sending. You can listened for both email read and email opened events using webhooks. # noqa: E501 + + :return: The read of this EmailPreview. # noqa: E501 + :rtype: bool + """ + return self._read + + @read.setter + def read(self, read): + """Sets the read of this EmailPreview. + + Read flag. Has the email ever been viewed in the dashboard or fetched via the API with a hydrated body? If so the email is marked as read. Paginated results do not affect read status. Read status is different to email opened event as it depends on your own account accessing the email. Email opened is determined by tracking pixels sent to other uses if enable during sending. You can listened for both email read and email opened events using webhooks. # noqa: E501 + + :param read: The read of this EmailPreview. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and read is None: # noqa: E501 + raise ValueError("Invalid value for `read`, must not be `None`") # noqa: E501 + + self._read = read + + @property + def attachments(self): + """Gets the attachments of this EmailPreview. # noqa: E501 + + List of IDs of attachments found in the email. Use these IDs with the Inbox and Email Controllers to download attachments and attachment meta data such as filesize, name, extension. # noqa: E501 + + :return: The attachments of this EmailPreview. # noqa: E501 + :rtype: list[str] + """ + return self._attachments + + @attachments.setter + def attachments(self, attachments): + """Sets the attachments of this EmailPreview. + + List of IDs of attachments found in the email. Use these IDs with the Inbox and Email Controllers to download attachments and attachment meta data such as filesize, name, extension. # noqa: E501 + + :param attachments: The attachments of this EmailPreview. # noqa: E501 + :type: list[str] + """ + + self._attachments = attachments + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EmailPreview): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EmailPreview): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/email_preview_urls.py b/mailslurp_client/models/email_preview_urls.py new file mode 100644 index 00000000..0adc86b1 --- /dev/null +++ b/mailslurp_client/models/email_preview_urls.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class EmailPreviewUrls(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'raw_smtp_message_url': 'str', + 'plain_html_body_url': 'str' + } + + attribute_map = { + 'raw_smtp_message_url': 'rawSmtpMessageUrl', + 'plain_html_body_url': 'plainHtmlBodyUrl' + } + + def __init__(self, raw_smtp_message_url=None, plain_html_body_url=None, local_vars_configuration=None): # noqa: E501 + """EmailPreviewUrls - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._raw_smtp_message_url = None + self._plain_html_body_url = None + self.discriminator = None + + self.raw_smtp_message_url = raw_smtp_message_url + self.plain_html_body_url = plain_html_body_url + + @property + def raw_smtp_message_url(self): + """Gets the raw_smtp_message_url of this EmailPreviewUrls. # noqa: E501 + + + :return: The raw_smtp_message_url of this EmailPreviewUrls. # noqa: E501 + :rtype: str + """ + return self._raw_smtp_message_url + + @raw_smtp_message_url.setter + def raw_smtp_message_url(self, raw_smtp_message_url): + """Sets the raw_smtp_message_url of this EmailPreviewUrls. + + + :param raw_smtp_message_url: The raw_smtp_message_url of this EmailPreviewUrls. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and raw_smtp_message_url is None: # noqa: E501 + raise ValueError("Invalid value for `raw_smtp_message_url`, must not be `None`") # noqa: E501 + + self._raw_smtp_message_url = raw_smtp_message_url + + @property + def plain_html_body_url(self): + """Gets the plain_html_body_url of this EmailPreviewUrls. # noqa: E501 + + + :return: The plain_html_body_url of this EmailPreviewUrls. # noqa: E501 + :rtype: str + """ + return self._plain_html_body_url + + @plain_html_body_url.setter + def plain_html_body_url(self, plain_html_body_url): + """Sets the plain_html_body_url of this EmailPreviewUrls. + + + :param plain_html_body_url: The plain_html_body_url of this EmailPreviewUrls. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and plain_html_body_url is None: # noqa: E501 + raise ValueError("Invalid value for `plain_html_body_url`, must not be `None`") # noqa: E501 + + self._plain_html_body_url = plain_html_body_url + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EmailPreviewUrls): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EmailPreviewUrls): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/email_projection.py b/mailslurp_client/models/email_projection.py new file mode 100644 index 00000000..26aceade --- /dev/null +++ b/mailslurp_client/models/email_projection.py @@ -0,0 +1,465 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class EmailProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + '_from': 'str', + 'subject': 'str', + 'inbox_id': 'str', + 'attachments': 'list[str]', + 'to': 'list[str]', + 'bcc': 'list[str]', + 'cc': 'list[str]', + 'created_at': 'datetime', + 'domain_id': 'str', + 'read': 'bool', + 'team_access': 'bool', + 'body_md5_hash': 'str', + 'body_excerpt': 'str' + } + + attribute_map = { + 'id': 'id', + '_from': 'from', + 'subject': 'subject', + 'inbox_id': 'inboxId', + 'attachments': 'attachments', + 'to': 'to', + 'bcc': 'bcc', + 'cc': 'cc', + 'created_at': 'createdAt', + 'domain_id': 'domainId', + 'read': 'read', + 'team_access': 'teamAccess', + 'body_md5_hash': 'bodyMD5Hash', + 'body_excerpt': 'bodyExcerpt' + } + + def __init__(self, id=None, _from=None, subject=None, inbox_id=None, attachments=None, to=None, bcc=None, cc=None, created_at=None, domain_id=None, read=None, team_access=None, body_md5_hash=None, body_excerpt=None, local_vars_configuration=None): # noqa: E501 + """EmailProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self.__from = None + self._subject = None + self._inbox_id = None + self._attachments = None + self._to = None + self._bcc = None + self._cc = None + self._created_at = None + self._domain_id = None + self._read = None + self._team_access = None + self._body_md5_hash = None + self._body_excerpt = None + self.discriminator = None + + self.id = id + if _from is not None: + self._from = _from + if subject is not None: + self.subject = subject + self.inbox_id = inbox_id + if attachments is not None: + self.attachments = attachments + self.to = to + if bcc is not None: + self.bcc = bcc + if cc is not None: + self.cc = cc + self.created_at = created_at + if domain_id is not None: + self.domain_id = domain_id + self.read = read + self.team_access = team_access + if body_md5_hash is not None: + self.body_md5_hash = body_md5_hash + if body_excerpt is not None: + self.body_excerpt = body_excerpt + + @property + def id(self): + """Gets the id of this EmailProjection. # noqa: E501 + + + :return: The id of this EmailProjection. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this EmailProjection. + + + :param id: The id of this EmailProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def _from(self): + """Gets the _from of this EmailProjection. # noqa: E501 + + + :return: The _from of this EmailProjection. # noqa: E501 + :rtype: str + """ + return self.__from + + @_from.setter + def _from(self, _from): + """Sets the _from of this EmailProjection. + + + :param _from: The _from of this EmailProjection. # noqa: E501 + :type: str + """ + + self.__from = _from + + @property + def subject(self): + """Gets the subject of this EmailProjection. # noqa: E501 + + + :return: The subject of this EmailProjection. # noqa: E501 + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this EmailProjection. + + + :param subject: The subject of this EmailProjection. # noqa: E501 + :type: str + """ + + self._subject = subject + + @property + def inbox_id(self): + """Gets the inbox_id of this EmailProjection. # noqa: E501 + + + :return: The inbox_id of this EmailProjection. # noqa: E501 + :rtype: str + """ + return self._inbox_id + + @inbox_id.setter + def inbox_id(self, inbox_id): + """Sets the inbox_id of this EmailProjection. + + + :param inbox_id: The inbox_id of this EmailProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and inbox_id is None: # noqa: E501 + raise ValueError("Invalid value for `inbox_id`, must not be `None`") # noqa: E501 + + self._inbox_id = inbox_id + + @property + def attachments(self): + """Gets the attachments of this EmailProjection. # noqa: E501 + + + :return: The attachments of this EmailProjection. # noqa: E501 + :rtype: list[str] + """ + return self._attachments + + @attachments.setter + def attachments(self, attachments): + """Sets the attachments of this EmailProjection. + + + :param attachments: The attachments of this EmailProjection. # noqa: E501 + :type: list[str] + """ + + self._attachments = attachments + + @property + def to(self): + """Gets the to of this EmailProjection. # noqa: E501 + + + :return: The to of this EmailProjection. # noqa: E501 + :rtype: list[str] + """ + return self._to + + @to.setter + def to(self, to): + """Sets the to of this EmailProjection. + + + :param to: The to of this EmailProjection. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and to is None: # noqa: E501 + raise ValueError("Invalid value for `to`, must not be `None`") # noqa: E501 + + self._to = to + + @property + def bcc(self): + """Gets the bcc of this EmailProjection. # noqa: E501 + + + :return: The bcc of this EmailProjection. # noqa: E501 + :rtype: list[str] + """ + return self._bcc + + @bcc.setter + def bcc(self, bcc): + """Sets the bcc of this EmailProjection. + + + :param bcc: The bcc of this EmailProjection. # noqa: E501 + :type: list[str] + """ + + self._bcc = bcc + + @property + def cc(self): + """Gets the cc of this EmailProjection. # noqa: E501 + + + :return: The cc of this EmailProjection. # noqa: E501 + :rtype: list[str] + """ + return self._cc + + @cc.setter + def cc(self, cc): + """Sets the cc of this EmailProjection. + + + :param cc: The cc of this EmailProjection. # noqa: E501 + :type: list[str] + """ + + self._cc = cc + + @property + def created_at(self): + """Gets the created_at of this EmailProjection. # noqa: E501 + + + :return: The created_at of this EmailProjection. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this EmailProjection. + + + :param created_at: The created_at of this EmailProjection. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + @property + def domain_id(self): + """Gets the domain_id of this EmailProjection. # noqa: E501 + + + :return: The domain_id of this EmailProjection. # noqa: E501 + :rtype: str + """ + return self._domain_id + + @domain_id.setter + def domain_id(self, domain_id): + """Sets the domain_id of this EmailProjection. + + + :param domain_id: The domain_id of this EmailProjection. # noqa: E501 + :type: str + """ + + self._domain_id = domain_id + + @property + def read(self): + """Gets the read of this EmailProjection. # noqa: E501 + + + :return: The read of this EmailProjection. # noqa: E501 + :rtype: bool + """ + return self._read + + @read.setter + def read(self, read): + """Sets the read of this EmailProjection. + + + :param read: The read of this EmailProjection. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and read is None: # noqa: E501 + raise ValueError("Invalid value for `read`, must not be `None`") # noqa: E501 + + self._read = read + + @property + def team_access(self): + """Gets the team_access of this EmailProjection. # noqa: E501 + + + :return: The team_access of this EmailProjection. # noqa: E501 + :rtype: bool + """ + return self._team_access + + @team_access.setter + def team_access(self, team_access): + """Sets the team_access of this EmailProjection. + + + :param team_access: The team_access of this EmailProjection. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and team_access is None: # noqa: E501 + raise ValueError("Invalid value for `team_access`, must not be `None`") # noqa: E501 + + self._team_access = team_access + + @property + def body_md5_hash(self): + """Gets the body_md5_hash of this EmailProjection. # noqa: E501 + + + :return: The body_md5_hash of this EmailProjection. # noqa: E501 + :rtype: str + """ + return self._body_md5_hash + + @body_md5_hash.setter + def body_md5_hash(self, body_md5_hash): + """Sets the body_md5_hash of this EmailProjection. + + + :param body_md5_hash: The body_md5_hash of this EmailProjection. # noqa: E501 + :type: str + """ + + self._body_md5_hash = body_md5_hash + + @property + def body_excerpt(self): + """Gets the body_excerpt of this EmailProjection. # noqa: E501 + + + :return: The body_excerpt of this EmailProjection. # noqa: E501 + :rtype: str + """ + return self._body_excerpt + + @body_excerpt.setter + def body_excerpt(self, body_excerpt): + """Sets the body_excerpt of this EmailProjection. + + + :param body_excerpt: The body_excerpt of this EmailProjection. # noqa: E501 + :type: str + """ + + self._body_excerpt = body_excerpt + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EmailProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EmailProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/email_recipients.py b/mailslurp_client/models/email_recipients.py new file mode 100644 index 00000000..a5bbbd67 --- /dev/null +++ b/mailslurp_client/models/email_recipients.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class EmailRecipients(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'to': 'list[Recipient]', + 'cc': 'list[Recipient]', + 'bcc': 'list[Recipient]' + } + + attribute_map = { + 'to': 'to', + 'cc': 'cc', + 'bcc': 'bcc' + } + + def __init__(self, to=None, cc=None, bcc=None, local_vars_configuration=None): # noqa: E501 + """EmailRecipients - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._to = None + self._cc = None + self._bcc = None + self.discriminator = None + + if to is not None: + self.to = to + if cc is not None: + self.cc = cc + if bcc is not None: + self.bcc = bcc + + @property + def to(self): + """Gets the to of this EmailRecipients. # noqa: E501 + + + :return: The to of this EmailRecipients. # noqa: E501 + :rtype: list[Recipient] + """ + return self._to + + @to.setter + def to(self, to): + """Sets the to of this EmailRecipients. + + + :param to: The to of this EmailRecipients. # noqa: E501 + :type: list[Recipient] + """ + + self._to = to + + @property + def cc(self): + """Gets the cc of this EmailRecipients. # noqa: E501 + + + :return: The cc of this EmailRecipients. # noqa: E501 + :rtype: list[Recipient] + """ + return self._cc + + @cc.setter + def cc(self, cc): + """Sets the cc of this EmailRecipients. + + + :param cc: The cc of this EmailRecipients. # noqa: E501 + :type: list[Recipient] + """ + + self._cc = cc + + @property + def bcc(self): + """Gets the bcc of this EmailRecipients. # noqa: E501 + + + :return: The bcc of this EmailRecipients. # noqa: E501 + :rtype: list[Recipient] + """ + return self._bcc + + @bcc.setter + def bcc(self, bcc): + """Sets the bcc of this EmailRecipients. + + + :param bcc: The bcc of this EmailRecipients. # noqa: E501 + :type: list[Recipient] + """ + + self._bcc = bcc + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EmailRecipients): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EmailRecipients): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/email_text_lines_result.py b/mailslurp_client/models/email_text_lines_result.py new file mode 100644 index 00000000..3c70bc5c --- /dev/null +++ b/mailslurp_client/models/email_text_lines_result.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class EmailTextLinesResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'lines': 'list[str]', + 'body': 'str' + } + + attribute_map = { + 'lines': 'lines', + 'body': 'body' + } + + def __init__(self, lines=None, body=None, local_vars_configuration=None): # noqa: E501 + """EmailTextLinesResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._lines = None + self._body = None + self.discriminator = None + + self.lines = lines + self.body = body + + @property + def lines(self): + """Gets the lines of this EmailTextLinesResult. # noqa: E501 + + + :return: The lines of this EmailTextLinesResult. # noqa: E501 + :rtype: list[str] + """ + return self._lines + + @lines.setter + def lines(self, lines): + """Sets the lines of this EmailTextLinesResult. + + + :param lines: The lines of this EmailTextLinesResult. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and lines is None: # noqa: E501 + raise ValueError("Invalid value for `lines`, must not be `None`") # noqa: E501 + + self._lines = lines + + @property + def body(self): + """Gets the body of this EmailTextLinesResult. # noqa: E501 + + + :return: The body of this EmailTextLinesResult. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this EmailTextLinesResult. + + + :param body: The body of this EmailTextLinesResult. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and body is None: # noqa: E501 + raise ValueError("Invalid value for `body`, must not be `None`") # noqa: E501 + + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EmailTextLinesResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EmailTextLinesResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/email_validation_request.py b/mailslurp_client/models/email_validation_request.py new file mode 100644 index 00000000..847350d0 --- /dev/null +++ b/mailslurp_client/models/email_validation_request.py @@ -0,0 +1,256 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class EmailValidationRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'user_id': 'str', + 'email_address': 'str', + 'is_valid': 'bool', + 'created_at': 'datetime', + 'updated_at': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'user_id': 'userId', + 'email_address': 'emailAddress', + 'is_valid': 'isValid', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt' + } + + def __init__(self, id=None, user_id=None, email_address=None, is_valid=None, created_at=None, updated_at=None, local_vars_configuration=None): # noqa: E501 + """EmailValidationRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._user_id = None + self._email_address = None + self._is_valid = None + self._created_at = None + self._updated_at = None + self.discriminator = None + + if id is not None: + self.id = id + self.user_id = user_id + self.email_address = email_address + self.is_valid = is_valid + self.created_at = created_at + self.updated_at = updated_at + + @property + def id(self): + """Gets the id of this EmailValidationRequest. # noqa: E501 + + + :return: The id of this EmailValidationRequest. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this EmailValidationRequest. + + + :param id: The id of this EmailValidationRequest. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def user_id(self): + """Gets the user_id of this EmailValidationRequest. # noqa: E501 + + + :return: The user_id of this EmailValidationRequest. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this EmailValidationRequest. + + + :param user_id: The user_id of this EmailValidationRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def email_address(self): + """Gets the email_address of this EmailValidationRequest. # noqa: E501 + + + :return: The email_address of this EmailValidationRequest. # noqa: E501 + :rtype: str + """ + return self._email_address + + @email_address.setter + def email_address(self, email_address): + """Sets the email_address of this EmailValidationRequest. + + + :param email_address: The email_address of this EmailValidationRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and email_address is None: # noqa: E501 + raise ValueError("Invalid value for `email_address`, must not be `None`") # noqa: E501 + + self._email_address = email_address + + @property + def is_valid(self): + """Gets the is_valid of this EmailValidationRequest. # noqa: E501 + + + :return: The is_valid of this EmailValidationRequest. # noqa: E501 + :rtype: bool + """ + return self._is_valid + + @is_valid.setter + def is_valid(self, is_valid): + """Sets the is_valid of this EmailValidationRequest. + + + :param is_valid: The is_valid of this EmailValidationRequest. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and is_valid is None: # noqa: E501 + raise ValueError("Invalid value for `is_valid`, must not be `None`") # noqa: E501 + + self._is_valid = is_valid + + @property + def created_at(self): + """Gets the created_at of this EmailValidationRequest. # noqa: E501 + + + :return: The created_at of this EmailValidationRequest. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this EmailValidationRequest. + + + :param created_at: The created_at of this EmailValidationRequest. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + @property + def updated_at(self): + """Gets the updated_at of this EmailValidationRequest. # noqa: E501 + + + :return: The updated_at of this EmailValidationRequest. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this EmailValidationRequest. + + + :param updated_at: The updated_at of this EmailValidationRequest. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and updated_at is None: # noqa: E501 + raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501 + + self._updated_at = updated_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EmailValidationRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EmailValidationRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/email_verification_result.py b/mailslurp_client/models/email_verification_result.py new file mode 100644 index 00000000..f8da632d --- /dev/null +++ b/mailslurp_client/models/email_verification_result.py @@ -0,0 +1,229 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class EmailVerificationResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'domain_name': 'str', + 'port': 'int', + 'email_address': 'str', + 'is_valid': 'bool', + 'error': 'str' + } + + attribute_map = { + 'domain_name': 'domainName', + 'port': 'port', + 'email_address': 'emailAddress', + 'is_valid': 'isValid', + 'error': 'error' + } + + def __init__(self, domain_name=None, port=None, email_address=None, is_valid=None, error=None, local_vars_configuration=None): # noqa: E501 + """EmailVerificationResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._domain_name = None + self._port = None + self._email_address = None + self._is_valid = None + self._error = None + self.discriminator = None + + self.domain_name = domain_name + self.port = port + self.email_address = email_address + self.is_valid = is_valid + if error is not None: + self.error = error + + @property + def domain_name(self): + """Gets the domain_name of this EmailVerificationResult. # noqa: E501 + + + :return: The domain_name of this EmailVerificationResult. # noqa: E501 + :rtype: str + """ + return self._domain_name + + @domain_name.setter + def domain_name(self, domain_name): + """Sets the domain_name of this EmailVerificationResult. + + + :param domain_name: The domain_name of this EmailVerificationResult. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and domain_name is None: # noqa: E501 + raise ValueError("Invalid value for `domain_name`, must not be `None`") # noqa: E501 + + self._domain_name = domain_name + + @property + def port(self): + """Gets the port of this EmailVerificationResult. # noqa: E501 + + + :return: The port of this EmailVerificationResult. # noqa: E501 + :rtype: int + """ + return self._port + + @port.setter + def port(self, port): + """Sets the port of this EmailVerificationResult. + + + :param port: The port of this EmailVerificationResult. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and port is None: # noqa: E501 + raise ValueError("Invalid value for `port`, must not be `None`") # noqa: E501 + + self._port = port + + @property + def email_address(self): + """Gets the email_address of this EmailVerificationResult. # noqa: E501 + + + :return: The email_address of this EmailVerificationResult. # noqa: E501 + :rtype: str + """ + return self._email_address + + @email_address.setter + def email_address(self, email_address): + """Sets the email_address of this EmailVerificationResult. + + + :param email_address: The email_address of this EmailVerificationResult. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and email_address is None: # noqa: E501 + raise ValueError("Invalid value for `email_address`, must not be `None`") # noqa: E501 + + self._email_address = email_address + + @property + def is_valid(self): + """Gets the is_valid of this EmailVerificationResult. # noqa: E501 + + + :return: The is_valid of this EmailVerificationResult. # noqa: E501 + :rtype: bool + """ + return self._is_valid + + @is_valid.setter + def is_valid(self, is_valid): + """Sets the is_valid of this EmailVerificationResult. + + + :param is_valid: The is_valid of this EmailVerificationResult. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and is_valid is None: # noqa: E501 + raise ValueError("Invalid value for `is_valid`, must not be `None`") # noqa: E501 + + self._is_valid = is_valid + + @property + def error(self): + """Gets the error of this EmailVerificationResult. # noqa: E501 + + + :return: The error of this EmailVerificationResult. # noqa: E501 + :rtype: str + """ + return self._error + + @error.setter + def error(self, error): + """Sets the error of this EmailVerificationResult. + + + :param error: The error of this EmailVerificationResult. # noqa: E501 + :type: str + """ + + self._error = error + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EmailVerificationResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EmailVerificationResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/emergency_address.py b/mailslurp_client/models/emergency_address.py new file mode 100644 index 00000000..8d7bbd33 --- /dev/null +++ b/mailslurp_client/models/emergency_address.py @@ -0,0 +1,451 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class EmergencyAddress(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'sid': 'str', + 'user_id': 'str', + 'display_name': 'str', + 'customer_name': 'str', + 'address1': 'str', + 'city': 'str', + 'region': 'str', + 'postal_code': 'str', + 'phone_country': 'str', + 'account_sid': 'str', + 'created_at': 'datetime', + 'updated_at': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'sid': 'sid', + 'user_id': 'userId', + 'display_name': 'displayName', + 'customer_name': 'customerName', + 'address1': 'address1', + 'city': 'city', + 'region': 'region', + 'postal_code': 'postalCode', + 'phone_country': 'phoneCountry', + 'account_sid': 'accountSid', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt' + } + + def __init__(self, id=None, sid=None, user_id=None, display_name=None, customer_name=None, address1=None, city=None, region=None, postal_code=None, phone_country=None, account_sid=None, created_at=None, updated_at=None, local_vars_configuration=None): # noqa: E501 + """EmergencyAddress - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._sid = None + self._user_id = None + self._display_name = None + self._customer_name = None + self._address1 = None + self._city = None + self._region = None + self._postal_code = None + self._phone_country = None + self._account_sid = None + self._created_at = None + self._updated_at = None + self.discriminator = None + + if id is not None: + self.id = id + self.sid = sid + self.user_id = user_id + self.display_name = display_name + self.customer_name = customer_name + self.address1 = address1 + self.city = city + self.region = region + self.postal_code = postal_code + self.phone_country = phone_country + self.account_sid = account_sid + self.created_at = created_at + self.updated_at = updated_at + + @property + def id(self): + """Gets the id of this EmergencyAddress. # noqa: E501 + + + :return: The id of this EmergencyAddress. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this EmergencyAddress. + + + :param id: The id of this EmergencyAddress. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def sid(self): + """Gets the sid of this EmergencyAddress. # noqa: E501 + + + :return: The sid of this EmergencyAddress. # noqa: E501 + :rtype: str + """ + return self._sid + + @sid.setter + def sid(self, sid): + """Sets the sid of this EmergencyAddress. + + + :param sid: The sid of this EmergencyAddress. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and sid is None: # noqa: E501 + raise ValueError("Invalid value for `sid`, must not be `None`") # noqa: E501 + + self._sid = sid + + @property + def user_id(self): + """Gets the user_id of this EmergencyAddress. # noqa: E501 + + + :return: The user_id of this EmergencyAddress. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this EmergencyAddress. + + + :param user_id: The user_id of this EmergencyAddress. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def display_name(self): + """Gets the display_name of this EmergencyAddress. # noqa: E501 + + + :return: The display_name of this EmergencyAddress. # noqa: E501 + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """Sets the display_name of this EmergencyAddress. + + + :param display_name: The display_name of this EmergencyAddress. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and display_name is None: # noqa: E501 + raise ValueError("Invalid value for `display_name`, must not be `None`") # noqa: E501 + + self._display_name = display_name + + @property + def customer_name(self): + """Gets the customer_name of this EmergencyAddress. # noqa: E501 + + + :return: The customer_name of this EmergencyAddress. # noqa: E501 + :rtype: str + """ + return self._customer_name + + @customer_name.setter + def customer_name(self, customer_name): + """Sets the customer_name of this EmergencyAddress. + + + :param customer_name: The customer_name of this EmergencyAddress. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and customer_name is None: # noqa: E501 + raise ValueError("Invalid value for `customer_name`, must not be `None`") # noqa: E501 + + self._customer_name = customer_name + + @property + def address1(self): + """Gets the address1 of this EmergencyAddress. # noqa: E501 + + + :return: The address1 of this EmergencyAddress. # noqa: E501 + :rtype: str + """ + return self._address1 + + @address1.setter + def address1(self, address1): + """Sets the address1 of this EmergencyAddress. + + + :param address1: The address1 of this EmergencyAddress. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and address1 is None: # noqa: E501 + raise ValueError("Invalid value for `address1`, must not be `None`") # noqa: E501 + + self._address1 = address1 + + @property + def city(self): + """Gets the city of this EmergencyAddress. # noqa: E501 + + + :return: The city of this EmergencyAddress. # noqa: E501 + :rtype: str + """ + return self._city + + @city.setter + def city(self, city): + """Sets the city of this EmergencyAddress. + + + :param city: The city of this EmergencyAddress. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and city is None: # noqa: E501 + raise ValueError("Invalid value for `city`, must not be `None`") # noqa: E501 + + self._city = city + + @property + def region(self): + """Gets the region of this EmergencyAddress. # noqa: E501 + + + :return: The region of this EmergencyAddress. # noqa: E501 + :rtype: str + """ + return self._region + + @region.setter + def region(self, region): + """Sets the region of this EmergencyAddress. + + + :param region: The region of this EmergencyAddress. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and region is None: # noqa: E501 + raise ValueError("Invalid value for `region`, must not be `None`") # noqa: E501 + + self._region = region + + @property + def postal_code(self): + """Gets the postal_code of this EmergencyAddress. # noqa: E501 + + + :return: The postal_code of this EmergencyAddress. # noqa: E501 + :rtype: str + """ + return self._postal_code + + @postal_code.setter + def postal_code(self, postal_code): + """Sets the postal_code of this EmergencyAddress. + + + :param postal_code: The postal_code of this EmergencyAddress. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and postal_code is None: # noqa: E501 + raise ValueError("Invalid value for `postal_code`, must not be `None`") # noqa: E501 + + self._postal_code = postal_code + + @property + def phone_country(self): + """Gets the phone_country of this EmergencyAddress. # noqa: E501 + + + :return: The phone_country of this EmergencyAddress. # noqa: E501 + :rtype: str + """ + return self._phone_country + + @phone_country.setter + def phone_country(self, phone_country): + """Sets the phone_country of this EmergencyAddress. + + + :param phone_country: The phone_country of this EmergencyAddress. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and phone_country is None: # noqa: E501 + raise ValueError("Invalid value for `phone_country`, must not be `None`") # noqa: E501 + allowed_values = ["US", "GB"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and phone_country not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `phone_country` ({0}), must be one of {1}" # noqa: E501 + .format(phone_country, allowed_values) + ) + + self._phone_country = phone_country + + @property + def account_sid(self): + """Gets the account_sid of this EmergencyAddress. # noqa: E501 + + + :return: The account_sid of this EmergencyAddress. # noqa: E501 + :rtype: str + """ + return self._account_sid + + @account_sid.setter + def account_sid(self, account_sid): + """Sets the account_sid of this EmergencyAddress. + + + :param account_sid: The account_sid of this EmergencyAddress. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and account_sid is None: # noqa: E501 + raise ValueError("Invalid value for `account_sid`, must not be `None`") # noqa: E501 + + self._account_sid = account_sid + + @property + def created_at(self): + """Gets the created_at of this EmergencyAddress. # noqa: E501 + + + :return: The created_at of this EmergencyAddress. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this EmergencyAddress. + + + :param created_at: The created_at of this EmergencyAddress. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + @property + def updated_at(self): + """Gets the updated_at of this EmergencyAddress. # noqa: E501 + + + :return: The updated_at of this EmergencyAddress. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this EmergencyAddress. + + + :param updated_at: The updated_at of this EmergencyAddress. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and updated_at is None: # noqa: E501 + raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501 + + self._updated_at = updated_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EmergencyAddress): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EmergencyAddress): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/emergency_address_dto.py b/mailslurp_client/models/emergency_address_dto.py new file mode 100644 index 00000000..60803c6a --- /dev/null +++ b/mailslurp_client/models/emergency_address_dto.py @@ -0,0 +1,182 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class EmergencyAddressDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'address1': 'str', + 'phone_country': 'str' + } + + attribute_map = { + 'id': 'id', + 'address1': 'address1', + 'phone_country': 'phoneCountry' + } + + def __init__(self, id=None, address1=None, phone_country=None, local_vars_configuration=None): # noqa: E501 + """EmergencyAddressDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._address1 = None + self._phone_country = None + self.discriminator = None + + self.id = id + self.address1 = address1 + self.phone_country = phone_country + + @property + def id(self): + """Gets the id of this EmergencyAddressDto. # noqa: E501 + + + :return: The id of this EmergencyAddressDto. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this EmergencyAddressDto. + + + :param id: The id of this EmergencyAddressDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def address1(self): + """Gets the address1 of this EmergencyAddressDto. # noqa: E501 + + + :return: The address1 of this EmergencyAddressDto. # noqa: E501 + :rtype: str + """ + return self._address1 + + @address1.setter + def address1(self, address1): + """Sets the address1 of this EmergencyAddressDto. + + + :param address1: The address1 of this EmergencyAddressDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and address1 is None: # noqa: E501 + raise ValueError("Invalid value for `address1`, must not be `None`") # noqa: E501 + + self._address1 = address1 + + @property + def phone_country(self): + """Gets the phone_country of this EmergencyAddressDto. # noqa: E501 + + + :return: The phone_country of this EmergencyAddressDto. # noqa: E501 + :rtype: str + """ + return self._phone_country + + @phone_country.setter + def phone_country(self, phone_country): + """Sets the phone_country of this EmergencyAddressDto. + + + :param phone_country: The phone_country of this EmergencyAddressDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and phone_country is None: # noqa: E501 + raise ValueError("Invalid value for `phone_country`, must not be `None`") # noqa: E501 + allowed_values = ["US", "GB"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and phone_country not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `phone_country` ({0}), must be one of {1}" # noqa: E501 + .format(phone_country, allowed_values) + ) + + self._phone_country = phone_country + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EmergencyAddressDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EmergencyAddressDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/empty_response_dto.py b/mailslurp_client/models/empty_response_dto.py new file mode 100644 index 00000000..a8bb269c --- /dev/null +++ b/mailslurp_client/models/empty_response_dto.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class EmptyResponseDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'message': 'str' + } + + attribute_map = { + 'message': 'message' + } + + def __init__(self, message=None, local_vars_configuration=None): # noqa: E501 + """EmptyResponseDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._message = None + self.discriminator = None + + if message is not None: + self.message = message + + @property + def message(self): + """Gets the message of this EmptyResponseDto. # noqa: E501 + + + :return: The message of this EmptyResponseDto. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this EmptyResponseDto. + + + :param message: The message of this EmptyResponseDto. # noqa: E501 + :type: str + """ + + self._message = message + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EmptyResponseDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, EmptyResponseDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/expiration_defaults.py b/mailslurp_client/models/expiration_defaults.py new file mode 100644 index 00000000..526d60c7 --- /dev/null +++ b/mailslurp_client/models/expiration_defaults.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class ExpirationDefaults(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'default_expiration_millis': 'int', + 'max_expiration_millis': 'int', + 'default_expires_at': 'datetime', + 'can_permanent_inbox': 'bool', + 'next_inbox_allows_permanent': 'bool' + } + + attribute_map = { + 'default_expiration_millis': 'defaultExpirationMillis', + 'max_expiration_millis': 'maxExpirationMillis', + 'default_expires_at': 'defaultExpiresAt', + 'can_permanent_inbox': 'canPermanentInbox', + 'next_inbox_allows_permanent': 'nextInboxAllowsPermanent' + } + + def __init__(self, default_expiration_millis=None, max_expiration_millis=None, default_expires_at=None, can_permanent_inbox=None, next_inbox_allows_permanent=None, local_vars_configuration=None): # noqa: E501 + """ExpirationDefaults - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._default_expiration_millis = None + self._max_expiration_millis = None + self._default_expires_at = None + self._can_permanent_inbox = None + self._next_inbox_allows_permanent = None + self.discriminator = None + + if default_expiration_millis is not None: + self.default_expiration_millis = default_expiration_millis + if max_expiration_millis is not None: + self.max_expiration_millis = max_expiration_millis + if default_expires_at is not None: + self.default_expires_at = default_expires_at + self.can_permanent_inbox = can_permanent_inbox + self.next_inbox_allows_permanent = next_inbox_allows_permanent + + @property + def default_expiration_millis(self): + """Gets the default_expiration_millis of this ExpirationDefaults. # noqa: E501 + + + :return: The default_expiration_millis of this ExpirationDefaults. # noqa: E501 + :rtype: int + """ + return self._default_expiration_millis + + @default_expiration_millis.setter + def default_expiration_millis(self, default_expiration_millis): + """Sets the default_expiration_millis of this ExpirationDefaults. + + + :param default_expiration_millis: The default_expiration_millis of this ExpirationDefaults. # noqa: E501 + :type: int + """ + + self._default_expiration_millis = default_expiration_millis + + @property + def max_expiration_millis(self): + """Gets the max_expiration_millis of this ExpirationDefaults. # noqa: E501 + + + :return: The max_expiration_millis of this ExpirationDefaults. # noqa: E501 + :rtype: int + """ + return self._max_expiration_millis + + @max_expiration_millis.setter + def max_expiration_millis(self, max_expiration_millis): + """Sets the max_expiration_millis of this ExpirationDefaults. + + + :param max_expiration_millis: The max_expiration_millis of this ExpirationDefaults. # noqa: E501 + :type: int + """ + + self._max_expiration_millis = max_expiration_millis + + @property + def default_expires_at(self): + """Gets the default_expires_at of this ExpirationDefaults. # noqa: E501 + + + :return: The default_expires_at of this ExpirationDefaults. # noqa: E501 + :rtype: datetime + """ + return self._default_expires_at + + @default_expires_at.setter + def default_expires_at(self, default_expires_at): + """Sets the default_expires_at of this ExpirationDefaults. + + + :param default_expires_at: The default_expires_at of this ExpirationDefaults. # noqa: E501 + :type: datetime + """ + + self._default_expires_at = default_expires_at + + @property + def can_permanent_inbox(self): + """Gets the can_permanent_inbox of this ExpirationDefaults. # noqa: E501 + + + :return: The can_permanent_inbox of this ExpirationDefaults. # noqa: E501 + :rtype: bool + """ + return self._can_permanent_inbox + + @can_permanent_inbox.setter + def can_permanent_inbox(self, can_permanent_inbox): + """Sets the can_permanent_inbox of this ExpirationDefaults. + + + :param can_permanent_inbox: The can_permanent_inbox of this ExpirationDefaults. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and can_permanent_inbox is None: # noqa: E501 + raise ValueError("Invalid value for `can_permanent_inbox`, must not be `None`") # noqa: E501 + + self._can_permanent_inbox = can_permanent_inbox + + @property + def next_inbox_allows_permanent(self): + """Gets the next_inbox_allows_permanent of this ExpirationDefaults. # noqa: E501 + + + :return: The next_inbox_allows_permanent of this ExpirationDefaults. # noqa: E501 + :rtype: bool + """ + return self._next_inbox_allows_permanent + + @next_inbox_allows_permanent.setter + def next_inbox_allows_permanent(self, next_inbox_allows_permanent): + """Sets the next_inbox_allows_permanent of this ExpirationDefaults. + + + :param next_inbox_allows_permanent: The next_inbox_allows_permanent of this ExpirationDefaults. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and next_inbox_allows_permanent is None: # noqa: E501 + raise ValueError("Invalid value for `next_inbox_allows_permanent`, must not be `None`") # noqa: E501 + + self._next_inbox_allows_permanent = next_inbox_allows_permanent + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ExpirationDefaults): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ExpirationDefaults): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/expired_inbox_dto.py b/mailslurp_client/models/expired_inbox_dto.py new file mode 100644 index 00000000..56935147 --- /dev/null +++ b/mailslurp_client/models/expired_inbox_dto.py @@ -0,0 +1,176 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class ExpiredInboxDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'inbox_id': 'str', + 'email_address': 'str' + } + + attribute_map = { + 'id': 'id', + 'inbox_id': 'inboxId', + 'email_address': 'emailAddress' + } + + def __init__(self, id=None, inbox_id=None, email_address=None, local_vars_configuration=None): # noqa: E501 + """ExpiredInboxDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._inbox_id = None + self._email_address = None + self.discriminator = None + + self.id = id + self.inbox_id = inbox_id + self.email_address = email_address + + @property + def id(self): + """Gets the id of this ExpiredInboxDto. # noqa: E501 + + + :return: The id of this ExpiredInboxDto. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ExpiredInboxDto. + + + :param id: The id of this ExpiredInboxDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def inbox_id(self): + """Gets the inbox_id of this ExpiredInboxDto. # noqa: E501 + + + :return: The inbox_id of this ExpiredInboxDto. # noqa: E501 + :rtype: str + """ + return self._inbox_id + + @inbox_id.setter + def inbox_id(self, inbox_id): + """Sets the inbox_id of this ExpiredInboxDto. + + + :param inbox_id: The inbox_id of this ExpiredInboxDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and inbox_id is None: # noqa: E501 + raise ValueError("Invalid value for `inbox_id`, must not be `None`") # noqa: E501 + + self._inbox_id = inbox_id + + @property + def email_address(self): + """Gets the email_address of this ExpiredInboxDto. # noqa: E501 + + + :return: The email_address of this ExpiredInboxDto. # noqa: E501 + :rtype: str + """ + return self._email_address + + @email_address.setter + def email_address(self, email_address): + """Sets the email_address of this ExpiredInboxDto. + + + :param email_address: The email_address of this ExpiredInboxDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and email_address is None: # noqa: E501 + raise ValueError("Invalid value for `email_address`, must not be `None`") # noqa: E501 + + self._email_address = email_address + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ExpiredInboxDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ExpiredInboxDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/expired_inbox_record_projection.py b/mailslurp_client/models/expired_inbox_record_projection.py new file mode 100644 index 00000000..68a9a890 --- /dev/null +++ b/mailslurp_client/models/expired_inbox_record_projection.py @@ -0,0 +1,203 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class ExpiredInboxRecordProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'user_id': 'str', + 'email_address': 'str', + 'created_at': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'user_id': 'userId', + 'email_address': 'emailAddress', + 'created_at': 'createdAt' + } + + def __init__(self, id=None, user_id=None, email_address=None, created_at=None, local_vars_configuration=None): # noqa: E501 + """ExpiredInboxRecordProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._user_id = None + self._email_address = None + self._created_at = None + self.discriminator = None + + self.id = id + self.user_id = user_id + self.email_address = email_address + self.created_at = created_at + + @property + def id(self): + """Gets the id of this ExpiredInboxRecordProjection. # noqa: E501 + + + :return: The id of this ExpiredInboxRecordProjection. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ExpiredInboxRecordProjection. + + + :param id: The id of this ExpiredInboxRecordProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def user_id(self): + """Gets the user_id of this ExpiredInboxRecordProjection. # noqa: E501 + + + :return: The user_id of this ExpiredInboxRecordProjection. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this ExpiredInboxRecordProjection. + + + :param user_id: The user_id of this ExpiredInboxRecordProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def email_address(self): + """Gets the email_address of this ExpiredInboxRecordProjection. # noqa: E501 + + + :return: The email_address of this ExpiredInboxRecordProjection. # noqa: E501 + :rtype: str + """ + return self._email_address + + @email_address.setter + def email_address(self, email_address): + """Sets the email_address of this ExpiredInboxRecordProjection. + + + :param email_address: The email_address of this ExpiredInboxRecordProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and email_address is None: # noqa: E501 + raise ValueError("Invalid value for `email_address`, must not be `None`") # noqa: E501 + + self._email_address = email_address + + @property + def created_at(self): + """Gets the created_at of this ExpiredInboxRecordProjection. # noqa: E501 + + + :return: The created_at of this ExpiredInboxRecordProjection. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this ExpiredInboxRecordProjection. + + + :param created_at: The created_at of this ExpiredInboxRecordProjection. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ExpiredInboxRecordProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ExpiredInboxRecordProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/export_link.py b/mailslurp_client/models/export_link.py new file mode 100644 index 00000000..4ad6538b --- /dev/null +++ b/mailslurp_client/models/export_link.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class ExportLink(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'download_link': 'str' + } + + attribute_map = { + 'download_link': 'downloadLink' + } + + def __init__(self, download_link=None, local_vars_configuration=None): # noqa: E501 + """ExportLink - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._download_link = None + self.discriminator = None + + self.download_link = download_link + + @property + def download_link(self): + """Gets the download_link of this ExportLink. # noqa: E501 + + + :return: The download_link of this ExportLink. # noqa: E501 + :rtype: str + """ + return self._download_link + + @download_link.setter + def download_link(self, download_link): + """Sets the download_link of this ExportLink. + + + :param download_link: The download_link of this ExportLink. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and download_link is None: # noqa: E501 + raise ValueError("Invalid value for `download_link`, must not be `None`") # noqa: E501 + + self._download_link = download_link + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ExportLink): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ExportLink): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/export_options.py b/mailslurp_client/models/export_options.py new file mode 100644 index 00000000..083151d6 --- /dev/null +++ b/mailslurp_client/models/export_options.py @@ -0,0 +1,258 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class ExportOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'output_format': 'str', + 'exclude_previously_exported': 'bool', + 'created_earliest_time': 'datetime', + 'created_oldest_time': 'datetime', + 'filter': 'str', + 'list_separator_token': 'str' + } + + attribute_map = { + 'output_format': 'outputFormat', + 'exclude_previously_exported': 'excludePreviouslyExported', + 'created_earliest_time': 'createdEarliestTime', + 'created_oldest_time': 'createdOldestTime', + 'filter': 'filter', + 'list_separator_token': 'listSeparatorToken' + } + + def __init__(self, output_format=None, exclude_previously_exported=None, created_earliest_time=None, created_oldest_time=None, filter=None, list_separator_token=None, local_vars_configuration=None): # noqa: E501 + """ExportOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._output_format = None + self._exclude_previously_exported = None + self._created_earliest_time = None + self._created_oldest_time = None + self._filter = None + self._list_separator_token = None + self.discriminator = None + + self.output_format = output_format + if exclude_previously_exported is not None: + self.exclude_previously_exported = exclude_previously_exported + if created_earliest_time is not None: + self.created_earliest_time = created_earliest_time + if created_oldest_time is not None: + self.created_oldest_time = created_oldest_time + if filter is not None: + self.filter = filter + if list_separator_token is not None: + self.list_separator_token = list_separator_token + + @property + def output_format(self): + """Gets the output_format of this ExportOptions. # noqa: E501 + + + :return: The output_format of this ExportOptions. # noqa: E501 + :rtype: str + """ + return self._output_format + + @output_format.setter + def output_format(self, output_format): + """Sets the output_format of this ExportOptions. + + + :param output_format: The output_format of this ExportOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and output_format is None: # noqa: E501 + raise ValueError("Invalid value for `output_format`, must not be `None`") # noqa: E501 + allowed_values = ["CSV_DEFAULT", "CSV_EXCEL"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and output_format not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `output_format` ({0}), must be one of {1}" # noqa: E501 + .format(output_format, allowed_values) + ) + + self._output_format = output_format + + @property + def exclude_previously_exported(self): + """Gets the exclude_previously_exported of this ExportOptions. # noqa: E501 + + + :return: The exclude_previously_exported of this ExportOptions. # noqa: E501 + :rtype: bool + """ + return self._exclude_previously_exported + + @exclude_previously_exported.setter + def exclude_previously_exported(self, exclude_previously_exported): + """Sets the exclude_previously_exported of this ExportOptions. + + + :param exclude_previously_exported: The exclude_previously_exported of this ExportOptions. # noqa: E501 + :type: bool + """ + + self._exclude_previously_exported = exclude_previously_exported + + @property + def created_earliest_time(self): + """Gets the created_earliest_time of this ExportOptions. # noqa: E501 + + + :return: The created_earliest_time of this ExportOptions. # noqa: E501 + :rtype: datetime + """ + return self._created_earliest_time + + @created_earliest_time.setter + def created_earliest_time(self, created_earliest_time): + """Sets the created_earliest_time of this ExportOptions. + + + :param created_earliest_time: The created_earliest_time of this ExportOptions. # noqa: E501 + :type: datetime + """ + + self._created_earliest_time = created_earliest_time + + @property + def created_oldest_time(self): + """Gets the created_oldest_time of this ExportOptions. # noqa: E501 + + + :return: The created_oldest_time of this ExportOptions. # noqa: E501 + :rtype: datetime + """ + return self._created_oldest_time + + @created_oldest_time.setter + def created_oldest_time(self, created_oldest_time): + """Sets the created_oldest_time of this ExportOptions. + + + :param created_oldest_time: The created_oldest_time of this ExportOptions. # noqa: E501 + :type: datetime + """ + + self._created_oldest_time = created_oldest_time + + @property + def filter(self): + """Gets the filter of this ExportOptions. # noqa: E501 + + + :return: The filter of this ExportOptions. # noqa: E501 + :rtype: str + """ + return self._filter + + @filter.setter + def filter(self, filter): + """Sets the filter of this ExportOptions. + + + :param filter: The filter of this ExportOptions. # noqa: E501 + :type: str + """ + + self._filter = filter + + @property + def list_separator_token(self): + """Gets the list_separator_token of this ExportOptions. # noqa: E501 + + + :return: The list_separator_token of this ExportOptions. # noqa: E501 + :rtype: str + """ + return self._list_separator_token + + @list_separator_token.setter + def list_separator_token(self, list_separator_token): + """Sets the list_separator_token of this ExportOptions. + + + :param list_separator_token: The list_separator_token of this ExportOptions. # noqa: E501 + :type: str + """ + + self._list_separator_token = list_separator_token + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ExportOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ExportOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/filter_bounced_recipients_options.py b/mailslurp_client/models/filter_bounced_recipients_options.py new file mode 100644 index 00000000..ec968172 --- /dev/null +++ b/mailslurp_client/models/filter_bounced_recipients_options.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class FilterBouncedRecipientsOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'email_recipients': 'list[str]' + } + + attribute_map = { + 'email_recipients': 'emailRecipients' + } + + def __init__(self, email_recipients=None, local_vars_configuration=None): # noqa: E501 + """FilterBouncedRecipientsOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._email_recipients = None + self.discriminator = None + + self.email_recipients = email_recipients + + @property + def email_recipients(self): + """Gets the email_recipients of this FilterBouncedRecipientsOptions. # noqa: E501 + + + :return: The email_recipients of this FilterBouncedRecipientsOptions. # noqa: E501 + :rtype: list[str] + """ + return self._email_recipients + + @email_recipients.setter + def email_recipients(self, email_recipients): + """Sets the email_recipients of this FilterBouncedRecipientsOptions. + + + :param email_recipients: The email_recipients of this FilterBouncedRecipientsOptions. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and email_recipients is None: # noqa: E501 + raise ValueError("Invalid value for `email_recipients`, must not be `None`") # noqa: E501 + + self._email_recipients = email_recipients + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FilterBouncedRecipientsOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FilterBouncedRecipientsOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/filter_bounced_recipients_result.py b/mailslurp_client/models/filter_bounced_recipients_result.py new file mode 100644 index 00000000..a28bdffc --- /dev/null +++ b/mailslurp_client/models/filter_bounced_recipients_result.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class FilterBouncedRecipientsResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'filtered_recipients': 'list[str]' + } + + attribute_map = { + 'filtered_recipients': 'filteredRecipients' + } + + def __init__(self, filtered_recipients=None, local_vars_configuration=None): # noqa: E501 + """FilterBouncedRecipientsResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._filtered_recipients = None + self.discriminator = None + + self.filtered_recipients = filtered_recipients + + @property + def filtered_recipients(self): + """Gets the filtered_recipients of this FilterBouncedRecipientsResult. # noqa: E501 + + + :return: The filtered_recipients of this FilterBouncedRecipientsResult. # noqa: E501 + :rtype: list[str] + """ + return self._filtered_recipients + + @filtered_recipients.setter + def filtered_recipients(self, filtered_recipients): + """Sets the filtered_recipients of this FilterBouncedRecipientsResult. + + + :param filtered_recipients: The filtered_recipients of this FilterBouncedRecipientsResult. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and filtered_recipients is None: # noqa: E501 + raise ValueError("Invalid value for `filtered_recipients`, must not be `None`") # noqa: E501 + + self._filtered_recipients = filtered_recipients + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FilterBouncedRecipientsResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FilterBouncedRecipientsResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/flush_expired_inboxes_result.py b/mailslurp_client/models/flush_expired_inboxes_result.py new file mode 100644 index 00000000..d05713f1 --- /dev/null +++ b/mailslurp_client/models/flush_expired_inboxes_result.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class FlushExpiredInboxesResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'inbox_ids': 'list[str]', + 'expire_before': 'datetime' + } + + attribute_map = { + 'inbox_ids': 'inboxIds', + 'expire_before': 'expireBefore' + } + + def __init__(self, inbox_ids=None, expire_before=None, local_vars_configuration=None): # noqa: E501 + """FlushExpiredInboxesResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._inbox_ids = None + self._expire_before = None + self.discriminator = None + + self.inbox_ids = inbox_ids + self.expire_before = expire_before + + @property + def inbox_ids(self): + """Gets the inbox_ids of this FlushExpiredInboxesResult. # noqa: E501 + + Inbox IDs affected by expiration # noqa: E501 + + :return: The inbox_ids of this FlushExpiredInboxesResult. # noqa: E501 + :rtype: list[str] + """ + return self._inbox_ids + + @inbox_ids.setter + def inbox_ids(self, inbox_ids): + """Sets the inbox_ids of this FlushExpiredInboxesResult. + + Inbox IDs affected by expiration # noqa: E501 + + :param inbox_ids: The inbox_ids of this FlushExpiredInboxesResult. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and inbox_ids is None: # noqa: E501 + raise ValueError("Invalid value for `inbox_ids`, must not be `None`") # noqa: E501 + + self._inbox_ids = inbox_ids + + @property + def expire_before(self): + """Gets the expire_before of this FlushExpiredInboxesResult. # noqa: E501 + + DateTime to filter inboxes so that those expiring before this time are expired # noqa: E501 + + :return: The expire_before of this FlushExpiredInboxesResult. # noqa: E501 + :rtype: datetime + """ + return self._expire_before + + @expire_before.setter + def expire_before(self, expire_before): + """Sets the expire_before of this FlushExpiredInboxesResult. + + DateTime to filter inboxes so that those expiring before this time are expired # noqa: E501 + + :param expire_before: The expire_before of this FlushExpiredInboxesResult. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and expire_before is None: # noqa: E501 + raise ValueError("Invalid value for `expire_before`, must not be `None`") # noqa: E501 + + self._expire_before = expire_before + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, FlushExpiredInboxesResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, FlushExpiredInboxesResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/forward_email_options.py b/mailslurp_client/models/forward_email_options.py new file mode 100644 index 00000000..0bd5fae1 --- /dev/null +++ b/mailslurp_client/models/forward_email_options.py @@ -0,0 +1,264 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class ForwardEmailOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'to': 'list[str]', + 'subject': 'str', + 'cc': 'list[str]', + 'bcc': 'list[str]', + '_from': 'str', + 'use_inbox_name': 'bool' + } + + attribute_map = { + 'to': 'to', + 'subject': 'subject', + 'cc': 'cc', + 'bcc': 'bcc', + '_from': 'from', + 'use_inbox_name': 'useInboxName' + } + + def __init__(self, to=None, subject=None, cc=None, bcc=None, _from=None, use_inbox_name=None, local_vars_configuration=None): # noqa: E501 + """ForwardEmailOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._to = None + self._subject = None + self._cc = None + self._bcc = None + self.__from = None + self._use_inbox_name = None + self.discriminator = None + + self.to = to + if subject is not None: + self.subject = subject + if cc is not None: + self.cc = cc + if bcc is not None: + self.bcc = bcc + if _from is not None: + self._from = _from + if use_inbox_name is not None: + self.use_inbox_name = use_inbox_name + + @property + def to(self): + """Gets the to of this ForwardEmailOptions. # noqa: E501 + + To recipients for forwarded email # noqa: E501 + + :return: The to of this ForwardEmailOptions. # noqa: E501 + :rtype: list[str] + """ + return self._to + + @to.setter + def to(self, to): + """Sets the to of this ForwardEmailOptions. + + To recipients for forwarded email # noqa: E501 + + :param to: The to of this ForwardEmailOptions. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and to is None: # noqa: E501 + raise ValueError("Invalid value for `to`, must not be `None`") # noqa: E501 + + self._to = to + + @property + def subject(self): + """Gets the subject of this ForwardEmailOptions. # noqa: E501 + + Subject for forwarded email # noqa: E501 + + :return: The subject of this ForwardEmailOptions. # noqa: E501 + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this ForwardEmailOptions. + + Subject for forwarded email # noqa: E501 + + :param subject: The subject of this ForwardEmailOptions. # noqa: E501 + :type: str + """ + + self._subject = subject + + @property + def cc(self): + """Gets the cc of this ForwardEmailOptions. # noqa: E501 + + Optional cc recipients # noqa: E501 + + :return: The cc of this ForwardEmailOptions. # noqa: E501 + :rtype: list[str] + """ + return self._cc + + @cc.setter + def cc(self, cc): + """Sets the cc of this ForwardEmailOptions. + + Optional cc recipients # noqa: E501 + + :param cc: The cc of this ForwardEmailOptions. # noqa: E501 + :type: list[str] + """ + + self._cc = cc + + @property + def bcc(self): + """Gets the bcc of this ForwardEmailOptions. # noqa: E501 + + Optional bcc recipients # noqa: E501 + + :return: The bcc of this ForwardEmailOptions. # noqa: E501 + :rtype: list[str] + """ + return self._bcc + + @bcc.setter + def bcc(self, bcc): + """Sets the bcc of this ForwardEmailOptions. + + Optional bcc recipients # noqa: E501 + + :param bcc: The bcc of this ForwardEmailOptions. # noqa: E501 + :type: list[str] + """ + + self._bcc = bcc + + @property + def _from(self): + """Gets the _from of this ForwardEmailOptions. # noqa: E501 + + Optional from override # noqa: E501 + + :return: The _from of this ForwardEmailOptions. # noqa: E501 + :rtype: str + """ + return self.__from + + @_from.setter + def _from(self, _from): + """Sets the _from of this ForwardEmailOptions. + + Optional from override # noqa: E501 + + :param _from: The _from of this ForwardEmailOptions. # noqa: E501 + :type: str + """ + + self.__from = _from + + @property + def use_inbox_name(self): + """Gets the use_inbox_name of this ForwardEmailOptions. # noqa: E501 + + Optionally use inbox name as display name for sender email address # noqa: E501 + + :return: The use_inbox_name of this ForwardEmailOptions. # noqa: E501 + :rtype: bool + """ + return self._use_inbox_name + + @use_inbox_name.setter + def use_inbox_name(self, use_inbox_name): + """Sets the use_inbox_name of this ForwardEmailOptions. + + Optionally use inbox name as display name for sender email address # noqa: E501 + + :param use_inbox_name: The use_inbox_name of this ForwardEmailOptions. # noqa: E501 + :type: bool + """ + + self._use_inbox_name = use_inbox_name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ForwardEmailOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ForwardEmailOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/gravatar_url.py b/mailslurp_client/models/gravatar_url.py new file mode 100644 index 00000000..ed8313ee --- /dev/null +++ b/mailslurp_client/models/gravatar_url.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class GravatarUrl(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'url': 'str', + 'hash': 'str' + } + + attribute_map = { + 'url': 'url', + 'hash': 'hash' + } + + def __init__(self, url=None, hash=None, local_vars_configuration=None): # noqa: E501 + """GravatarUrl - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._url = None + self._hash = None + self.discriminator = None + + self.url = url + self.hash = hash + + @property + def url(self): + """Gets the url of this GravatarUrl. # noqa: E501 + + + :return: The url of this GravatarUrl. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this GravatarUrl. + + + :param url: The url of this GravatarUrl. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and url is None: # noqa: E501 + raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501 + + self._url = url + + @property + def hash(self): + """Gets the hash of this GravatarUrl. # noqa: E501 + + + :return: The hash of this GravatarUrl. # noqa: E501 + :rtype: str + """ + return self._hash + + @hash.setter + def hash(self, hash): + """Sets the hash of this GravatarUrl. + + + :param hash: The hash of this GravatarUrl. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and hash is None: # noqa: E501 + raise ValueError("Invalid value for `hash`, must not be `None`") # noqa: E501 + + self._hash = hash + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GravatarUrl): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GravatarUrl): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/group_contacts_dto.py b/mailslurp_client/models/group_contacts_dto.py new file mode 100644 index 00000000..de076925 --- /dev/null +++ b/mailslurp_client/models/group_contacts_dto.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class GroupContactsDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'group': 'GroupDto', + 'contacts': 'list[ContactDto]' + } + + attribute_map = { + 'group': 'group', + 'contacts': 'contacts' + } + + def __init__(self, group=None, contacts=None, local_vars_configuration=None): # noqa: E501 + """GroupContactsDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._group = None + self._contacts = None + self.discriminator = None + + self.group = group + self.contacts = contacts + + @property + def group(self): + """Gets the group of this GroupContactsDto. # noqa: E501 + + + :return: The group of this GroupContactsDto. # noqa: E501 + :rtype: GroupDto + """ + return self._group + + @group.setter + def group(self, group): + """Sets the group of this GroupContactsDto. + + + :param group: The group of this GroupContactsDto. # noqa: E501 + :type: GroupDto + """ + if self.local_vars_configuration.client_side_validation and group is None: # noqa: E501 + raise ValueError("Invalid value for `group`, must not be `None`") # noqa: E501 + + self._group = group + + @property + def contacts(self): + """Gets the contacts of this GroupContactsDto. # noqa: E501 + + + :return: The contacts of this GroupContactsDto. # noqa: E501 + :rtype: list[ContactDto] + """ + return self._contacts + + @contacts.setter + def contacts(self, contacts): + """Sets the contacts of this GroupContactsDto. + + + :param contacts: The contacts of this GroupContactsDto. # noqa: E501 + :type: list[ContactDto] + """ + if self.local_vars_configuration.client_side_validation and contacts is None: # noqa: E501 + raise ValueError("Invalid value for `contacts`, must not be `None`") # noqa: E501 + + self._contacts = contacts + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GroupContactsDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GroupContactsDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/group_dto.py b/mailslurp_client/models/group_dto.py new file mode 100644 index 00000000..77fa84ea --- /dev/null +++ b/mailslurp_client/models/group_dto.py @@ -0,0 +1,202 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class GroupDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'name': 'str', + 'description': 'str', + 'created_at': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'description': 'description', + 'created_at': 'createdAt' + } + + def __init__(self, id=None, name=None, description=None, created_at=None, local_vars_configuration=None): # noqa: E501 + """GroupDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._name = None + self._description = None + self._created_at = None + self.discriminator = None + + self.id = id + self.name = name + if description is not None: + self.description = description + self.created_at = created_at + + @property + def id(self): + """Gets the id of this GroupDto. # noqa: E501 + + + :return: The id of this GroupDto. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this GroupDto. + + + :param id: The id of this GroupDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def name(self): + """Gets the name of this GroupDto. # noqa: E501 + + + :return: The name of this GroupDto. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this GroupDto. + + + :param name: The name of this GroupDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def description(self): + """Gets the description of this GroupDto. # noqa: E501 + + + :return: The description of this GroupDto. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this GroupDto. + + + :param description: The description of this GroupDto. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def created_at(self): + """Gets the created_at of this GroupDto. # noqa: E501 + + + :return: The created_at of this GroupDto. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this GroupDto. + + + :param created_at: The created_at of this GroupDto. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GroupDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GroupDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/group_projection.py b/mailslurp_client/models/group_projection.py new file mode 100644 index 00000000..d8b6ab0c --- /dev/null +++ b/mailslurp_client/models/group_projection.py @@ -0,0 +1,202 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class GroupProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'id': 'str', + 'description': 'str', + 'created_at': 'datetime' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'description': 'description', + 'created_at': 'createdAt' + } + + def __init__(self, name=None, id=None, description=None, created_at=None, local_vars_configuration=None): # noqa: E501 + """GroupProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._id = None + self._description = None + self._created_at = None + self.discriminator = None + + self.name = name + self.id = id + if description is not None: + self.description = description + self.created_at = created_at + + @property + def name(self): + """Gets the name of this GroupProjection. # noqa: E501 + + + :return: The name of this GroupProjection. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this GroupProjection. + + + :param name: The name of this GroupProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def id(self): + """Gets the id of this GroupProjection. # noqa: E501 + + + :return: The id of this GroupProjection. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this GroupProjection. + + + :param id: The id of this GroupProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def description(self): + """Gets the description of this GroupProjection. # noqa: E501 + + + :return: The description of this GroupProjection. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this GroupProjection. + + + :param description: The description of this GroupProjection. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def created_at(self): + """Gets the created_at of this GroupProjection. # noqa: E501 + + + :return: The created_at of this GroupProjection. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this GroupProjection. + + + :param created_at: The created_at of this GroupProjection. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GroupProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, GroupProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/html_validation_result.py b/mailslurp_client/models/html_validation_result.py new file mode 100644 index 00000000..604e0167 --- /dev/null +++ b/mailslurp_client/models/html_validation_result.py @@ -0,0 +1,182 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class HTMLValidationResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'is_valid': 'bool', + 'errors': 'list[ValidationMessage]', + 'warnings': 'list[ValidationMessage]' + } + + attribute_map = { + 'is_valid': 'isValid', + 'errors': 'errors', + 'warnings': 'warnings' + } + + def __init__(self, is_valid=None, errors=None, warnings=None, local_vars_configuration=None): # noqa: E501 + """HTMLValidationResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._is_valid = None + self._errors = None + self._warnings = None + self.discriminator = None + + self.is_valid = is_valid + self.errors = errors + self.warnings = warnings + + @property + def is_valid(self): + """Gets the is_valid of this HTMLValidationResult. # noqa: E501 + + Is HTML validation result valid # noqa: E501 + + :return: The is_valid of this HTMLValidationResult. # noqa: E501 + :rtype: bool + """ + return self._is_valid + + @is_valid.setter + def is_valid(self, is_valid): + """Sets the is_valid of this HTMLValidationResult. + + Is HTML validation result valid # noqa: E501 + + :param is_valid: The is_valid of this HTMLValidationResult. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and is_valid is None: # noqa: E501 + raise ValueError("Invalid value for `is_valid`, must not be `None`") # noqa: E501 + + self._is_valid = is_valid + + @property + def errors(self): + """Gets the errors of this HTMLValidationResult. # noqa: E501 + + Optional errors resulting from HTML validation # noqa: E501 + + :return: The errors of this HTMLValidationResult. # noqa: E501 + :rtype: list[ValidationMessage] + """ + return self._errors + + @errors.setter + def errors(self, errors): + """Sets the errors of this HTMLValidationResult. + + Optional errors resulting from HTML validation # noqa: E501 + + :param errors: The errors of this HTMLValidationResult. # noqa: E501 + :type: list[ValidationMessage] + """ + if self.local_vars_configuration.client_side_validation and errors is None: # noqa: E501 + raise ValueError("Invalid value for `errors`, must not be `None`") # noqa: E501 + + self._errors = errors + + @property + def warnings(self): + """Gets the warnings of this HTMLValidationResult. # noqa: E501 + + Optional warnings resulting from HTML validation # noqa: E501 + + :return: The warnings of this HTMLValidationResult. # noqa: E501 + :rtype: list[ValidationMessage] + """ + return self._warnings + + @warnings.setter + def warnings(self, warnings): + """Sets the warnings of this HTMLValidationResult. + + Optional warnings resulting from HTML validation # noqa: E501 + + :param warnings: The warnings of this HTMLValidationResult. # noqa: E501 + :type: list[ValidationMessage] + """ + if self.local_vars_configuration.client_side_validation and warnings is None: # noqa: E501 + raise ValueError("Invalid value for `warnings`, must not be `None`") # noqa: E501 + + self._warnings = warnings + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, HTMLValidationResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, HTMLValidationResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/imap_flag_operation_options.py b/mailslurp_client/models/imap_flag_operation_options.py new file mode 100644 index 00000000..291dafd9 --- /dev/null +++ b/mailslurp_client/models/imap_flag_operation_options.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class ImapFlagOperationOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'flag_operation': 'str', + 'flags': 'list[str]' + } + + attribute_map = { + 'flag_operation': 'flagOperation', + 'flags': 'flags' + } + + def __init__(self, flag_operation=None, flags=None, local_vars_configuration=None): # noqa: E501 + """ImapFlagOperationOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._flag_operation = None + self._flags = None + self.discriminator = None + + self.flag_operation = flag_operation + self.flags = flags + + @property + def flag_operation(self): + """Gets the flag_operation of this ImapFlagOperationOptions. # noqa: E501 + + + :return: The flag_operation of this ImapFlagOperationOptions. # noqa: E501 + :rtype: str + """ + return self._flag_operation + + @flag_operation.setter + def flag_operation(self, flag_operation): + """Sets the flag_operation of this ImapFlagOperationOptions. + + + :param flag_operation: The flag_operation of this ImapFlagOperationOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and flag_operation is None: # noqa: E501 + raise ValueError("Invalid value for `flag_operation`, must not be `None`") # noqa: E501 + allowed_values = ["SET_FLAGS", "ADD_FLAGS", "REMOVE_FLAGS"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and flag_operation not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `flag_operation` ({0}), must be one of {1}" # noqa: E501 + .format(flag_operation, allowed_values) + ) + + self._flag_operation = flag_operation + + @property + def flags(self): + """Gets the flags of this ImapFlagOperationOptions. # noqa: E501 + + + :return: The flags of this ImapFlagOperationOptions. # noqa: E501 + :rtype: list[str] + """ + return self._flags + + @flags.setter + def flags(self, flags): + """Sets the flags of this ImapFlagOperationOptions. + + + :param flags: The flags of this ImapFlagOperationOptions. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and flags is None: # noqa: E501 + raise ValueError("Invalid value for `flags`, must not be `None`") # noqa: E501 + + self._flags = flags + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ImapFlagOperationOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ImapFlagOperationOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/imap_smtp_access_details.py b/mailslurp_client/models/imap_smtp_access_details.py new file mode 100644 index 00000000..cb540f2b --- /dev/null +++ b/mailslurp_client/models/imap_smtp_access_details.py @@ -0,0 +1,327 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class ImapSmtpAccessDetails(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'smtp_server_host': 'str', + 'smtp_server_port': 'int', + 'smtp_username': 'str', + 'smtp_password': 'str', + 'imap_server_host': 'str', + 'imap_server_port': 'int', + 'imap_username': 'str', + 'imap_password': 'str' + } + + attribute_map = { + 'smtp_server_host': 'smtpServerHost', + 'smtp_server_port': 'smtpServerPort', + 'smtp_username': 'smtpUsername', + 'smtp_password': 'smtpPassword', + 'imap_server_host': 'imapServerHost', + 'imap_server_port': 'imapServerPort', + 'imap_username': 'imapUsername', + 'imap_password': 'imapPassword' + } + + def __init__(self, smtp_server_host=None, smtp_server_port=None, smtp_username=None, smtp_password=None, imap_server_host=None, imap_server_port=None, imap_username=None, imap_password=None, local_vars_configuration=None): # noqa: E501 + """ImapSmtpAccessDetails - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._smtp_server_host = None + self._smtp_server_port = None + self._smtp_username = None + self._smtp_password = None + self._imap_server_host = None + self._imap_server_port = None + self._imap_username = None + self._imap_password = None + self.discriminator = None + + self.smtp_server_host = smtp_server_host + self.smtp_server_port = smtp_server_port + self.smtp_username = smtp_username + self.smtp_password = smtp_password + self.imap_server_host = imap_server_host + self.imap_server_port = imap_server_port + self.imap_username = imap_username + self.imap_password = imap_password + + @property + def smtp_server_host(self): + """Gets the smtp_server_host of this ImapSmtpAccessDetails. # noqa: E501 + + SMTP server host domain # noqa: E501 + + :return: The smtp_server_host of this ImapSmtpAccessDetails. # noqa: E501 + :rtype: str + """ + return self._smtp_server_host + + @smtp_server_host.setter + def smtp_server_host(self, smtp_server_host): + """Sets the smtp_server_host of this ImapSmtpAccessDetails. + + SMTP server host domain # noqa: E501 + + :param smtp_server_host: The smtp_server_host of this ImapSmtpAccessDetails. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and smtp_server_host is None: # noqa: E501 + raise ValueError("Invalid value for `smtp_server_host`, must not be `None`") # noqa: E501 + + self._smtp_server_host = smtp_server_host + + @property + def smtp_server_port(self): + """Gets the smtp_server_port of this ImapSmtpAccessDetails. # noqa: E501 + + SMTP server host port # noqa: E501 + + :return: The smtp_server_port of this ImapSmtpAccessDetails. # noqa: E501 + :rtype: int + """ + return self._smtp_server_port + + @smtp_server_port.setter + def smtp_server_port(self, smtp_server_port): + """Sets the smtp_server_port of this ImapSmtpAccessDetails. + + SMTP server host port # noqa: E501 + + :param smtp_server_port: The smtp_server_port of this ImapSmtpAccessDetails. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and smtp_server_port is None: # noqa: E501 + raise ValueError("Invalid value for `smtp_server_port`, must not be `None`") # noqa: E501 + + self._smtp_server_port = smtp_server_port + + @property + def smtp_username(self): + """Gets the smtp_username of this ImapSmtpAccessDetails. # noqa: E501 + + SMTP username for login # noqa: E501 + + :return: The smtp_username of this ImapSmtpAccessDetails. # noqa: E501 + :rtype: str + """ + return self._smtp_username + + @smtp_username.setter + def smtp_username(self, smtp_username): + """Sets the smtp_username of this ImapSmtpAccessDetails. + + SMTP username for login # noqa: E501 + + :param smtp_username: The smtp_username of this ImapSmtpAccessDetails. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and smtp_username is None: # noqa: E501 + raise ValueError("Invalid value for `smtp_username`, must not be `None`") # noqa: E501 + + self._smtp_username = smtp_username + + @property + def smtp_password(self): + """Gets the smtp_password of this ImapSmtpAccessDetails. # noqa: E501 + + SMTP for login # noqa: E501 + + :return: The smtp_password of this ImapSmtpAccessDetails. # noqa: E501 + :rtype: str + """ + return self._smtp_password + + @smtp_password.setter + def smtp_password(self, smtp_password): + """Sets the smtp_password of this ImapSmtpAccessDetails. + + SMTP for login # noqa: E501 + + :param smtp_password: The smtp_password of this ImapSmtpAccessDetails. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and smtp_password is None: # noqa: E501 + raise ValueError("Invalid value for `smtp_password`, must not be `None`") # noqa: E501 + + self._smtp_password = smtp_password + + @property + def imap_server_host(self): + """Gets the imap_server_host of this ImapSmtpAccessDetails. # noqa: E501 + + IMAP server host domain # noqa: E501 + + :return: The imap_server_host of this ImapSmtpAccessDetails. # noqa: E501 + :rtype: str + """ + return self._imap_server_host + + @imap_server_host.setter + def imap_server_host(self, imap_server_host): + """Sets the imap_server_host of this ImapSmtpAccessDetails. + + IMAP server host domain # noqa: E501 + + :param imap_server_host: The imap_server_host of this ImapSmtpAccessDetails. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and imap_server_host is None: # noqa: E501 + raise ValueError("Invalid value for `imap_server_host`, must not be `None`") # noqa: E501 + + self._imap_server_host = imap_server_host + + @property + def imap_server_port(self): + """Gets the imap_server_port of this ImapSmtpAccessDetails. # noqa: E501 + + IMAP server host port # noqa: E501 + + :return: The imap_server_port of this ImapSmtpAccessDetails. # noqa: E501 + :rtype: int + """ + return self._imap_server_port + + @imap_server_port.setter + def imap_server_port(self, imap_server_port): + """Sets the imap_server_port of this ImapSmtpAccessDetails. + + IMAP server host port # noqa: E501 + + :param imap_server_port: The imap_server_port of this ImapSmtpAccessDetails. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and imap_server_port is None: # noqa: E501 + raise ValueError("Invalid value for `imap_server_port`, must not be `None`") # noqa: E501 + + self._imap_server_port = imap_server_port + + @property + def imap_username(self): + """Gets the imap_username of this ImapSmtpAccessDetails. # noqa: E501 + + IMAP username for login # noqa: E501 + + :return: The imap_username of this ImapSmtpAccessDetails. # noqa: E501 + :rtype: str + """ + return self._imap_username + + @imap_username.setter + def imap_username(self, imap_username): + """Sets the imap_username of this ImapSmtpAccessDetails. + + IMAP username for login # noqa: E501 + + :param imap_username: The imap_username of this ImapSmtpAccessDetails. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and imap_username is None: # noqa: E501 + raise ValueError("Invalid value for `imap_username`, must not be `None`") # noqa: E501 + + self._imap_username = imap_username + + @property + def imap_password(self): + """Gets the imap_password of this ImapSmtpAccessDetails. # noqa: E501 + + IMAP password for login # noqa: E501 + + :return: The imap_password of this ImapSmtpAccessDetails. # noqa: E501 + :rtype: str + """ + return self._imap_password + + @imap_password.setter + def imap_password(self, imap_password): + """Sets the imap_password of this ImapSmtpAccessDetails. + + IMAP password for login # noqa: E501 + + :param imap_password: The imap_password of this ImapSmtpAccessDetails. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and imap_password is None: # noqa: E501 + raise ValueError("Invalid value for `imap_password`, must not be `None`") # noqa: E501 + + self._imap_password = imap_password + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ImapSmtpAccessDetails): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ImapSmtpAccessDetails): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/inbox_by_email_address_result.py b/mailslurp_client/models/inbox_by_email_address_result.py new file mode 100644 index 00000000..ac9a2a29 --- /dev/null +++ b/mailslurp_client/models/inbox_by_email_address_result.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class InboxByEmailAddressResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'inbox_id': 'str', + 'exists': 'bool' + } + + attribute_map = { + 'inbox_id': 'inboxId', + 'exists': 'exists' + } + + def __init__(self, inbox_id=None, exists=None, local_vars_configuration=None): # noqa: E501 + """InboxByEmailAddressResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._inbox_id = None + self._exists = None + self.discriminator = None + + if inbox_id is not None: + self.inbox_id = inbox_id + self.exists = exists + + @property + def inbox_id(self): + """Gets the inbox_id of this InboxByEmailAddressResult. # noqa: E501 + + + :return: The inbox_id of this InboxByEmailAddressResult. # noqa: E501 + :rtype: str + """ + return self._inbox_id + + @inbox_id.setter + def inbox_id(self, inbox_id): + """Sets the inbox_id of this InboxByEmailAddressResult. + + + :param inbox_id: The inbox_id of this InboxByEmailAddressResult. # noqa: E501 + :type: str + """ + + self._inbox_id = inbox_id + + @property + def exists(self): + """Gets the exists of this InboxByEmailAddressResult. # noqa: E501 + + + :return: The exists of this InboxByEmailAddressResult. # noqa: E501 + :rtype: bool + """ + return self._exists + + @exists.setter + def exists(self, exists): + """Sets the exists of this InboxByEmailAddressResult. + + + :param exists: The exists of this InboxByEmailAddressResult. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and exists is None: # noqa: E501 + raise ValueError("Invalid value for `exists`, must not be `None`") # noqa: E501 + + self._exists = exists + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InboxByEmailAddressResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InboxByEmailAddressResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/inbox_by_name_result.py b/mailslurp_client/models/inbox_by_name_result.py new file mode 100644 index 00000000..1c35ece6 --- /dev/null +++ b/mailslurp_client/models/inbox_by_name_result.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class InboxByNameResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'inbox_id': 'str', + 'exists': 'bool' + } + + attribute_map = { + 'inbox_id': 'inboxId', + 'exists': 'exists' + } + + def __init__(self, inbox_id=None, exists=None, local_vars_configuration=None): # noqa: E501 + """InboxByNameResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._inbox_id = None + self._exists = None + self.discriminator = None + + if inbox_id is not None: + self.inbox_id = inbox_id + self.exists = exists + + @property + def inbox_id(self): + """Gets the inbox_id of this InboxByNameResult. # noqa: E501 + + + :return: The inbox_id of this InboxByNameResult. # noqa: E501 + :rtype: str + """ + return self._inbox_id + + @inbox_id.setter + def inbox_id(self, inbox_id): + """Sets the inbox_id of this InboxByNameResult. + + + :param inbox_id: The inbox_id of this InboxByNameResult. # noqa: E501 + :type: str + """ + + self._inbox_id = inbox_id + + @property + def exists(self): + """Gets the exists of this InboxByNameResult. # noqa: E501 + + + :return: The exists of this InboxByNameResult. # noqa: E501 + :rtype: bool + """ + return self._exists + + @exists.setter + def exists(self, exists): + """Sets the exists of this InboxByNameResult. + + + :param exists: The exists of this InboxByNameResult. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and exists is None: # noqa: E501 + raise ValueError("Invalid value for `exists`, must not be `None`") # noqa: E501 + + self._exists = exists + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InboxByNameResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InboxByNameResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/inbox_dto.py b/mailslurp_client/models/inbox_dto.py new file mode 100644 index 00000000..14f2c464 --- /dev/null +++ b/mailslurp_client/models/inbox_dto.py @@ -0,0 +1,464 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class InboxDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'user_id': 'str', + 'created_at': 'datetime', + 'name': 'str', + 'domain_id': 'str', + 'description': 'str', + 'email_address': 'str', + 'expires_at': 'str', + 'favourite': 'bool', + 'tags': 'list[str]', + 'inbox_type': 'str', + 'read_only': 'bool', + 'virtual_inbox': 'bool' + } + + attribute_map = { + 'id': 'id', + 'user_id': 'userId', + 'created_at': 'createdAt', + 'name': 'name', + 'domain_id': 'domainId', + 'description': 'description', + 'email_address': 'emailAddress', + 'expires_at': 'expiresAt', + 'favourite': 'favourite', + 'tags': 'tags', + 'inbox_type': 'inboxType', + 'read_only': 'readOnly', + 'virtual_inbox': 'virtualInbox' + } + + def __init__(self, id=None, user_id=None, created_at=None, name=None, domain_id=None, description=None, email_address=None, expires_at=None, favourite=None, tags=None, inbox_type=None, read_only=None, virtual_inbox=None, local_vars_configuration=None): # noqa: E501 + """InboxDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._user_id = None + self._created_at = None + self._name = None + self._domain_id = None + self._description = None + self._email_address = None + self._expires_at = None + self._favourite = None + self._tags = None + self._inbox_type = None + self._read_only = None + self._virtual_inbox = None + self.discriminator = None + + self.id = id + self.user_id = user_id + self.created_at = created_at + self.name = name + self.domain_id = domain_id + self.description = description + self.email_address = email_address + self.expires_at = expires_at + self.favourite = favourite + self.tags = tags + self.inbox_type = inbox_type + self.read_only = read_only + self.virtual_inbox = virtual_inbox + + @property + def id(self): + """Gets the id of this InboxDto. # noqa: E501 + + ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically. # noqa: E501 + + :return: The id of this InboxDto. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this InboxDto. + + ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically. # noqa: E501 + + :param id: The id of this InboxDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def user_id(self): + """Gets the user_id of this InboxDto. # noqa: E501 + + ID of user that inbox belongs to # noqa: E501 + + :return: The user_id of this InboxDto. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this InboxDto. + + ID of user that inbox belongs to # noqa: E501 + + :param user_id: The user_id of this InboxDto. # noqa: E501 + :type: str + """ + + self._user_id = user_id + + @property + def created_at(self): + """Gets the created_at of this InboxDto. # noqa: E501 + + When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`. # noqa: E501 + + :return: The created_at of this InboxDto. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this InboxDto. + + When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`. # noqa: E501 + + :param created_at: The created_at of this InboxDto. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + @property + def name(self): + """Gets the name of this InboxDto. # noqa: E501 + + Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search # noqa: E501 + + :return: The name of this InboxDto. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this InboxDto. + + Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search # noqa: E501 + + :param name: The name of this InboxDto. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def domain_id(self): + """Gets the domain_id of this InboxDto. # noqa: E501 + + ID of custom domain used by the inbox if any # noqa: E501 + + :return: The domain_id of this InboxDto. # noqa: E501 + :rtype: str + """ + return self._domain_id + + @domain_id.setter + def domain_id(self, domain_id): + """Sets the domain_id of this InboxDto. + + ID of custom domain used by the inbox if any # noqa: E501 + + :param domain_id: The domain_id of this InboxDto. # noqa: E501 + :type: str + """ + + self._domain_id = domain_id + + @property + def description(self): + """Gets the description of this InboxDto. # noqa: E501 + + Description of an inbox for labelling and searching purposes # noqa: E501 + + :return: The description of this InboxDto. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this InboxDto. + + Description of an inbox for labelling and searching purposes # noqa: E501 + + :param description: The description of this InboxDto. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def email_address(self): + """Gets the email_address of this InboxDto. # noqa: E501 + + The inbox's email address. Inbox projections and previews may not include the email address. To view the email address fetch the inbox entity directly. Send an email to this address and the inbox will receive and store it for you. Note the email address in MailSlurp match characters exactly and are case sensitive so `+123` additions are considered different addresses. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. # noqa: E501 + + :return: The email_address of this InboxDto. # noqa: E501 + :rtype: str + """ + return self._email_address + + @email_address.setter + def email_address(self, email_address): + """Sets the email_address of this InboxDto. + + The inbox's email address. Inbox projections and previews may not include the email address. To view the email address fetch the inbox entity directly. Send an email to this address and the inbox will receive and store it for you. Note the email address in MailSlurp match characters exactly and are case sensitive so `+123` additions are considered different addresses. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. # noqa: E501 + + :param email_address: The email_address of this InboxDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and email_address is None: # noqa: E501 + raise ValueError("Invalid value for `email_address`, must not be `None`") # noqa: E501 + + self._email_address = email_address + + @property + def expires_at(self): + """Gets the expires_at of this InboxDto. # noqa: E501 + + Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email. # noqa: E501 + + :return: The expires_at of this InboxDto. # noqa: E501 + :rtype: str + """ + return self._expires_at + + @expires_at.setter + def expires_at(self, expires_at): + """Sets the expires_at of this InboxDto. + + Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email. # noqa: E501 + + :param expires_at: The expires_at of this InboxDto. # noqa: E501 + :type: str + """ + + self._expires_at = expires_at + + @property + def favourite(self): + """Gets the favourite of this InboxDto. # noqa: E501 + + Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering # noqa: E501 + + :return: The favourite of this InboxDto. # noqa: E501 + :rtype: bool + """ + return self._favourite + + @favourite.setter + def favourite(self, favourite): + """Sets the favourite of this InboxDto. + + Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering # noqa: E501 + + :param favourite: The favourite of this InboxDto. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and favourite is None: # noqa: E501 + raise ValueError("Invalid value for `favourite`, must not be `None`") # noqa: E501 + + self._favourite = favourite + + @property + def tags(self): + """Gets the tags of this InboxDto. # noqa: E501 + + Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. # noqa: E501 + + :return: The tags of this InboxDto. # noqa: E501 + :rtype: list[str] + """ + return self._tags + + @tags.setter + def tags(self, tags): + """Sets the tags of this InboxDto. + + Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. # noqa: E501 + + :param tags: The tags of this InboxDto. # noqa: E501 + :type: list[str] + """ + + self._tags = tags + + @property + def inbox_type(self): + """Gets the inbox_type of this InboxDto. # noqa: E501 + + Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). # noqa: E501 + + :return: The inbox_type of this InboxDto. # noqa: E501 + :rtype: str + """ + return self._inbox_type + + @inbox_type.setter + def inbox_type(self, inbox_type): + """Sets the inbox_type of this InboxDto. + + Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). # noqa: E501 + + :param inbox_type: The inbox_type of this InboxDto. # noqa: E501 + :type: str + """ + allowed_values = [None,"HTTP_INBOX", "SMTP_INBOX"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and inbox_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `inbox_type` ({0}), must be one of {1}" # noqa: E501 + .format(inbox_type, allowed_values) + ) + + self._inbox_type = inbox_type + + @property + def read_only(self): + """Gets the read_only of this InboxDto. # noqa: E501 + + Is the inbox readOnly for the caller. Read only means can not be deleted or modified. This flag is present when using team accounts and shared inboxes. # noqa: E501 + + :return: The read_only of this InboxDto. # noqa: E501 + :rtype: bool + """ + return self._read_only + + @read_only.setter + def read_only(self, read_only): + """Sets the read_only of this InboxDto. + + Is the inbox readOnly for the caller. Read only means can not be deleted or modified. This flag is present when using team accounts and shared inboxes. # noqa: E501 + + :param read_only: The read_only of this InboxDto. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and read_only is None: # noqa: E501 + raise ValueError("Invalid value for `read_only`, must not be `None`") # noqa: E501 + + self._read_only = read_only + + @property + def virtual_inbox(self): + """Gets the virtual_inbox of this InboxDto. # noqa: E501 + + Virtual inbox can receive email but will not send emails to real recipients. Will save sent email record but never send an actual email. Perfect for testing mail server actions. # noqa: E501 + + :return: The virtual_inbox of this InboxDto. # noqa: E501 + :rtype: bool + """ + return self._virtual_inbox + + @virtual_inbox.setter + def virtual_inbox(self, virtual_inbox): + """Sets the virtual_inbox of this InboxDto. + + Virtual inbox can receive email but will not send emails to real recipients. Will save sent email record but never send an actual email. Perfect for testing mail server actions. # noqa: E501 + + :param virtual_inbox: The virtual_inbox of this InboxDto. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and virtual_inbox is None: # noqa: E501 + raise ValueError("Invalid value for `virtual_inbox`, must not be `None`") # noqa: E501 + + self._virtual_inbox = virtual_inbox + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InboxDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InboxDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/inbox_exists_dto.py b/mailslurp_client/models/inbox_exists_dto.py new file mode 100644 index 00000000..f184bdd2 --- /dev/null +++ b/mailslurp_client/models/inbox_exists_dto.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class InboxExistsDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'exists': 'bool' + } + + attribute_map = { + 'exists': 'exists' + } + + def __init__(self, exists=None, local_vars_configuration=None): # noqa: E501 + """InboxExistsDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._exists = None + self.discriminator = None + + self.exists = exists + + @property + def exists(self): + """Gets the exists of this InboxExistsDto. # noqa: E501 + + + :return: The exists of this InboxExistsDto. # noqa: E501 + :rtype: bool + """ + return self._exists + + @exists.setter + def exists(self, exists): + """Sets the exists of this InboxExistsDto. + + + :param exists: The exists of this InboxExistsDto. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and exists is None: # noqa: E501 + raise ValueError("Invalid value for `exists`, must not be `None`") # noqa: E501 + + self._exists = exists + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InboxExistsDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InboxExistsDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/inbox_forwarder_dto.py b/mailslurp_client/models/inbox_forwarder_dto.py new file mode 100644 index 00000000..090b6575 --- /dev/null +++ b/mailslurp_client/models/inbox_forwarder_dto.py @@ -0,0 +1,263 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class InboxForwarderDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'inbox_id': 'str', + 'field': 'str', + 'match': 'str', + 'forward_to_recipients': 'list[str]', + 'created_at': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'inbox_id': 'inboxId', + 'field': 'field', + 'match': 'match', + 'forward_to_recipients': 'forwardToRecipients', + 'created_at': 'createdAt' + } + + def __init__(self, id=None, inbox_id=None, field=None, match=None, forward_to_recipients=None, created_at=None, local_vars_configuration=None): # noqa: E501 + """InboxForwarderDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._inbox_id = None + self._field = None + self._match = None + self._forward_to_recipients = None + self._created_at = None + self.discriminator = None + + self.id = id + self.inbox_id = inbox_id + self.field = field + self.match = match + self.forward_to_recipients = forward_to_recipients + self.created_at = created_at + + @property + def id(self): + """Gets the id of this InboxForwarderDto. # noqa: E501 + + + :return: The id of this InboxForwarderDto. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this InboxForwarderDto. + + + :param id: The id of this InboxForwarderDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def inbox_id(self): + """Gets the inbox_id of this InboxForwarderDto. # noqa: E501 + + + :return: The inbox_id of this InboxForwarderDto. # noqa: E501 + :rtype: str + """ + return self._inbox_id + + @inbox_id.setter + def inbox_id(self, inbox_id): + """Sets the inbox_id of this InboxForwarderDto. + + + :param inbox_id: The inbox_id of this InboxForwarderDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and inbox_id is None: # noqa: E501 + raise ValueError("Invalid value for `inbox_id`, must not be `None`") # noqa: E501 + + self._inbox_id = inbox_id + + @property + def field(self): + """Gets the field of this InboxForwarderDto. # noqa: E501 + + + :return: The field of this InboxForwarderDto. # noqa: E501 + :rtype: str + """ + return self._field + + @field.setter + def field(self, field): + """Sets the field of this InboxForwarderDto. + + + :param field: The field of this InboxForwarderDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and field is None: # noqa: E501 + raise ValueError("Invalid value for `field`, must not be `None`") # noqa: E501 + allowed_values = ["RECIPIENTS", "SENDER", "SUBJECT", "ATTACHMENTS"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and field not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `field` ({0}), must be one of {1}" # noqa: E501 + .format(field, allowed_values) + ) + + self._field = field + + @property + def match(self): + """Gets the match of this InboxForwarderDto. # noqa: E501 + + + :return: The match of this InboxForwarderDto. # noqa: E501 + :rtype: str + """ + return self._match + + @match.setter + def match(self, match): + """Sets the match of this InboxForwarderDto. + + + :param match: The match of this InboxForwarderDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and match is None: # noqa: E501 + raise ValueError("Invalid value for `match`, must not be `None`") # noqa: E501 + + self._match = match + + @property + def forward_to_recipients(self): + """Gets the forward_to_recipients of this InboxForwarderDto. # noqa: E501 + + + :return: The forward_to_recipients of this InboxForwarderDto. # noqa: E501 + :rtype: list[str] + """ + return self._forward_to_recipients + + @forward_to_recipients.setter + def forward_to_recipients(self, forward_to_recipients): + """Sets the forward_to_recipients of this InboxForwarderDto. + + + :param forward_to_recipients: The forward_to_recipients of this InboxForwarderDto. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and forward_to_recipients is None: # noqa: E501 + raise ValueError("Invalid value for `forward_to_recipients`, must not be `None`") # noqa: E501 + + self._forward_to_recipients = forward_to_recipients + + @property + def created_at(self): + """Gets the created_at of this InboxForwarderDto. # noqa: E501 + + + :return: The created_at of this InboxForwarderDto. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this InboxForwarderDto. + + + :param created_at: The created_at of this InboxForwarderDto. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InboxForwarderDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InboxForwarderDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/inbox_forwarder_test_options.py b/mailslurp_client/models/inbox_forwarder_test_options.py new file mode 100644 index 00000000..f0bf4d80 --- /dev/null +++ b/mailslurp_client/models/inbox_forwarder_test_options.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class InboxForwarderTestOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'test_value': 'str' + } + + attribute_map = { + 'test_value': 'testValue' + } + + def __init__(self, test_value=None, local_vars_configuration=None): # noqa: E501 + """InboxForwarderTestOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._test_value = None + self.discriminator = None + + self.test_value = test_value + + @property + def test_value(self): + """Gets the test_value of this InboxForwarderTestOptions. # noqa: E501 + + + :return: The test_value of this InboxForwarderTestOptions. # noqa: E501 + :rtype: str + """ + return self._test_value + + @test_value.setter + def test_value(self, test_value): + """Sets the test_value of this InboxForwarderTestOptions. + + + :param test_value: The test_value of this InboxForwarderTestOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and test_value is None: # noqa: E501 + raise ValueError("Invalid value for `test_value`, must not be `None`") # noqa: E501 + + self._test_value = test_value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InboxForwarderTestOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InboxForwarderTestOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/inbox_forwarder_test_result.py b/mailslurp_client/models/inbox_forwarder_test_result.py new file mode 100644 index 00000000..abd4660f --- /dev/null +++ b/mailslurp_client/models/inbox_forwarder_test_result.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class InboxForwarderTestResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'matches': 'dict(str, bool)', + 'does_match': 'bool' + } + + attribute_map = { + 'matches': 'matches', + 'does_match': 'doesMatch' + } + + def __init__(self, matches=None, does_match=None, local_vars_configuration=None): # noqa: E501 + """InboxForwarderTestResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._matches = None + self._does_match = None + self.discriminator = None + + self.matches = matches + self.does_match = does_match + + @property + def matches(self): + """Gets the matches of this InboxForwarderTestResult. # noqa: E501 + + + :return: The matches of this InboxForwarderTestResult. # noqa: E501 + :rtype: dict(str, bool) + """ + return self._matches + + @matches.setter + def matches(self, matches): + """Sets the matches of this InboxForwarderTestResult. + + + :param matches: The matches of this InboxForwarderTestResult. # noqa: E501 + :type: dict(str, bool) + """ + if self.local_vars_configuration.client_side_validation and matches is None: # noqa: E501 + raise ValueError("Invalid value for `matches`, must not be `None`") # noqa: E501 + + self._matches = matches + + @property + def does_match(self): + """Gets the does_match of this InboxForwarderTestResult. # noqa: E501 + + + :return: The does_match of this InboxForwarderTestResult. # noqa: E501 + :rtype: bool + """ + return self._does_match + + @does_match.setter + def does_match(self, does_match): + """Sets the does_match of this InboxForwarderTestResult. + + + :param does_match: The does_match of this InboxForwarderTestResult. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and does_match is None: # noqa: E501 + raise ValueError("Invalid value for `does_match`, must not be `None`") # noqa: E501 + + self._does_match = does_match + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InboxForwarderTestResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InboxForwarderTestResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/inbox_id_item.py b/mailslurp_client/models/inbox_id_item.py new file mode 100644 index 00000000..3310235c --- /dev/null +++ b/mailslurp_client/models/inbox_id_item.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class InboxIdItem(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'email_address': 'str' + } + + attribute_map = { + 'id': 'id', + 'email_address': 'emailAddress' + } + + def __init__(self, id=None, email_address=None, local_vars_configuration=None): # noqa: E501 + """InboxIdItem - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._email_address = None + self.discriminator = None + + self.id = id + self.email_address = email_address + + @property + def id(self): + """Gets the id of this InboxIdItem. # noqa: E501 + + + :return: The id of this InboxIdItem. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this InboxIdItem. + + + :param id: The id of this InboxIdItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def email_address(self): + """Gets the email_address of this InboxIdItem. # noqa: E501 + + + :return: The email_address of this InboxIdItem. # noqa: E501 + :rtype: str + """ + return self._email_address + + @email_address.setter + def email_address(self, email_address): + """Sets the email_address of this InboxIdItem. + + + :param email_address: The email_address of this InboxIdItem. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and email_address is None: # noqa: E501 + raise ValueError("Invalid value for `email_address`, must not be `None`") # noqa: E501 + + self._email_address = email_address + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InboxIdItem): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InboxIdItem): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/inbox_ids_result.py b/mailslurp_client/models/inbox_ids_result.py new file mode 100644 index 00000000..b42971a9 --- /dev/null +++ b/mailslurp_client/models/inbox_ids_result.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class InboxIdsResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'inbox_ids': 'list[InboxIdItem]' + } + + attribute_map = { + 'inbox_ids': 'inboxIds' + } + + def __init__(self, inbox_ids=None, local_vars_configuration=None): # noqa: E501 + """InboxIdsResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._inbox_ids = None + self.discriminator = None + + self.inbox_ids = inbox_ids + + @property + def inbox_ids(self): + """Gets the inbox_ids of this InboxIdsResult. # noqa: E501 + + + :return: The inbox_ids of this InboxIdsResult. # noqa: E501 + :rtype: list[InboxIdItem] + """ + return self._inbox_ids + + @inbox_ids.setter + def inbox_ids(self, inbox_ids): + """Sets the inbox_ids of this InboxIdsResult. + + + :param inbox_ids: The inbox_ids of this InboxIdsResult. # noqa: E501 + :type: list[InboxIdItem] + """ + if self.local_vars_configuration.client_side_validation and inbox_ids is None: # noqa: E501 + raise ValueError("Invalid value for `inbox_ids`, must not be `None`") # noqa: E501 + + self._inbox_ids = inbox_ids + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InboxIdsResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InboxIdsResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/inbox_preview.py b/mailslurp_client/models/inbox_preview.py new file mode 100644 index 00000000..d9dfbd0c --- /dev/null +++ b/mailslurp_client/models/inbox_preview.py @@ -0,0 +1,409 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class InboxPreview(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'domain_id': 'str', + 'email_address': 'str', + 'created_at': 'datetime', + 'favourite': 'bool', + 'name': 'str', + 'tags': 'list[str]', + 'team_access': 'bool', + 'inbox_type': 'str', + 'virtual_inbox': 'bool', + 'expires_at': 'str' + } + + attribute_map = { + 'id': 'id', + 'domain_id': 'domainId', + 'email_address': 'emailAddress', + 'created_at': 'createdAt', + 'favourite': 'favourite', + 'name': 'name', + 'tags': 'tags', + 'team_access': 'teamAccess', + 'inbox_type': 'inboxType', + 'virtual_inbox': 'virtualInbox', + 'expires_at': 'expiresAt' + } + + def __init__(self, id=None, domain_id=None, email_address=None, created_at=None, favourite=None, name=None, tags=None, team_access=None, inbox_type=None, virtual_inbox=None, expires_at=None, local_vars_configuration=None): # noqa: E501 + """InboxPreview - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._domain_id = None + self._email_address = None + self._created_at = None + self._favourite = None + self._name = None + self._tags = None + self._team_access = None + self._inbox_type = None + self._virtual_inbox = None + self._expires_at = None + self.discriminator = None + + self.id = id + if domain_id is not None: + self.domain_id = domain_id + self.email_address = email_address + self.created_at = created_at + self.favourite = favourite + self.name = name + self.tags = tags + self.team_access = team_access + self.inbox_type = inbox_type + self.virtual_inbox = virtual_inbox + self.expires_at = expires_at + + @property + def id(self): + """Gets the id of this InboxPreview. # noqa: E501 + + ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically. # noqa: E501 + + :return: The id of this InboxPreview. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this InboxPreview. + + ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically. # noqa: E501 + + :param id: The id of this InboxPreview. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def domain_id(self): + """Gets the domain_id of this InboxPreview. # noqa: E501 + + ID of custom domain used by the inbox if any # noqa: E501 + + :return: The domain_id of this InboxPreview. # noqa: E501 + :rtype: str + """ + return self._domain_id + + @domain_id.setter + def domain_id(self, domain_id): + """Sets the domain_id of this InboxPreview. + + ID of custom domain used by the inbox if any # noqa: E501 + + :param domain_id: The domain_id of this InboxPreview. # noqa: E501 + :type: str + """ + + self._domain_id = domain_id + + @property + def email_address(self): + """Gets the email_address of this InboxPreview. # noqa: E501 + + The inbox's email address. Inbox projections and previews may not include the email address. To view the email address fetch the inbox entity directly. Send an email to this address and the inbox will receive and store it for you. Note the email address in MailSlurp match characters exactly and are case sensitive so `+123` additions are considered different addresses. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. # noqa: E501 + + :return: The email_address of this InboxPreview. # noqa: E501 + :rtype: str + """ + return self._email_address + + @email_address.setter + def email_address(self, email_address): + """Sets the email_address of this InboxPreview. + + The inbox's email address. Inbox projections and previews may not include the email address. To view the email address fetch the inbox entity directly. Send an email to this address and the inbox will receive and store it for you. Note the email address in MailSlurp match characters exactly and are case sensitive so `+123` additions are considered different addresses. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. # noqa: E501 + + :param email_address: The email_address of this InboxPreview. # noqa: E501 + :type: str + """ + + self._email_address = email_address + + @property + def created_at(self): + """Gets the created_at of this InboxPreview. # noqa: E501 + + When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`. # noqa: E501 + + :return: The created_at of this InboxPreview. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this InboxPreview. + + When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`. # noqa: E501 + + :param created_at: The created_at of this InboxPreview. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + @property + def favourite(self): + """Gets the favourite of this InboxPreview. # noqa: E501 + + Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering # noqa: E501 + + :return: The favourite of this InboxPreview. # noqa: E501 + :rtype: bool + """ + return self._favourite + + @favourite.setter + def favourite(self, favourite): + """Sets the favourite of this InboxPreview. + + Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering # noqa: E501 + + :param favourite: The favourite of this InboxPreview. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and favourite is None: # noqa: E501 + raise ValueError("Invalid value for `favourite`, must not be `None`") # noqa: E501 + + self._favourite = favourite + + @property + def name(self): + """Gets the name of this InboxPreview. # noqa: E501 + + Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search # noqa: E501 + + :return: The name of this InboxPreview. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this InboxPreview. + + Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search # noqa: E501 + + :param name: The name of this InboxPreview. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def tags(self): + """Gets the tags of this InboxPreview. # noqa: E501 + + Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. # noqa: E501 + + :return: The tags of this InboxPreview. # noqa: E501 + :rtype: list[str] + """ + return self._tags + + @tags.setter + def tags(self, tags): + """Sets the tags of this InboxPreview. + + Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. # noqa: E501 + + :param tags: The tags of this InboxPreview. # noqa: E501 + :type: list[str] + """ + + self._tags = tags + + @property + def team_access(self): + """Gets the team_access of this InboxPreview. # noqa: E501 + + Does inbox permit team access for organization team members. If so team users can use inbox and emails associated with it. See the team access guide at https://www.mailslurp.com/guides/team-email-account-sharing/ # noqa: E501 + + :return: The team_access of this InboxPreview. # noqa: E501 + :rtype: bool + """ + return self._team_access + + @team_access.setter + def team_access(self, team_access): + """Sets the team_access of this InboxPreview. + + Does inbox permit team access for organization team members. If so team users can use inbox and emails associated with it. See the team access guide at https://www.mailslurp.com/guides/team-email-account-sharing/ # noqa: E501 + + :param team_access: The team_access of this InboxPreview. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and team_access is None: # noqa: E501 + raise ValueError("Invalid value for `team_access`, must not be `None`") # noqa: E501 + + self._team_access = team_access + + @property + def inbox_type(self): + """Gets the inbox_type of this InboxPreview. # noqa: E501 + + Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). # noqa: E501 + + :return: The inbox_type of this InboxPreview. # noqa: E501 + :rtype: str + """ + return self._inbox_type + + @inbox_type.setter + def inbox_type(self, inbox_type): + """Sets the inbox_type of this InboxPreview. + + Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). # noqa: E501 + + :param inbox_type: The inbox_type of this InboxPreview. # noqa: E501 + :type: str + """ + allowed_values = [None,"HTTP_INBOX", "SMTP_INBOX"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and inbox_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `inbox_type` ({0}), must be one of {1}" # noqa: E501 + .format(inbox_type, allowed_values) + ) + + self._inbox_type = inbox_type + + @property + def virtual_inbox(self): + """Gets the virtual_inbox of this InboxPreview. # noqa: E501 + + Virtual inbox can receive email but will not send emails to real recipients. Will save sent email record but never send an actual email. Perfect for testing mail server actions. # noqa: E501 + + :return: The virtual_inbox of this InboxPreview. # noqa: E501 + :rtype: bool + """ + return self._virtual_inbox + + @virtual_inbox.setter + def virtual_inbox(self, virtual_inbox): + """Sets the virtual_inbox of this InboxPreview. + + Virtual inbox can receive email but will not send emails to real recipients. Will save sent email record but never send an actual email. Perfect for testing mail server actions. # noqa: E501 + + :param virtual_inbox: The virtual_inbox of this InboxPreview. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and virtual_inbox is None: # noqa: E501 + raise ValueError("Invalid value for `virtual_inbox`, must not be `None`") # noqa: E501 + + self._virtual_inbox = virtual_inbox + + @property + def expires_at(self): + """Gets the expires_at of this InboxPreview. # noqa: E501 + + Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email. # noqa: E501 + + :return: The expires_at of this InboxPreview. # noqa: E501 + :rtype: str + """ + return self._expires_at + + @expires_at.setter + def expires_at(self, expires_at): + """Sets the expires_at of this InboxPreview. + + Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email. # noqa: E501 + + :param expires_at: The expires_at of this InboxPreview. # noqa: E501 + :type: str + """ + + self._expires_at = expires_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InboxPreview): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InboxPreview): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/inbox_ruleset_dto.py b/mailslurp_client/models/inbox_ruleset_dto.py new file mode 100644 index 00000000..51c061c0 --- /dev/null +++ b/mailslurp_client/models/inbox_ruleset_dto.py @@ -0,0 +1,302 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class InboxRulesetDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'inbox_id': 'str', + 'scope': 'str', + 'action': 'str', + 'target': 'str', + 'handler': 'str', + 'created_at': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'inbox_id': 'inboxId', + 'scope': 'scope', + 'action': 'action', + 'target': 'target', + 'handler': 'handler', + 'created_at': 'createdAt' + } + + def __init__(self, id=None, inbox_id=None, scope=None, action=None, target=None, handler=None, created_at=None, local_vars_configuration=None): # noqa: E501 + """InboxRulesetDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._inbox_id = None + self._scope = None + self._action = None + self._target = None + self._handler = None + self._created_at = None + self.discriminator = None + + self.id = id + self.inbox_id = inbox_id + self.scope = scope + self.action = action + self.target = target + self.handler = handler + self.created_at = created_at + + @property + def id(self): + """Gets the id of this InboxRulesetDto. # noqa: E501 + + + :return: The id of this InboxRulesetDto. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this InboxRulesetDto. + + + :param id: The id of this InboxRulesetDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def inbox_id(self): + """Gets the inbox_id of this InboxRulesetDto. # noqa: E501 + + + :return: The inbox_id of this InboxRulesetDto. # noqa: E501 + :rtype: str + """ + return self._inbox_id + + @inbox_id.setter + def inbox_id(self, inbox_id): + """Sets the inbox_id of this InboxRulesetDto. + + + :param inbox_id: The inbox_id of this InboxRulesetDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and inbox_id is None: # noqa: E501 + raise ValueError("Invalid value for `inbox_id`, must not be `None`") # noqa: E501 + + self._inbox_id = inbox_id + + @property + def scope(self): + """Gets the scope of this InboxRulesetDto. # noqa: E501 + + + :return: The scope of this InboxRulesetDto. # noqa: E501 + :rtype: str + """ + return self._scope + + @scope.setter + def scope(self, scope): + """Sets the scope of this InboxRulesetDto. + + + :param scope: The scope of this InboxRulesetDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and scope is None: # noqa: E501 + raise ValueError("Invalid value for `scope`, must not be `None`") # noqa: E501 + allowed_values = ["RECEIVING_EMAILS", "SENDING_EMAILS"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and scope not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `scope` ({0}), must be one of {1}" # noqa: E501 + .format(scope, allowed_values) + ) + + self._scope = scope + + @property + def action(self): + """Gets the action of this InboxRulesetDto. # noqa: E501 + + + :return: The action of this InboxRulesetDto. # noqa: E501 + :rtype: str + """ + return self._action + + @action.setter + def action(self, action): + """Sets the action of this InboxRulesetDto. + + + :param action: The action of this InboxRulesetDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and action is None: # noqa: E501 + raise ValueError("Invalid value for `action`, must not be `None`") # noqa: E501 + allowed_values = ["BLOCK", "ALLOW", "FILTER_REMOVE"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and action not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `action` ({0}), must be one of {1}" # noqa: E501 + .format(action, allowed_values) + ) + + self._action = action + + @property + def target(self): + """Gets the target of this InboxRulesetDto. # noqa: E501 + + + :return: The target of this InboxRulesetDto. # noqa: E501 + :rtype: str + """ + return self._target + + @target.setter + def target(self, target): + """Sets the target of this InboxRulesetDto. + + + :param target: The target of this InboxRulesetDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and target is None: # noqa: E501 + raise ValueError("Invalid value for `target`, must not be `None`") # noqa: E501 + + self._target = target + + @property + def handler(self): + """Gets the handler of this InboxRulesetDto. # noqa: E501 + + + :return: The handler of this InboxRulesetDto. # noqa: E501 + :rtype: str + """ + return self._handler + + @handler.setter + def handler(self, handler): + """Sets the handler of this InboxRulesetDto. + + + :param handler: The handler of this InboxRulesetDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and handler is None: # noqa: E501 + raise ValueError("Invalid value for `handler`, must not be `None`") # noqa: E501 + allowed_values = ["EXCEPTION"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and handler not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `handler` ({0}), must be one of {1}" # noqa: E501 + .format(handler, allowed_values) + ) + + self._handler = handler + + @property + def created_at(self): + """Gets the created_at of this InboxRulesetDto. # noqa: E501 + + + :return: The created_at of this InboxRulesetDto. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this InboxRulesetDto. + + + :param created_at: The created_at of this InboxRulesetDto. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InboxRulesetDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InboxRulesetDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/inbox_ruleset_test_options.py b/mailslurp_client/models/inbox_ruleset_test_options.py new file mode 100644 index 00000000..f3906faf --- /dev/null +++ b/mailslurp_client/models/inbox_ruleset_test_options.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class InboxRulesetTestOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'test_target': 'str' + } + + attribute_map = { + 'test_target': 'testTarget' + } + + def __init__(self, test_target=None, local_vars_configuration=None): # noqa: E501 + """InboxRulesetTestOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._test_target = None + self.discriminator = None + + self.test_target = test_target + + @property + def test_target(self): + """Gets the test_target of this InboxRulesetTestOptions. # noqa: E501 + + + :return: The test_target of this InboxRulesetTestOptions. # noqa: E501 + :rtype: str + """ + return self._test_target + + @test_target.setter + def test_target(self, test_target): + """Sets the test_target of this InboxRulesetTestOptions. + + + :param test_target: The test_target of this InboxRulesetTestOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and test_target is None: # noqa: E501 + raise ValueError("Invalid value for `test_target`, must not be `None`") # noqa: E501 + + self._test_target = test_target + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InboxRulesetTestOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InboxRulesetTestOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/inbox_ruleset_test_result.py b/mailslurp_client/models/inbox_ruleset_test_result.py new file mode 100644 index 00000000..ee5b6f06 --- /dev/null +++ b/mailslurp_client/models/inbox_ruleset_test_result.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class InboxRulesetTestResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'ruleset_matches': 'dict(str, bool)', + 'matches': 'bool' + } + + attribute_map = { + 'ruleset_matches': 'rulesetMatches', + 'matches': 'matches' + } + + def __init__(self, ruleset_matches=None, matches=None, local_vars_configuration=None): # noqa: E501 + """InboxRulesetTestResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._ruleset_matches = None + self._matches = None + self.discriminator = None + + self.ruleset_matches = ruleset_matches + self.matches = matches + + @property + def ruleset_matches(self): + """Gets the ruleset_matches of this InboxRulesetTestResult. # noqa: E501 + + Map of inbox ruleset ID to boolean of if target matches # noqa: E501 + + :return: The ruleset_matches of this InboxRulesetTestResult. # noqa: E501 + :rtype: dict(str, bool) + """ + return self._ruleset_matches + + @ruleset_matches.setter + def ruleset_matches(self, ruleset_matches): + """Sets the ruleset_matches of this InboxRulesetTestResult. + + Map of inbox ruleset ID to boolean of if target matches # noqa: E501 + + :param ruleset_matches: The ruleset_matches of this InboxRulesetTestResult. # noqa: E501 + :type: dict(str, bool) + """ + if self.local_vars_configuration.client_side_validation and ruleset_matches is None: # noqa: E501 + raise ValueError("Invalid value for `ruleset_matches`, must not be `None`") # noqa: E501 + + self._ruleset_matches = ruleset_matches + + @property + def matches(self): + """Gets the matches of this InboxRulesetTestResult. # noqa: E501 + + + :return: The matches of this InboxRulesetTestResult. # noqa: E501 + :rtype: bool + """ + return self._matches + + @matches.setter + def matches(self, matches): + """Sets the matches of this InboxRulesetTestResult. + + + :param matches: The matches of this InboxRulesetTestResult. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and matches is None: # noqa: E501 + raise ValueError("Invalid value for `matches`, must not be `None`") # noqa: E501 + + self._matches = matches + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InboxRulesetTestResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InboxRulesetTestResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/inline_object.py b/mailslurp_client/models/inline_object.py new file mode 100644 index 00000000..4cd54316 --- /dev/null +++ b/mailslurp_client/models/inline_object.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class InlineObject(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'content_type_header': 'str', + 'file': 'file' + } + + attribute_map = { + 'content_type_header': 'contentTypeHeader', + 'file': 'file' + } + + def __init__(self, content_type_header=None, file=None, local_vars_configuration=None): # noqa: E501 + """InlineObject - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._content_type_header = None + self._file = None + self.discriminator = None + + if content_type_header is not None: + self.content_type_header = content_type_header + self.file = file + + @property + def content_type_header(self): + """Gets the content_type_header of this InlineObject. # noqa: E501 + + Optional content type header of attachment # noqa: E501 + + :return: The content_type_header of this InlineObject. # noqa: E501 + :rtype: str + """ + return self._content_type_header + + @content_type_header.setter + def content_type_header(self, content_type_header): + """Sets the content_type_header of this InlineObject. + + Optional content type header of attachment # noqa: E501 + + :param content_type_header: The content_type_header of this InlineObject. # noqa: E501 + :type: str + """ + + self._content_type_header = content_type_header + + @property + def file(self): + """Gets the file of this InlineObject. # noqa: E501 + + + :return: The file of this InlineObject. # noqa: E501 + :rtype: file + """ + return self._file + + @file.setter + def file(self, file): + """Sets the file of this InlineObject. + + + :param file: The file of this InlineObject. # noqa: E501 + :type: file + """ + if self.local_vars_configuration.client_side_validation and file is None: # noqa: E501 + raise ValueError("Invalid value for `file`, must not be `None`") # noqa: E501 + + self._file = file + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineObject): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InlineObject): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/inline_object1.py b/mailslurp_client/models/inline_object1.py new file mode 100644 index 00000000..370d3af2 --- /dev/null +++ b/mailslurp_client/models/inline_object1.py @@ -0,0 +1,303 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class InlineObject1(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'short': 'int', + 'char': 'str', + 'int': 'int', + 'long': 'int', + 'float': 'float', + 'double': 'float', + 'direct': 'bool', + 'read_only': 'bool' + } + + attribute_map = { + 'short': 'short', + 'char': 'char', + 'int': 'int', + 'long': 'long', + 'float': 'float', + 'double': 'double', + 'direct': 'direct', + 'read_only': 'readOnly' + } + + def __init__(self, short=None, char=None, int=None, long=None, float=None, double=None, direct=None, read_only=None, local_vars_configuration=None): # noqa: E501 + """InlineObject1 - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._short = None + self._char = None + self._int = None + self._long = None + self._float = None + self._double = None + self._direct = None + self._read_only = None + self.discriminator = None + + if short is not None: + self.short = short + if char is not None: + self.char = char + if int is not None: + self.int = int + if long is not None: + self.long = long + if float is not None: + self.float = float + if double is not None: + self.double = double + if direct is not None: + self.direct = direct + if read_only is not None: + self.read_only = read_only + + @property + def short(self): + """Gets the short of this InlineObject1. # noqa: E501 + + + :return: The short of this InlineObject1. # noqa: E501 + :rtype: int + """ + return self._short + + @short.setter + def short(self, short): + """Sets the short of this InlineObject1. + + + :param short: The short of this InlineObject1. # noqa: E501 + :type: int + """ + + self._short = short + + @property + def char(self): + """Gets the char of this InlineObject1. # noqa: E501 + + + :return: The char of this InlineObject1. # noqa: E501 + :rtype: str + """ + return self._char + + @char.setter + def char(self, char): + """Sets the char of this InlineObject1. + + + :param char: The char of this InlineObject1. # noqa: E501 + :type: str + """ + + self._char = char + + @property + def int(self): + """Gets the int of this InlineObject1. # noqa: E501 + + + :return: The int of this InlineObject1. # noqa: E501 + :rtype: int + """ + return self._int + + @int.setter + def int(self, int): + """Sets the int of this InlineObject1. + + + :param int: The int of this InlineObject1. # noqa: E501 + :type: int + """ + + self._int = int + + @property + def long(self): + """Gets the long of this InlineObject1. # noqa: E501 + + + :return: The long of this InlineObject1. # noqa: E501 + :rtype: int + """ + return self._long + + @long.setter + def long(self, long): + """Sets the long of this InlineObject1. + + + :param long: The long of this InlineObject1. # noqa: E501 + :type: int + """ + + self._long = long + + @property + def float(self): + """Gets the float of this InlineObject1. # noqa: E501 + + + :return: The float of this InlineObject1. # noqa: E501 + :rtype: float + """ + return self._float + + @float.setter + def float(self, float): + """Sets the float of this InlineObject1. + + + :param float: The float of this InlineObject1. # noqa: E501 + :type: float + """ + + self._float = float + + @property + def double(self): + """Gets the double of this InlineObject1. # noqa: E501 + + + :return: The double of this InlineObject1. # noqa: E501 + :rtype: float + """ + return self._double + + @double.setter + def double(self, double): + """Sets the double of this InlineObject1. + + + :param double: The double of this InlineObject1. # noqa: E501 + :type: float + """ + + self._double = double + + @property + def direct(self): + """Gets the direct of this InlineObject1. # noqa: E501 + + + :return: The direct of this InlineObject1. # noqa: E501 + :rtype: bool + """ + return self._direct + + @direct.setter + def direct(self, direct): + """Sets the direct of this InlineObject1. + + + :param direct: The direct of this InlineObject1. # noqa: E501 + :type: bool + """ + + self._direct = direct + + @property + def read_only(self): + """Gets the read_only of this InlineObject1. # noqa: E501 + + + :return: The read_only of this InlineObject1. # noqa: E501 + :rtype: bool + """ + return self._read_only + + @read_only.setter + def read_only(self, read_only): + """Sets the read_only of this InlineObject1. + + + :param read_only: The read_only of this InlineObject1. # noqa: E501 + :type: bool + """ + + self._read_only = read_only + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineObject1): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, InlineObject1): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/ip_address_result.py b/mailslurp_client/models/ip_address_result.py new file mode 100644 index 00000000..1ff7c8ae --- /dev/null +++ b/mailslurp_client/models/ip_address_result.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class IPAddressResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'address': 'str', + 'hostname': 'str' + } + + attribute_map = { + 'address': 'address', + 'hostname': 'hostname' + } + + def __init__(self, address=None, hostname=None, local_vars_configuration=None): # noqa: E501 + """IPAddressResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._address = None + self._hostname = None + self.discriminator = None + + self.address = address + self.hostname = hostname + + @property + def address(self): + """Gets the address of this IPAddressResult. # noqa: E501 + + + :return: The address of this IPAddressResult. # noqa: E501 + :rtype: str + """ + return self._address + + @address.setter + def address(self, address): + """Sets the address of this IPAddressResult. + + + :param address: The address of this IPAddressResult. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and address is None: # noqa: E501 + raise ValueError("Invalid value for `address`, must not be `None`") # noqa: E501 + + self._address = address + + @property + def hostname(self): + """Gets the hostname of this IPAddressResult. # noqa: E501 + + + :return: The hostname of this IPAddressResult. # noqa: E501 + :rtype: str + """ + return self._hostname + + @hostname.setter + def hostname(self, hostname): + """Sets the hostname of this IPAddressResult. + + + :param hostname: The hostname of this IPAddressResult. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and hostname is None: # noqa: E501 + raise ValueError("Invalid value for `hostname`, must not be `None`") # noqa: E501 + + self._hostname = hostname + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, IPAddressResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IPAddressResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/json_schema_dto.py b/mailslurp_client/models/json_schema_dto.py new file mode 100644 index 00000000..58e655da --- /dev/null +++ b/mailslurp_client/models/json_schema_dto.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class JSONSchemaDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'value': 'str' + } + + attribute_map = { + 'value': 'value' + } + + def __init__(self, value=None, local_vars_configuration=None): # noqa: E501 + """JSONSchemaDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._value = None + self.discriminator = None + + self.value = value + + @property + def value(self): + """Gets the value of this JSONSchemaDto. # noqa: E501 + + + :return: The value of this JSONSchemaDto. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this JSONSchemaDto. + + + :param value: The value of this JSONSchemaDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 + + self._value = value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, JSONSchemaDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, JSONSchemaDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/match_option.py b/mailslurp_client/models/match_option.py new file mode 100644 index 00000000..169ecc44 --- /dev/null +++ b/mailslurp_client/models/match_option.py @@ -0,0 +1,194 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class MatchOption(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'field': 'str', + 'should': 'str', + 'value': 'str' + } + + attribute_map = { + 'field': 'field', + 'should': 'should', + 'value': 'value' + } + + def __init__(self, field=None, should=None, value=None, local_vars_configuration=None): # noqa: E501 + """MatchOption - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._field = None + self._should = None + self._value = None + self.discriminator = None + + self.field = field + self.should = should + self.value = value + + @property + def field(self): + """Gets the field of this MatchOption. # noqa: E501 + + Fields of an email object that can be used to filter results # noqa: E501 + + :return: The field of this MatchOption. # noqa: E501 + :rtype: str + """ + return self._field + + @field.setter + def field(self, field): + """Sets the field of this MatchOption. + + Fields of an email object that can be used to filter results # noqa: E501 + + :param field: The field of this MatchOption. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and field is None: # noqa: E501 + raise ValueError("Invalid value for `field`, must not be `None`") # noqa: E501 + allowed_values = ["SUBJECT", "TO", "BCC", "CC", "FROM"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and field not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `field` ({0}), must be one of {1}" # noqa: E501 + .format(field, allowed_values) + ) + + self._field = field + + @property + def should(self): + """Gets the should of this MatchOption. # noqa: E501 + + How the value of the email field specified should be compared to the value given in the match options. # noqa: E501 + + :return: The should of this MatchOption. # noqa: E501 + :rtype: str + """ + return self._should + + @should.setter + def should(self, should): + """Sets the should of this MatchOption. + + How the value of the email field specified should be compared to the value given in the match options. # noqa: E501 + + :param should: The should of this MatchOption. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and should is None: # noqa: E501 + raise ValueError("Invalid value for `should`, must not be `None`") # noqa: E501 + allowed_values = ["CONTAIN", "EQUAL"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and should not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `should` ({0}), must be one of {1}" # noqa: E501 + .format(should, allowed_values) + ) + + self._should = should + + @property + def value(self): + """Gets the value of this MatchOption. # noqa: E501 + + The value you wish to compare with the value of the field specified using the `should` value passed. For example `BODY` should `CONTAIN` a value passed. # noqa: E501 + + :return: The value of this MatchOption. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this MatchOption. + + The value you wish to compare with the value of the field specified using the `should` value passed. For example `BODY` should `CONTAIN` a value passed. # noqa: E501 + + :param value: The value of this MatchOption. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 + + self._value = value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MatchOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MatchOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/match_options.py b/mailslurp_client/models/match_options.py new file mode 100644 index 00000000..488f92bd --- /dev/null +++ b/mailslurp_client/models/match_options.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class MatchOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'matches': 'list[MatchOption]', + 'conditions': 'list[ConditionOption]' + } + + attribute_map = { + 'matches': 'matches', + 'conditions': 'conditions' + } + + def __init__(self, matches=None, conditions=None, local_vars_configuration=None): # noqa: E501 + """MatchOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._matches = None + self._conditions = None + self.discriminator = None + + if matches is not None: + self.matches = matches + if conditions is not None: + self.conditions = conditions + + @property + def matches(self): + """Gets the matches of this MatchOptions. # noqa: E501 + + Zero or more match options such as `{ field: 'SUBJECT', should: 'CONTAIN', value: 'Welcome' }`. Options are additive so if one does not match the email is excluded from results # noqa: E501 + + :return: The matches of this MatchOptions. # noqa: E501 + :rtype: list[MatchOption] + """ + return self._matches + + @matches.setter + def matches(self, matches): + """Sets the matches of this MatchOptions. + + Zero or more match options such as `{ field: 'SUBJECT', should: 'CONTAIN', value: 'Welcome' }`. Options are additive so if one does not match the email is excluded from results # noqa: E501 + + :param matches: The matches of this MatchOptions. # noqa: E501 + :type: list[MatchOption] + """ + + self._matches = matches + + @property + def conditions(self): + """Gets the conditions of this MatchOptions. # noqa: E501 + + Zero or more conditions such as `{ condition: 'HAS_ATTACHMENTS', value: 'TRUE' }`. Note the values are the strings `TRUE|FALSE` not booleans. # noqa: E501 + + :return: The conditions of this MatchOptions. # noqa: E501 + :rtype: list[ConditionOption] + """ + return self._conditions + + @conditions.setter + def conditions(self, conditions): + """Sets the conditions of this MatchOptions. + + Zero or more conditions such as `{ condition: 'HAS_ATTACHMENTS', value: 'TRUE' }`. Note the values are the strings `TRUE|FALSE` not booleans. # noqa: E501 + + :param conditions: The conditions of this MatchOptions. # noqa: E501 + :type: list[ConditionOption] + """ + + self._conditions = conditions + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MatchOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MatchOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/missed_email.py b/mailslurp_client/models/missed_email.py new file mode 100644 index 00000000..551f568a --- /dev/null +++ b/mailslurp_client/models/missed_email.py @@ -0,0 +1,518 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class MissedEmail(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'user_id': 'str', + 'subject': 'str', + 'body_excerpt': 'str', + 'attachment_count': 'int', + '_from': 'str', + 'raw_url': 'str', + 'raw_key': 'str', + 'raw_bucket': 'str', + 'can_restore': 'bool', + 'to': 'list[str]', + 'cc': 'list[str]', + 'bcc': 'list[str]', + 'inbox_ids': 'list[str]', + 'created_at': 'datetime', + 'updated_at': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'user_id': 'userId', + 'subject': 'subject', + 'body_excerpt': 'bodyExcerpt', + 'attachment_count': 'attachmentCount', + '_from': 'from', + 'raw_url': 'rawUrl', + 'raw_key': 'rawKey', + 'raw_bucket': 'rawBucket', + 'can_restore': 'canRestore', + 'to': 'to', + 'cc': 'cc', + 'bcc': 'bcc', + 'inbox_ids': 'inboxIds', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt' + } + + def __init__(self, id=None, user_id=None, subject=None, body_excerpt=None, attachment_count=None, _from=None, raw_url=None, raw_key=None, raw_bucket=None, can_restore=None, to=None, cc=None, bcc=None, inbox_ids=None, created_at=None, updated_at=None, local_vars_configuration=None): # noqa: E501 + """MissedEmail - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._user_id = None + self._subject = None + self._body_excerpt = None + self._attachment_count = None + self.__from = None + self._raw_url = None + self._raw_key = None + self._raw_bucket = None + self._can_restore = None + self._to = None + self._cc = None + self._bcc = None + self._inbox_ids = None + self._created_at = None + self._updated_at = None + self.discriminator = None + + if id is not None: + self.id = id + if user_id is not None: + self.user_id = user_id + if subject is not None: + self.subject = subject + if body_excerpt is not None: + self.body_excerpt = body_excerpt + self.attachment_count = attachment_count + if _from is not None: + self._from = _from + if raw_url is not None: + self.raw_url = raw_url + if raw_key is not None: + self.raw_key = raw_key + if raw_bucket is not None: + self.raw_bucket = raw_bucket + if can_restore is not None: + self.can_restore = can_restore + self.to = to + self.cc = cc + self.bcc = bcc + self.inbox_ids = inbox_ids + self.created_at = created_at + self.updated_at = updated_at + + @property + def id(self): + """Gets the id of this MissedEmail. # noqa: E501 + + + :return: The id of this MissedEmail. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this MissedEmail. + + + :param id: The id of this MissedEmail. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def user_id(self): + """Gets the user_id of this MissedEmail. # noqa: E501 + + + :return: The user_id of this MissedEmail. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this MissedEmail. + + + :param user_id: The user_id of this MissedEmail. # noqa: E501 + :type: str + """ + + self._user_id = user_id + + @property + def subject(self): + """Gets the subject of this MissedEmail. # noqa: E501 + + + :return: The subject of this MissedEmail. # noqa: E501 + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this MissedEmail. + + + :param subject: The subject of this MissedEmail. # noqa: E501 + :type: str + """ + + self._subject = subject + + @property + def body_excerpt(self): + """Gets the body_excerpt of this MissedEmail. # noqa: E501 + + + :return: The body_excerpt of this MissedEmail. # noqa: E501 + :rtype: str + """ + return self._body_excerpt + + @body_excerpt.setter + def body_excerpt(self, body_excerpt): + """Sets the body_excerpt of this MissedEmail. + + + :param body_excerpt: The body_excerpt of this MissedEmail. # noqa: E501 + :type: str + """ + + self._body_excerpt = body_excerpt + + @property + def attachment_count(self): + """Gets the attachment_count of this MissedEmail. # noqa: E501 + + + :return: The attachment_count of this MissedEmail. # noqa: E501 + :rtype: int + """ + return self._attachment_count + + @attachment_count.setter + def attachment_count(self, attachment_count): + """Sets the attachment_count of this MissedEmail. + + + :param attachment_count: The attachment_count of this MissedEmail. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and attachment_count is None: # noqa: E501 + raise ValueError("Invalid value for `attachment_count`, must not be `None`") # noqa: E501 + + self._attachment_count = attachment_count + + @property + def _from(self): + """Gets the _from of this MissedEmail. # noqa: E501 + + + :return: The _from of this MissedEmail. # noqa: E501 + :rtype: str + """ + return self.__from + + @_from.setter + def _from(self, _from): + """Sets the _from of this MissedEmail. + + + :param _from: The _from of this MissedEmail. # noqa: E501 + :type: str + """ + + self.__from = _from + + @property + def raw_url(self): + """Gets the raw_url of this MissedEmail. # noqa: E501 + + + :return: The raw_url of this MissedEmail. # noqa: E501 + :rtype: str + """ + return self._raw_url + + @raw_url.setter + def raw_url(self, raw_url): + """Sets the raw_url of this MissedEmail. + + + :param raw_url: The raw_url of this MissedEmail. # noqa: E501 + :type: str + """ + + self._raw_url = raw_url + + @property + def raw_key(self): + """Gets the raw_key of this MissedEmail. # noqa: E501 + + + :return: The raw_key of this MissedEmail. # noqa: E501 + :rtype: str + """ + return self._raw_key + + @raw_key.setter + def raw_key(self, raw_key): + """Sets the raw_key of this MissedEmail. + + + :param raw_key: The raw_key of this MissedEmail. # noqa: E501 + :type: str + """ + + self._raw_key = raw_key + + @property + def raw_bucket(self): + """Gets the raw_bucket of this MissedEmail. # noqa: E501 + + + :return: The raw_bucket of this MissedEmail. # noqa: E501 + :rtype: str + """ + return self._raw_bucket + + @raw_bucket.setter + def raw_bucket(self, raw_bucket): + """Sets the raw_bucket of this MissedEmail. + + + :param raw_bucket: The raw_bucket of this MissedEmail. # noqa: E501 + :type: str + """ + + self._raw_bucket = raw_bucket + + @property + def can_restore(self): + """Gets the can_restore of this MissedEmail. # noqa: E501 + + + :return: The can_restore of this MissedEmail. # noqa: E501 + :rtype: bool + """ + return self._can_restore + + @can_restore.setter + def can_restore(self, can_restore): + """Sets the can_restore of this MissedEmail. + + + :param can_restore: The can_restore of this MissedEmail. # noqa: E501 + :type: bool + """ + + self._can_restore = can_restore + + @property + def to(self): + """Gets the to of this MissedEmail. # noqa: E501 + + + :return: The to of this MissedEmail. # noqa: E501 + :rtype: list[str] + """ + return self._to + + @to.setter + def to(self, to): + """Sets the to of this MissedEmail. + + + :param to: The to of this MissedEmail. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and to is None: # noqa: E501 + raise ValueError("Invalid value for `to`, must not be `None`") # noqa: E501 + + self._to = to + + @property + def cc(self): + """Gets the cc of this MissedEmail. # noqa: E501 + + + :return: The cc of this MissedEmail. # noqa: E501 + :rtype: list[str] + """ + return self._cc + + @cc.setter + def cc(self, cc): + """Sets the cc of this MissedEmail. + + + :param cc: The cc of this MissedEmail. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and cc is None: # noqa: E501 + raise ValueError("Invalid value for `cc`, must not be `None`") # noqa: E501 + + self._cc = cc + + @property + def bcc(self): + """Gets the bcc of this MissedEmail. # noqa: E501 + + + :return: The bcc of this MissedEmail. # noqa: E501 + :rtype: list[str] + """ + return self._bcc + + @bcc.setter + def bcc(self, bcc): + """Sets the bcc of this MissedEmail. + + + :param bcc: The bcc of this MissedEmail. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and bcc is None: # noqa: E501 + raise ValueError("Invalid value for `bcc`, must not be `None`") # noqa: E501 + + self._bcc = bcc + + @property + def inbox_ids(self): + """Gets the inbox_ids of this MissedEmail. # noqa: E501 + + + :return: The inbox_ids of this MissedEmail. # noqa: E501 + :rtype: list[str] + """ + return self._inbox_ids + + @inbox_ids.setter + def inbox_ids(self, inbox_ids): + """Sets the inbox_ids of this MissedEmail. + + + :param inbox_ids: The inbox_ids of this MissedEmail. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and inbox_ids is None: # noqa: E501 + raise ValueError("Invalid value for `inbox_ids`, must not be `None`") # noqa: E501 + + self._inbox_ids = inbox_ids + + @property + def created_at(self): + """Gets the created_at of this MissedEmail. # noqa: E501 + + + :return: The created_at of this MissedEmail. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this MissedEmail. + + + :param created_at: The created_at of this MissedEmail. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + @property + def updated_at(self): + """Gets the updated_at of this MissedEmail. # noqa: E501 + + + :return: The updated_at of this MissedEmail. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this MissedEmail. + + + :param updated_at: The updated_at of this MissedEmail. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and updated_at is None: # noqa: E501 + raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501 + + self._updated_at = updated_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MissedEmail): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MissedEmail): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/missed_email_projection.py b/mailslurp_client/models/missed_email_projection.py new file mode 100644 index 00000000..86edd813 --- /dev/null +++ b/mailslurp_client/models/missed_email_projection.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class MissedEmailProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + '_from': 'str', + 'subject': 'str', + 'user_id': 'str', + 'created_at': 'datetime' + } + + attribute_map = { + 'id': 'id', + '_from': 'from', + 'subject': 'subject', + 'user_id': 'userId', + 'created_at': 'createdAt' + } + + def __init__(self, id=None, _from=None, subject=None, user_id=None, created_at=None, local_vars_configuration=None): # noqa: E501 + """MissedEmailProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self.__from = None + self._subject = None + self._user_id = None + self._created_at = None + self.discriminator = None + + self.id = id + if _from is not None: + self._from = _from + if subject is not None: + self.subject = subject + if user_id is not None: + self.user_id = user_id + self.created_at = created_at + + @property + def id(self): + """Gets the id of this MissedEmailProjection. # noqa: E501 + + + :return: The id of this MissedEmailProjection. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this MissedEmailProjection. + + + :param id: The id of this MissedEmailProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def _from(self): + """Gets the _from of this MissedEmailProjection. # noqa: E501 + + + :return: The _from of this MissedEmailProjection. # noqa: E501 + :rtype: str + """ + return self.__from + + @_from.setter + def _from(self, _from): + """Sets the _from of this MissedEmailProjection. + + + :param _from: The _from of this MissedEmailProjection. # noqa: E501 + :type: str + """ + + self.__from = _from + + @property + def subject(self): + """Gets the subject of this MissedEmailProjection. # noqa: E501 + + + :return: The subject of this MissedEmailProjection. # noqa: E501 + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this MissedEmailProjection. + + + :param subject: The subject of this MissedEmailProjection. # noqa: E501 + :type: str + """ + + self._subject = subject + + @property + def user_id(self): + """Gets the user_id of this MissedEmailProjection. # noqa: E501 + + + :return: The user_id of this MissedEmailProjection. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this MissedEmailProjection. + + + :param user_id: The user_id of this MissedEmailProjection. # noqa: E501 + :type: str + """ + + self._user_id = user_id + + @property + def created_at(self): + """Gets the created_at of this MissedEmailProjection. # noqa: E501 + + + :return: The created_at of this MissedEmailProjection. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this MissedEmailProjection. + + + :param created_at: The created_at of this MissedEmailProjection. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MissedEmailProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MissedEmailProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/name_server_record.py b/mailslurp_client/models/name_server_record.py new file mode 100644 index 00000000..71a65a16 --- /dev/null +++ b/mailslurp_client/models/name_server_record.py @@ -0,0 +1,203 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class NameServerRecord(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'raw': 'str', + 'record_type': 'str', + 'priority': 'str', + 'value': 'str' + } + + attribute_map = { + 'raw': 'raw', + 'record_type': 'recordType', + 'priority': 'priority', + 'value': 'value' + } + + def __init__(self, raw=None, record_type=None, priority=None, value=None, local_vars_configuration=None): # noqa: E501 + """NameServerRecord - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._raw = None + self._record_type = None + self._priority = None + self._value = None + self.discriminator = None + + self.raw = raw + self.record_type = record_type + self.priority = priority + self.value = value + + @property + def raw(self): + """Gets the raw of this NameServerRecord. # noqa: E501 + + + :return: The raw of this NameServerRecord. # noqa: E501 + :rtype: str + """ + return self._raw + + @raw.setter + def raw(self, raw): + """Sets the raw of this NameServerRecord. + + + :param raw: The raw of this NameServerRecord. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and raw is None: # noqa: E501 + raise ValueError("Invalid value for `raw`, must not be `None`") # noqa: E501 + + self._raw = raw + + @property + def record_type(self): + """Gets the record_type of this NameServerRecord. # noqa: E501 + + + :return: The record_type of this NameServerRecord. # noqa: E501 + :rtype: str + """ + return self._record_type + + @record_type.setter + def record_type(self, record_type): + """Sets the record_type of this NameServerRecord. + + + :param record_type: The record_type of this NameServerRecord. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and record_type is None: # noqa: E501 + raise ValueError("Invalid value for `record_type`, must not be `None`") # noqa: E501 + + self._record_type = record_type + + @property + def priority(self): + """Gets the priority of this NameServerRecord. # noqa: E501 + + + :return: The priority of this NameServerRecord. # noqa: E501 + :rtype: str + """ + return self._priority + + @priority.setter + def priority(self, priority): + """Sets the priority of this NameServerRecord. + + + :param priority: The priority of this NameServerRecord. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and priority is None: # noqa: E501 + raise ValueError("Invalid value for `priority`, must not be `None`") # noqa: E501 + + self._priority = priority + + @property + def value(self): + """Gets the value of this NameServerRecord. # noqa: E501 + + + :return: The value of this NameServerRecord. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this NameServerRecord. + + + :param value: The value of this NameServerRecord. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 + + self._value = value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NameServerRecord): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, NameServerRecord): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/organization_inbox_projection.py b/mailslurp_client/models/organization_inbox_projection.py new file mode 100644 index 00000000..5f73ecc5 --- /dev/null +++ b/mailslurp_client/models/organization_inbox_projection.py @@ -0,0 +1,411 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class OrganizationInboxProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'domain_id': 'str', + 'created_at': 'datetime', + 'name': 'str', + 'email_address': 'str', + 'favourite': 'bool', + 'tags': 'list[str]', + 'team_access': 'bool', + 'inbox_type': 'str', + 'read_only': 'bool', + 'virtual_inbox': 'bool' + } + + attribute_map = { + 'id': 'id', + 'domain_id': 'domainId', + 'created_at': 'createdAt', + 'name': 'name', + 'email_address': 'emailAddress', + 'favourite': 'favourite', + 'tags': 'tags', + 'team_access': 'teamAccess', + 'inbox_type': 'inboxType', + 'read_only': 'readOnly', + 'virtual_inbox': 'virtualInbox' + } + + def __init__(self, id=None, domain_id=None, created_at=None, name=None, email_address=None, favourite=None, tags=None, team_access=None, inbox_type=None, read_only=None, virtual_inbox=None, local_vars_configuration=None): # noqa: E501 + """OrganizationInboxProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._domain_id = None + self._created_at = None + self._name = None + self._email_address = None + self._favourite = None + self._tags = None + self._team_access = None + self._inbox_type = None + self._read_only = None + self._virtual_inbox = None + self.discriminator = None + + self.id = id + if domain_id is not None: + self.domain_id = domain_id + self.created_at = created_at + self.name = name + self.email_address = email_address + self.favourite = favourite + self.tags = tags + self.team_access = team_access + self.inbox_type = inbox_type + self.read_only = read_only + self.virtual_inbox = virtual_inbox + + @property + def id(self): + """Gets the id of this OrganizationInboxProjection. # noqa: E501 + + ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically. # noqa: E501 + + :return: The id of this OrganizationInboxProjection. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this OrganizationInboxProjection. + + ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically. # noqa: E501 + + :param id: The id of this OrganizationInboxProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def domain_id(self): + """Gets the domain_id of this OrganizationInboxProjection. # noqa: E501 + + ID of custom domain used by the inbox if any # noqa: E501 + + :return: The domain_id of this OrganizationInboxProjection. # noqa: E501 + :rtype: str + """ + return self._domain_id + + @domain_id.setter + def domain_id(self, domain_id): + """Sets the domain_id of this OrganizationInboxProjection. + + ID of custom domain used by the inbox if any # noqa: E501 + + :param domain_id: The domain_id of this OrganizationInboxProjection. # noqa: E501 + :type: str + """ + + self._domain_id = domain_id + + @property + def created_at(self): + """Gets the created_at of this OrganizationInboxProjection. # noqa: E501 + + When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`. # noqa: E501 + + :return: The created_at of this OrganizationInboxProjection. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this OrganizationInboxProjection. + + When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`. # noqa: E501 + + :param created_at: The created_at of this OrganizationInboxProjection. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + @property + def name(self): + """Gets the name of this OrganizationInboxProjection. # noqa: E501 + + Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search # noqa: E501 + + :return: The name of this OrganizationInboxProjection. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this OrganizationInboxProjection. + + Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search # noqa: E501 + + :param name: The name of this OrganizationInboxProjection. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def email_address(self): + """Gets the email_address of this OrganizationInboxProjection. # noqa: E501 + + The inbox's email address. Inbox projections and previews may not include the email address. To view the email address fetch the inbox entity directly. Send an email to this address and the inbox will receive and store it for you. Note the email address in MailSlurp match characters exactly and are case sensitive so `+123` additions are considered different addresses. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. # noqa: E501 + + :return: The email_address of this OrganizationInboxProjection. # noqa: E501 + :rtype: str + """ + return self._email_address + + @email_address.setter + def email_address(self, email_address): + """Sets the email_address of this OrganizationInboxProjection. + + The inbox's email address. Inbox projections and previews may not include the email address. To view the email address fetch the inbox entity directly. Send an email to this address and the inbox will receive and store it for you. Note the email address in MailSlurp match characters exactly and are case sensitive so `+123` additions are considered different addresses. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID. # noqa: E501 + + :param email_address: The email_address of this OrganizationInboxProjection. # noqa: E501 + :type: str + """ + + self._email_address = email_address + + @property + def favourite(self): + """Gets the favourite of this OrganizationInboxProjection. # noqa: E501 + + Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering # noqa: E501 + + :return: The favourite of this OrganizationInboxProjection. # noqa: E501 + :rtype: bool + """ + return self._favourite + + @favourite.setter + def favourite(self, favourite): + """Sets the favourite of this OrganizationInboxProjection. + + Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering # noqa: E501 + + :param favourite: The favourite of this OrganizationInboxProjection. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and favourite is None: # noqa: E501 + raise ValueError("Invalid value for `favourite`, must not be `None`") # noqa: E501 + + self._favourite = favourite + + @property + def tags(self): + """Gets the tags of this OrganizationInboxProjection. # noqa: E501 + + Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. # noqa: E501 + + :return: The tags of this OrganizationInboxProjection. # noqa: E501 + :rtype: list[str] + """ + return self._tags + + @tags.setter + def tags(self, tags): + """Sets the tags of this OrganizationInboxProjection. + + Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. # noqa: E501 + + :param tags: The tags of this OrganizationInboxProjection. # noqa: E501 + :type: list[str] + """ + + self._tags = tags + + @property + def team_access(self): + """Gets the team_access of this OrganizationInboxProjection. # noqa: E501 + + Does inbox permit team access for organization team members. If so team users can use inbox and emails associated with it. See the team access guide at https://www.mailslurp.com/guides/team-email-account-sharing/ # noqa: E501 + + :return: The team_access of this OrganizationInboxProjection. # noqa: E501 + :rtype: bool + """ + return self._team_access + + @team_access.setter + def team_access(self, team_access): + """Sets the team_access of this OrganizationInboxProjection. + + Does inbox permit team access for organization team members. If so team users can use inbox and emails associated with it. See the team access guide at https://www.mailslurp.com/guides/team-email-account-sharing/ # noqa: E501 + + :param team_access: The team_access of this OrganizationInboxProjection. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and team_access is None: # noqa: E501 + raise ValueError("Invalid value for `team_access`, must not be `None`") # noqa: E501 + + self._team_access = team_access + + @property + def inbox_type(self): + """Gets the inbox_type of this OrganizationInboxProjection. # noqa: E501 + + Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). # noqa: E501 + + :return: The inbox_type of this OrganizationInboxProjection. # noqa: E501 + :rtype: str + """ + return self._inbox_type + + @inbox_type.setter + def inbox_type(self, inbox_type): + """Sets the inbox_type of this OrganizationInboxProjection. + + Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send). # noqa: E501 + + :param inbox_type: The inbox_type of this OrganizationInboxProjection. # noqa: E501 + :type: str + """ + allowed_values = [None,"HTTP_INBOX", "SMTP_INBOX"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and inbox_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `inbox_type` ({0}), must be one of {1}" # noqa: E501 + .format(inbox_type, allowed_values) + ) + + self._inbox_type = inbox_type + + @property + def read_only(self): + """Gets the read_only of this OrganizationInboxProjection. # noqa: E501 + + Is the inbox readOnly for the caller. Read only means can not be deleted or modified. This flag is present when using team accounts and shared inboxes. # noqa: E501 + + :return: The read_only of this OrganizationInboxProjection. # noqa: E501 + :rtype: bool + """ + return self._read_only + + @read_only.setter + def read_only(self, read_only): + """Sets the read_only of this OrganizationInboxProjection. + + Is the inbox readOnly for the caller. Read only means can not be deleted or modified. This flag is present when using team accounts and shared inboxes. # noqa: E501 + + :param read_only: The read_only of this OrganizationInboxProjection. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and read_only is None: # noqa: E501 + raise ValueError("Invalid value for `read_only`, must not be `None`") # noqa: E501 + + self._read_only = read_only + + @property + def virtual_inbox(self): + """Gets the virtual_inbox of this OrganizationInboxProjection. # noqa: E501 + + Virtual inbox can receive email but will not send emails to real recipients. Will save sent email record but never send an actual email. Perfect for testing mail server actions. # noqa: E501 + + :return: The virtual_inbox of this OrganizationInboxProjection. # noqa: E501 + :rtype: bool + """ + return self._virtual_inbox + + @virtual_inbox.setter + def virtual_inbox(self, virtual_inbox): + """Sets the virtual_inbox of this OrganizationInboxProjection. + + Virtual inbox can receive email but will not send emails to real recipients. Will save sent email record but never send an actual email. Perfect for testing mail server actions. # noqa: E501 + + :param virtual_inbox: The virtual_inbox of this OrganizationInboxProjection. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and virtual_inbox is None: # noqa: E501 + raise ValueError("Invalid value for `virtual_inbox`, must not be `None`") # noqa: E501 + + self._virtual_inbox = virtual_inbox + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OrganizationInboxProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, OrganizationInboxProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/page_alias.py b/mailslurp_client/models/page_alias.py new file mode 100644 index 00000000..5f31d0bc --- /dev/null +++ b/mailslurp_client/models/page_alias.py @@ -0,0 +1,407 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PageAlias(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'content': 'list[AliasProjection]', + 'pageable': 'PageableObject', + 'total': 'int', + 'last': 'bool', + 'total_elements': 'int', + 'total_pages': 'int', + 'size': 'int', + 'number': 'int', + 'sort': 'Sort', + 'first': 'bool', + 'number_of_elements': 'int', + 'empty': 'bool' + } + + attribute_map = { + 'content': 'content', + 'pageable': 'pageable', + 'total': 'total', + 'last': 'last', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages', + 'size': 'size', + 'number': 'number', + 'sort': 'sort', + 'first': 'first', + 'number_of_elements': 'numberOfElements', + 'empty': 'empty' + } + + def __init__(self, content=None, pageable=None, total=None, last=None, total_elements=None, total_pages=None, size=None, number=None, sort=None, first=None, number_of_elements=None, empty=None, local_vars_configuration=None): # noqa: E501 + """PageAlias - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._content = None + self._pageable = None + self._total = None + self._last = None + self._total_elements = None + self._total_pages = None + self._size = None + self._number = None + self._sort = None + self._first = None + self._number_of_elements = None + self._empty = None + self.discriminator = None + + if content is not None: + self.content = content + if pageable is not None: + self.pageable = pageable + if total is not None: + self.total = total + if last is not None: + self.last = last + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + if size is not None: + self.size = size + if number is not None: + self.number = number + if sort is not None: + self.sort = sort + if first is not None: + self.first = first + if number_of_elements is not None: + self.number_of_elements = number_of_elements + if empty is not None: + self.empty = empty + + @property + def content(self): + """Gets the content of this PageAlias. # noqa: E501 + + + :return: The content of this PageAlias. # noqa: E501 + :rtype: list[AliasProjection] + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this PageAlias. + + + :param content: The content of this PageAlias. # noqa: E501 + :type: list[AliasProjection] + """ + + self._content = content + + @property + def pageable(self): + """Gets the pageable of this PageAlias. # noqa: E501 + + + :return: The pageable of this PageAlias. # noqa: E501 + :rtype: PageableObject + """ + return self._pageable + + @pageable.setter + def pageable(self, pageable): + """Sets the pageable of this PageAlias. + + + :param pageable: The pageable of this PageAlias. # noqa: E501 + :type: PageableObject + """ + + self._pageable = pageable + + @property + def total(self): + """Gets the total of this PageAlias. # noqa: E501 + + + :return: The total of this PageAlias. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PageAlias. + + + :param total: The total of this PageAlias. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def last(self): + """Gets the last of this PageAlias. # noqa: E501 + + + :return: The last of this PageAlias. # noqa: E501 + :rtype: bool + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this PageAlias. + + + :param last: The last of this PageAlias. # noqa: E501 + :type: bool + """ + + self._last = last + + @property + def total_elements(self): + """Gets the total_elements of this PageAlias. # noqa: E501 + + + :return: The total_elements of this PageAlias. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageAlias. + + + :param total_elements: The total_elements of this PageAlias. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageAlias. # noqa: E501 + + + :return: The total_pages of this PageAlias. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageAlias. + + + :param total_pages: The total_pages of this PageAlias. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def size(self): + """Gets the size of this PageAlias. # noqa: E501 + + + :return: The size of this PageAlias. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this PageAlias. + + + :param size: The size of this PageAlias. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def number(self): + """Gets the number of this PageAlias. # noqa: E501 + + + :return: The number of this PageAlias. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this PageAlias. + + + :param number: The number of this PageAlias. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def sort(self): + """Gets the sort of this PageAlias. # noqa: E501 + + + :return: The sort of this PageAlias. # noqa: E501 + :rtype: Sort + """ + return self._sort + + @sort.setter + def sort(self, sort): + """Sets the sort of this PageAlias. + + + :param sort: The sort of this PageAlias. # noqa: E501 + :type: Sort + """ + + self._sort = sort + + @property + def first(self): + """Gets the first of this PageAlias. # noqa: E501 + + + :return: The first of this PageAlias. # noqa: E501 + :rtype: bool + """ + return self._first + + @first.setter + def first(self, first): + """Sets the first of this PageAlias. + + + :param first: The first of this PageAlias. # noqa: E501 + :type: bool + """ + + self._first = first + + @property + def number_of_elements(self): + """Gets the number_of_elements of this PageAlias. # noqa: E501 + + + :return: The number_of_elements of this PageAlias. # noqa: E501 + :rtype: int + """ + return self._number_of_elements + + @number_of_elements.setter + def number_of_elements(self, number_of_elements): + """Sets the number_of_elements of this PageAlias. + + + :param number_of_elements: The number_of_elements of this PageAlias. # noqa: E501 + :type: int + """ + + self._number_of_elements = number_of_elements + + @property + def empty(self): + """Gets the empty of this PageAlias. # noqa: E501 + + + :return: The empty of this PageAlias. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this PageAlias. + + + :param empty: The empty of this PageAlias. # noqa: E501 + :type: bool + """ + + self._empty = empty + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageAlias): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PageAlias): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/page_attachment_entity.py b/mailslurp_client/models/page_attachment_entity.py new file mode 100644 index 00000000..07986eb9 --- /dev/null +++ b/mailslurp_client/models/page_attachment_entity.py @@ -0,0 +1,407 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PageAttachmentEntity(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'content': 'list[AttachmentProjection]', + 'pageable': 'PageableObject', + 'total': 'int', + 'last': 'bool', + 'total_elements': 'int', + 'total_pages': 'int', + 'size': 'int', + 'number': 'int', + 'sort': 'Sort', + 'first': 'bool', + 'number_of_elements': 'int', + 'empty': 'bool' + } + + attribute_map = { + 'content': 'content', + 'pageable': 'pageable', + 'total': 'total', + 'last': 'last', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages', + 'size': 'size', + 'number': 'number', + 'sort': 'sort', + 'first': 'first', + 'number_of_elements': 'numberOfElements', + 'empty': 'empty' + } + + def __init__(self, content=None, pageable=None, total=None, last=None, total_elements=None, total_pages=None, size=None, number=None, sort=None, first=None, number_of_elements=None, empty=None, local_vars_configuration=None): # noqa: E501 + """PageAttachmentEntity - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._content = None + self._pageable = None + self._total = None + self._last = None + self._total_elements = None + self._total_pages = None + self._size = None + self._number = None + self._sort = None + self._first = None + self._number_of_elements = None + self._empty = None + self.discriminator = None + + if content is not None: + self.content = content + if pageable is not None: + self.pageable = pageable + if total is not None: + self.total = total + if last is not None: + self.last = last + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + if size is not None: + self.size = size + if number is not None: + self.number = number + if sort is not None: + self.sort = sort + if first is not None: + self.first = first + if number_of_elements is not None: + self.number_of_elements = number_of_elements + if empty is not None: + self.empty = empty + + @property + def content(self): + """Gets the content of this PageAttachmentEntity. # noqa: E501 + + + :return: The content of this PageAttachmentEntity. # noqa: E501 + :rtype: list[AttachmentProjection] + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this PageAttachmentEntity. + + + :param content: The content of this PageAttachmentEntity. # noqa: E501 + :type: list[AttachmentProjection] + """ + + self._content = content + + @property + def pageable(self): + """Gets the pageable of this PageAttachmentEntity. # noqa: E501 + + + :return: The pageable of this PageAttachmentEntity. # noqa: E501 + :rtype: PageableObject + """ + return self._pageable + + @pageable.setter + def pageable(self, pageable): + """Sets the pageable of this PageAttachmentEntity. + + + :param pageable: The pageable of this PageAttachmentEntity. # noqa: E501 + :type: PageableObject + """ + + self._pageable = pageable + + @property + def total(self): + """Gets the total of this PageAttachmentEntity. # noqa: E501 + + + :return: The total of this PageAttachmentEntity. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PageAttachmentEntity. + + + :param total: The total of this PageAttachmentEntity. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def last(self): + """Gets the last of this PageAttachmentEntity. # noqa: E501 + + + :return: The last of this PageAttachmentEntity. # noqa: E501 + :rtype: bool + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this PageAttachmentEntity. + + + :param last: The last of this PageAttachmentEntity. # noqa: E501 + :type: bool + """ + + self._last = last + + @property + def total_elements(self): + """Gets the total_elements of this PageAttachmentEntity. # noqa: E501 + + + :return: The total_elements of this PageAttachmentEntity. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageAttachmentEntity. + + + :param total_elements: The total_elements of this PageAttachmentEntity. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageAttachmentEntity. # noqa: E501 + + + :return: The total_pages of this PageAttachmentEntity. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageAttachmentEntity. + + + :param total_pages: The total_pages of this PageAttachmentEntity. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def size(self): + """Gets the size of this PageAttachmentEntity. # noqa: E501 + + + :return: The size of this PageAttachmentEntity. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this PageAttachmentEntity. + + + :param size: The size of this PageAttachmentEntity. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def number(self): + """Gets the number of this PageAttachmentEntity. # noqa: E501 + + + :return: The number of this PageAttachmentEntity. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this PageAttachmentEntity. + + + :param number: The number of this PageAttachmentEntity. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def sort(self): + """Gets the sort of this PageAttachmentEntity. # noqa: E501 + + + :return: The sort of this PageAttachmentEntity. # noqa: E501 + :rtype: Sort + """ + return self._sort + + @sort.setter + def sort(self, sort): + """Sets the sort of this PageAttachmentEntity. + + + :param sort: The sort of this PageAttachmentEntity. # noqa: E501 + :type: Sort + """ + + self._sort = sort + + @property + def first(self): + """Gets the first of this PageAttachmentEntity. # noqa: E501 + + + :return: The first of this PageAttachmentEntity. # noqa: E501 + :rtype: bool + """ + return self._first + + @first.setter + def first(self, first): + """Sets the first of this PageAttachmentEntity. + + + :param first: The first of this PageAttachmentEntity. # noqa: E501 + :type: bool + """ + + self._first = first + + @property + def number_of_elements(self): + """Gets the number_of_elements of this PageAttachmentEntity. # noqa: E501 + + + :return: The number_of_elements of this PageAttachmentEntity. # noqa: E501 + :rtype: int + """ + return self._number_of_elements + + @number_of_elements.setter + def number_of_elements(self, number_of_elements): + """Sets the number_of_elements of this PageAttachmentEntity. + + + :param number_of_elements: The number_of_elements of this PageAttachmentEntity. # noqa: E501 + :type: int + """ + + self._number_of_elements = number_of_elements + + @property + def empty(self): + """Gets the empty of this PageAttachmentEntity. # noqa: E501 + + + :return: The empty of this PageAttachmentEntity. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this PageAttachmentEntity. + + + :param empty: The empty of this PageAttachmentEntity. # noqa: E501 + :type: bool + """ + + self._empty = empty + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageAttachmentEntity): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PageAttachmentEntity): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/page_bounced_email.py b/mailslurp_client/models/page_bounced_email.py new file mode 100644 index 00000000..2291afbd --- /dev/null +++ b/mailslurp_client/models/page_bounced_email.py @@ -0,0 +1,407 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PageBouncedEmail(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'content': 'list[BounceProjection]', + 'pageable': 'PageableObject', + 'total': 'int', + 'last': 'bool', + 'total_elements': 'int', + 'total_pages': 'int', + 'size': 'int', + 'number': 'int', + 'sort': 'Sort', + 'first': 'bool', + 'number_of_elements': 'int', + 'empty': 'bool' + } + + attribute_map = { + 'content': 'content', + 'pageable': 'pageable', + 'total': 'total', + 'last': 'last', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages', + 'size': 'size', + 'number': 'number', + 'sort': 'sort', + 'first': 'first', + 'number_of_elements': 'numberOfElements', + 'empty': 'empty' + } + + def __init__(self, content=None, pageable=None, total=None, last=None, total_elements=None, total_pages=None, size=None, number=None, sort=None, first=None, number_of_elements=None, empty=None, local_vars_configuration=None): # noqa: E501 + """PageBouncedEmail - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._content = None + self._pageable = None + self._total = None + self._last = None + self._total_elements = None + self._total_pages = None + self._size = None + self._number = None + self._sort = None + self._first = None + self._number_of_elements = None + self._empty = None + self.discriminator = None + + if content is not None: + self.content = content + if pageable is not None: + self.pageable = pageable + if total is not None: + self.total = total + if last is not None: + self.last = last + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + if size is not None: + self.size = size + if number is not None: + self.number = number + if sort is not None: + self.sort = sort + if first is not None: + self.first = first + if number_of_elements is not None: + self.number_of_elements = number_of_elements + if empty is not None: + self.empty = empty + + @property + def content(self): + """Gets the content of this PageBouncedEmail. # noqa: E501 + + + :return: The content of this PageBouncedEmail. # noqa: E501 + :rtype: list[BounceProjection] + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this PageBouncedEmail. + + + :param content: The content of this PageBouncedEmail. # noqa: E501 + :type: list[BounceProjection] + """ + + self._content = content + + @property + def pageable(self): + """Gets the pageable of this PageBouncedEmail. # noqa: E501 + + + :return: The pageable of this PageBouncedEmail. # noqa: E501 + :rtype: PageableObject + """ + return self._pageable + + @pageable.setter + def pageable(self, pageable): + """Sets the pageable of this PageBouncedEmail. + + + :param pageable: The pageable of this PageBouncedEmail. # noqa: E501 + :type: PageableObject + """ + + self._pageable = pageable + + @property + def total(self): + """Gets the total of this PageBouncedEmail. # noqa: E501 + + + :return: The total of this PageBouncedEmail. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PageBouncedEmail. + + + :param total: The total of this PageBouncedEmail. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def last(self): + """Gets the last of this PageBouncedEmail. # noqa: E501 + + + :return: The last of this PageBouncedEmail. # noqa: E501 + :rtype: bool + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this PageBouncedEmail. + + + :param last: The last of this PageBouncedEmail. # noqa: E501 + :type: bool + """ + + self._last = last + + @property + def total_elements(self): + """Gets the total_elements of this PageBouncedEmail. # noqa: E501 + + + :return: The total_elements of this PageBouncedEmail. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageBouncedEmail. + + + :param total_elements: The total_elements of this PageBouncedEmail. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageBouncedEmail. # noqa: E501 + + + :return: The total_pages of this PageBouncedEmail. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageBouncedEmail. + + + :param total_pages: The total_pages of this PageBouncedEmail. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def size(self): + """Gets the size of this PageBouncedEmail. # noqa: E501 + + + :return: The size of this PageBouncedEmail. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this PageBouncedEmail. + + + :param size: The size of this PageBouncedEmail. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def number(self): + """Gets the number of this PageBouncedEmail. # noqa: E501 + + + :return: The number of this PageBouncedEmail. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this PageBouncedEmail. + + + :param number: The number of this PageBouncedEmail. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def sort(self): + """Gets the sort of this PageBouncedEmail. # noqa: E501 + + + :return: The sort of this PageBouncedEmail. # noqa: E501 + :rtype: Sort + """ + return self._sort + + @sort.setter + def sort(self, sort): + """Sets the sort of this PageBouncedEmail. + + + :param sort: The sort of this PageBouncedEmail. # noqa: E501 + :type: Sort + """ + + self._sort = sort + + @property + def first(self): + """Gets the first of this PageBouncedEmail. # noqa: E501 + + + :return: The first of this PageBouncedEmail. # noqa: E501 + :rtype: bool + """ + return self._first + + @first.setter + def first(self, first): + """Sets the first of this PageBouncedEmail. + + + :param first: The first of this PageBouncedEmail. # noqa: E501 + :type: bool + """ + + self._first = first + + @property + def number_of_elements(self): + """Gets the number_of_elements of this PageBouncedEmail. # noqa: E501 + + + :return: The number_of_elements of this PageBouncedEmail. # noqa: E501 + :rtype: int + """ + return self._number_of_elements + + @number_of_elements.setter + def number_of_elements(self, number_of_elements): + """Sets the number_of_elements of this PageBouncedEmail. + + + :param number_of_elements: The number_of_elements of this PageBouncedEmail. # noqa: E501 + :type: int + """ + + self._number_of_elements = number_of_elements + + @property + def empty(self): + """Gets the empty of this PageBouncedEmail. # noqa: E501 + + + :return: The empty of this PageBouncedEmail. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this PageBouncedEmail. + + + :param empty: The empty of this PageBouncedEmail. # noqa: E501 + :type: bool + """ + + self._empty = empty + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageBouncedEmail): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PageBouncedEmail): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/page_bounced_recipients.py b/mailslurp_client/models/page_bounced_recipients.py new file mode 100644 index 00000000..f1ab54da --- /dev/null +++ b/mailslurp_client/models/page_bounced_recipients.py @@ -0,0 +1,407 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PageBouncedRecipients(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'content': 'list[BounceRecipientProjection]', + 'pageable': 'PageableObject', + 'total': 'int', + 'last': 'bool', + 'total_elements': 'int', + 'total_pages': 'int', + 'size': 'int', + 'number': 'int', + 'sort': 'Sort', + 'first': 'bool', + 'number_of_elements': 'int', + 'empty': 'bool' + } + + attribute_map = { + 'content': 'content', + 'pageable': 'pageable', + 'total': 'total', + 'last': 'last', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages', + 'size': 'size', + 'number': 'number', + 'sort': 'sort', + 'first': 'first', + 'number_of_elements': 'numberOfElements', + 'empty': 'empty' + } + + def __init__(self, content=None, pageable=None, total=None, last=None, total_elements=None, total_pages=None, size=None, number=None, sort=None, first=None, number_of_elements=None, empty=None, local_vars_configuration=None): # noqa: E501 + """PageBouncedRecipients - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._content = None + self._pageable = None + self._total = None + self._last = None + self._total_elements = None + self._total_pages = None + self._size = None + self._number = None + self._sort = None + self._first = None + self._number_of_elements = None + self._empty = None + self.discriminator = None + + if content is not None: + self.content = content + if pageable is not None: + self.pageable = pageable + if total is not None: + self.total = total + if last is not None: + self.last = last + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + if size is not None: + self.size = size + if number is not None: + self.number = number + if sort is not None: + self.sort = sort + if first is not None: + self.first = first + if number_of_elements is not None: + self.number_of_elements = number_of_elements + if empty is not None: + self.empty = empty + + @property + def content(self): + """Gets the content of this PageBouncedRecipients. # noqa: E501 + + + :return: The content of this PageBouncedRecipients. # noqa: E501 + :rtype: list[BounceRecipientProjection] + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this PageBouncedRecipients. + + + :param content: The content of this PageBouncedRecipients. # noqa: E501 + :type: list[BounceRecipientProjection] + """ + + self._content = content + + @property + def pageable(self): + """Gets the pageable of this PageBouncedRecipients. # noqa: E501 + + + :return: The pageable of this PageBouncedRecipients. # noqa: E501 + :rtype: PageableObject + """ + return self._pageable + + @pageable.setter + def pageable(self, pageable): + """Sets the pageable of this PageBouncedRecipients. + + + :param pageable: The pageable of this PageBouncedRecipients. # noqa: E501 + :type: PageableObject + """ + + self._pageable = pageable + + @property + def total(self): + """Gets the total of this PageBouncedRecipients. # noqa: E501 + + + :return: The total of this PageBouncedRecipients. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PageBouncedRecipients. + + + :param total: The total of this PageBouncedRecipients. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def last(self): + """Gets the last of this PageBouncedRecipients. # noqa: E501 + + + :return: The last of this PageBouncedRecipients. # noqa: E501 + :rtype: bool + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this PageBouncedRecipients. + + + :param last: The last of this PageBouncedRecipients. # noqa: E501 + :type: bool + """ + + self._last = last + + @property + def total_elements(self): + """Gets the total_elements of this PageBouncedRecipients. # noqa: E501 + + + :return: The total_elements of this PageBouncedRecipients. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageBouncedRecipients. + + + :param total_elements: The total_elements of this PageBouncedRecipients. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageBouncedRecipients. # noqa: E501 + + + :return: The total_pages of this PageBouncedRecipients. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageBouncedRecipients. + + + :param total_pages: The total_pages of this PageBouncedRecipients. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def size(self): + """Gets the size of this PageBouncedRecipients. # noqa: E501 + + + :return: The size of this PageBouncedRecipients. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this PageBouncedRecipients. + + + :param size: The size of this PageBouncedRecipients. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def number(self): + """Gets the number of this PageBouncedRecipients. # noqa: E501 + + + :return: The number of this PageBouncedRecipients. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this PageBouncedRecipients. + + + :param number: The number of this PageBouncedRecipients. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def sort(self): + """Gets the sort of this PageBouncedRecipients. # noqa: E501 + + + :return: The sort of this PageBouncedRecipients. # noqa: E501 + :rtype: Sort + """ + return self._sort + + @sort.setter + def sort(self, sort): + """Sets the sort of this PageBouncedRecipients. + + + :param sort: The sort of this PageBouncedRecipients. # noqa: E501 + :type: Sort + """ + + self._sort = sort + + @property + def first(self): + """Gets the first of this PageBouncedRecipients. # noqa: E501 + + + :return: The first of this PageBouncedRecipients. # noqa: E501 + :rtype: bool + """ + return self._first + + @first.setter + def first(self, first): + """Sets the first of this PageBouncedRecipients. + + + :param first: The first of this PageBouncedRecipients. # noqa: E501 + :type: bool + """ + + self._first = first + + @property + def number_of_elements(self): + """Gets the number_of_elements of this PageBouncedRecipients. # noqa: E501 + + + :return: The number_of_elements of this PageBouncedRecipients. # noqa: E501 + :rtype: int + """ + return self._number_of_elements + + @number_of_elements.setter + def number_of_elements(self, number_of_elements): + """Sets the number_of_elements of this PageBouncedRecipients. + + + :param number_of_elements: The number_of_elements of this PageBouncedRecipients. # noqa: E501 + :type: int + """ + + self._number_of_elements = number_of_elements + + @property + def empty(self): + """Gets the empty of this PageBouncedRecipients. # noqa: E501 + + + :return: The empty of this PageBouncedRecipients. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this PageBouncedRecipients. + + + :param empty: The empty of this PageBouncedRecipients. # noqa: E501 + :type: bool + """ + + self._empty = empty + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageBouncedRecipients): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PageBouncedRecipients): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/page_complaint.py b/mailslurp_client/models/page_complaint.py new file mode 100644 index 00000000..ee1ced1e --- /dev/null +++ b/mailslurp_client/models/page_complaint.py @@ -0,0 +1,407 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PageComplaint(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'content': 'list[Complaint]', + 'pageable': 'PageableObject', + 'total': 'int', + 'last': 'bool', + 'total_elements': 'int', + 'total_pages': 'int', + 'size': 'int', + 'number': 'int', + 'sort': 'Sort', + 'first': 'bool', + 'number_of_elements': 'int', + 'empty': 'bool' + } + + attribute_map = { + 'content': 'content', + 'pageable': 'pageable', + 'total': 'total', + 'last': 'last', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages', + 'size': 'size', + 'number': 'number', + 'sort': 'sort', + 'first': 'first', + 'number_of_elements': 'numberOfElements', + 'empty': 'empty' + } + + def __init__(self, content=None, pageable=None, total=None, last=None, total_elements=None, total_pages=None, size=None, number=None, sort=None, first=None, number_of_elements=None, empty=None, local_vars_configuration=None): # noqa: E501 + """PageComplaint - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._content = None + self._pageable = None + self._total = None + self._last = None + self._total_elements = None + self._total_pages = None + self._size = None + self._number = None + self._sort = None + self._first = None + self._number_of_elements = None + self._empty = None + self.discriminator = None + + if content is not None: + self.content = content + if pageable is not None: + self.pageable = pageable + if total is not None: + self.total = total + if last is not None: + self.last = last + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + if size is not None: + self.size = size + if number is not None: + self.number = number + if sort is not None: + self.sort = sort + if first is not None: + self.first = first + if number_of_elements is not None: + self.number_of_elements = number_of_elements + if empty is not None: + self.empty = empty + + @property + def content(self): + """Gets the content of this PageComplaint. # noqa: E501 + + + :return: The content of this PageComplaint. # noqa: E501 + :rtype: list[Complaint] + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this PageComplaint. + + + :param content: The content of this PageComplaint. # noqa: E501 + :type: list[Complaint] + """ + + self._content = content + + @property + def pageable(self): + """Gets the pageable of this PageComplaint. # noqa: E501 + + + :return: The pageable of this PageComplaint. # noqa: E501 + :rtype: PageableObject + """ + return self._pageable + + @pageable.setter + def pageable(self, pageable): + """Sets the pageable of this PageComplaint. + + + :param pageable: The pageable of this PageComplaint. # noqa: E501 + :type: PageableObject + """ + + self._pageable = pageable + + @property + def total(self): + """Gets the total of this PageComplaint. # noqa: E501 + + + :return: The total of this PageComplaint. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PageComplaint. + + + :param total: The total of this PageComplaint. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def last(self): + """Gets the last of this PageComplaint. # noqa: E501 + + + :return: The last of this PageComplaint. # noqa: E501 + :rtype: bool + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this PageComplaint. + + + :param last: The last of this PageComplaint. # noqa: E501 + :type: bool + """ + + self._last = last + + @property + def total_elements(self): + """Gets the total_elements of this PageComplaint. # noqa: E501 + + + :return: The total_elements of this PageComplaint. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageComplaint. + + + :param total_elements: The total_elements of this PageComplaint. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageComplaint. # noqa: E501 + + + :return: The total_pages of this PageComplaint. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageComplaint. + + + :param total_pages: The total_pages of this PageComplaint. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def size(self): + """Gets the size of this PageComplaint. # noqa: E501 + + + :return: The size of this PageComplaint. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this PageComplaint. + + + :param size: The size of this PageComplaint. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def number(self): + """Gets the number of this PageComplaint. # noqa: E501 + + + :return: The number of this PageComplaint. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this PageComplaint. + + + :param number: The number of this PageComplaint. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def sort(self): + """Gets the sort of this PageComplaint. # noqa: E501 + + + :return: The sort of this PageComplaint. # noqa: E501 + :rtype: Sort + """ + return self._sort + + @sort.setter + def sort(self, sort): + """Sets the sort of this PageComplaint. + + + :param sort: The sort of this PageComplaint. # noqa: E501 + :type: Sort + """ + + self._sort = sort + + @property + def first(self): + """Gets the first of this PageComplaint. # noqa: E501 + + + :return: The first of this PageComplaint. # noqa: E501 + :rtype: bool + """ + return self._first + + @first.setter + def first(self, first): + """Sets the first of this PageComplaint. + + + :param first: The first of this PageComplaint. # noqa: E501 + :type: bool + """ + + self._first = first + + @property + def number_of_elements(self): + """Gets the number_of_elements of this PageComplaint. # noqa: E501 + + + :return: The number_of_elements of this PageComplaint. # noqa: E501 + :rtype: int + """ + return self._number_of_elements + + @number_of_elements.setter + def number_of_elements(self, number_of_elements): + """Sets the number_of_elements of this PageComplaint. + + + :param number_of_elements: The number_of_elements of this PageComplaint. # noqa: E501 + :type: int + """ + + self._number_of_elements = number_of_elements + + @property + def empty(self): + """Gets the empty of this PageComplaint. # noqa: E501 + + + :return: The empty of this PageComplaint. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this PageComplaint. + + + :param empty: The empty of this PageComplaint. # noqa: E501 + :type: bool + """ + + self._empty = empty + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageComplaint): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PageComplaint): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/page_contact_projection.py b/mailslurp_client/models/page_contact_projection.py new file mode 100644 index 00000000..d5e5ee32 --- /dev/null +++ b/mailslurp_client/models/page_contact_projection.py @@ -0,0 +1,407 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PageContactProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'content': 'list[ContactProjection]', + 'pageable': 'PageableObject', + 'total': 'int', + 'last': 'bool', + 'total_elements': 'int', + 'total_pages': 'int', + 'size': 'int', + 'number': 'int', + 'sort': 'Sort', + 'first': 'bool', + 'number_of_elements': 'int', + 'empty': 'bool' + } + + attribute_map = { + 'content': 'content', + 'pageable': 'pageable', + 'total': 'total', + 'last': 'last', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages', + 'size': 'size', + 'number': 'number', + 'sort': 'sort', + 'first': 'first', + 'number_of_elements': 'numberOfElements', + 'empty': 'empty' + } + + def __init__(self, content=None, pageable=None, total=None, last=None, total_elements=None, total_pages=None, size=None, number=None, sort=None, first=None, number_of_elements=None, empty=None, local_vars_configuration=None): # noqa: E501 + """PageContactProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._content = None + self._pageable = None + self._total = None + self._last = None + self._total_elements = None + self._total_pages = None + self._size = None + self._number = None + self._sort = None + self._first = None + self._number_of_elements = None + self._empty = None + self.discriminator = None + + if content is not None: + self.content = content + if pageable is not None: + self.pageable = pageable + if total is not None: + self.total = total + if last is not None: + self.last = last + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + if size is not None: + self.size = size + if number is not None: + self.number = number + if sort is not None: + self.sort = sort + if first is not None: + self.first = first + if number_of_elements is not None: + self.number_of_elements = number_of_elements + if empty is not None: + self.empty = empty + + @property + def content(self): + """Gets the content of this PageContactProjection. # noqa: E501 + + + :return: The content of this PageContactProjection. # noqa: E501 + :rtype: list[ContactProjection] + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this PageContactProjection. + + + :param content: The content of this PageContactProjection. # noqa: E501 + :type: list[ContactProjection] + """ + + self._content = content + + @property + def pageable(self): + """Gets the pageable of this PageContactProjection. # noqa: E501 + + + :return: The pageable of this PageContactProjection. # noqa: E501 + :rtype: PageableObject + """ + return self._pageable + + @pageable.setter + def pageable(self, pageable): + """Sets the pageable of this PageContactProjection. + + + :param pageable: The pageable of this PageContactProjection. # noqa: E501 + :type: PageableObject + """ + + self._pageable = pageable + + @property + def total(self): + """Gets the total of this PageContactProjection. # noqa: E501 + + + :return: The total of this PageContactProjection. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PageContactProjection. + + + :param total: The total of this PageContactProjection. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def last(self): + """Gets the last of this PageContactProjection. # noqa: E501 + + + :return: The last of this PageContactProjection. # noqa: E501 + :rtype: bool + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this PageContactProjection. + + + :param last: The last of this PageContactProjection. # noqa: E501 + :type: bool + """ + + self._last = last + + @property + def total_elements(self): + """Gets the total_elements of this PageContactProjection. # noqa: E501 + + + :return: The total_elements of this PageContactProjection. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageContactProjection. + + + :param total_elements: The total_elements of this PageContactProjection. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageContactProjection. # noqa: E501 + + + :return: The total_pages of this PageContactProjection. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageContactProjection. + + + :param total_pages: The total_pages of this PageContactProjection. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def size(self): + """Gets the size of this PageContactProjection. # noqa: E501 + + + :return: The size of this PageContactProjection. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this PageContactProjection. + + + :param size: The size of this PageContactProjection. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def number(self): + """Gets the number of this PageContactProjection. # noqa: E501 + + + :return: The number of this PageContactProjection. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this PageContactProjection. + + + :param number: The number of this PageContactProjection. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def sort(self): + """Gets the sort of this PageContactProjection. # noqa: E501 + + + :return: The sort of this PageContactProjection. # noqa: E501 + :rtype: Sort + """ + return self._sort + + @sort.setter + def sort(self, sort): + """Sets the sort of this PageContactProjection. + + + :param sort: The sort of this PageContactProjection. # noqa: E501 + :type: Sort + """ + + self._sort = sort + + @property + def first(self): + """Gets the first of this PageContactProjection. # noqa: E501 + + + :return: The first of this PageContactProjection. # noqa: E501 + :rtype: bool + """ + return self._first + + @first.setter + def first(self, first): + """Sets the first of this PageContactProjection. + + + :param first: The first of this PageContactProjection. # noqa: E501 + :type: bool + """ + + self._first = first + + @property + def number_of_elements(self): + """Gets the number_of_elements of this PageContactProjection. # noqa: E501 + + + :return: The number_of_elements of this PageContactProjection. # noqa: E501 + :rtype: int + """ + return self._number_of_elements + + @number_of_elements.setter + def number_of_elements(self, number_of_elements): + """Sets the number_of_elements of this PageContactProjection. + + + :param number_of_elements: The number_of_elements of this PageContactProjection. # noqa: E501 + :type: int + """ + + self._number_of_elements = number_of_elements + + @property + def empty(self): + """Gets the empty of this PageContactProjection. # noqa: E501 + + + :return: The empty of this PageContactProjection. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this PageContactProjection. + + + :param empty: The empty of this PageContactProjection. # noqa: E501 + :type: bool + """ + + self._empty = empty + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageContactProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PageContactProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/page_delivery_status.py b/mailslurp_client/models/page_delivery_status.py new file mode 100644 index 00000000..426e7606 --- /dev/null +++ b/mailslurp_client/models/page_delivery_status.py @@ -0,0 +1,407 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PageDeliveryStatus(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'content': 'list[DeliveryStatusDto]', + 'pageable': 'PageableObject', + 'total': 'int', + 'last': 'bool', + 'total_elements': 'int', + 'total_pages': 'int', + 'size': 'int', + 'number': 'int', + 'sort': 'Sort', + 'first': 'bool', + 'number_of_elements': 'int', + 'empty': 'bool' + } + + attribute_map = { + 'content': 'content', + 'pageable': 'pageable', + 'total': 'total', + 'last': 'last', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages', + 'size': 'size', + 'number': 'number', + 'sort': 'sort', + 'first': 'first', + 'number_of_elements': 'numberOfElements', + 'empty': 'empty' + } + + def __init__(self, content=None, pageable=None, total=None, last=None, total_elements=None, total_pages=None, size=None, number=None, sort=None, first=None, number_of_elements=None, empty=None, local_vars_configuration=None): # noqa: E501 + """PageDeliveryStatus - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._content = None + self._pageable = None + self._total = None + self._last = None + self._total_elements = None + self._total_pages = None + self._size = None + self._number = None + self._sort = None + self._first = None + self._number_of_elements = None + self._empty = None + self.discriminator = None + + if content is not None: + self.content = content + if pageable is not None: + self.pageable = pageable + if total is not None: + self.total = total + if last is not None: + self.last = last + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + if size is not None: + self.size = size + if number is not None: + self.number = number + if sort is not None: + self.sort = sort + if first is not None: + self.first = first + if number_of_elements is not None: + self.number_of_elements = number_of_elements + if empty is not None: + self.empty = empty + + @property + def content(self): + """Gets the content of this PageDeliveryStatus. # noqa: E501 + + + :return: The content of this PageDeliveryStatus. # noqa: E501 + :rtype: list[DeliveryStatusDto] + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this PageDeliveryStatus. + + + :param content: The content of this PageDeliveryStatus. # noqa: E501 + :type: list[DeliveryStatusDto] + """ + + self._content = content + + @property + def pageable(self): + """Gets the pageable of this PageDeliveryStatus. # noqa: E501 + + + :return: The pageable of this PageDeliveryStatus. # noqa: E501 + :rtype: PageableObject + """ + return self._pageable + + @pageable.setter + def pageable(self, pageable): + """Sets the pageable of this PageDeliveryStatus. + + + :param pageable: The pageable of this PageDeliveryStatus. # noqa: E501 + :type: PageableObject + """ + + self._pageable = pageable + + @property + def total(self): + """Gets the total of this PageDeliveryStatus. # noqa: E501 + + + :return: The total of this PageDeliveryStatus. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PageDeliveryStatus. + + + :param total: The total of this PageDeliveryStatus. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def last(self): + """Gets the last of this PageDeliveryStatus. # noqa: E501 + + + :return: The last of this PageDeliveryStatus. # noqa: E501 + :rtype: bool + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this PageDeliveryStatus. + + + :param last: The last of this PageDeliveryStatus. # noqa: E501 + :type: bool + """ + + self._last = last + + @property + def total_elements(self): + """Gets the total_elements of this PageDeliveryStatus. # noqa: E501 + + + :return: The total_elements of this PageDeliveryStatus. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageDeliveryStatus. + + + :param total_elements: The total_elements of this PageDeliveryStatus. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageDeliveryStatus. # noqa: E501 + + + :return: The total_pages of this PageDeliveryStatus. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageDeliveryStatus. + + + :param total_pages: The total_pages of this PageDeliveryStatus. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def size(self): + """Gets the size of this PageDeliveryStatus. # noqa: E501 + + + :return: The size of this PageDeliveryStatus. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this PageDeliveryStatus. + + + :param size: The size of this PageDeliveryStatus. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def number(self): + """Gets the number of this PageDeliveryStatus. # noqa: E501 + + + :return: The number of this PageDeliveryStatus. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this PageDeliveryStatus. + + + :param number: The number of this PageDeliveryStatus. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def sort(self): + """Gets the sort of this PageDeliveryStatus. # noqa: E501 + + + :return: The sort of this PageDeliveryStatus. # noqa: E501 + :rtype: Sort + """ + return self._sort + + @sort.setter + def sort(self, sort): + """Sets the sort of this PageDeliveryStatus. + + + :param sort: The sort of this PageDeliveryStatus. # noqa: E501 + :type: Sort + """ + + self._sort = sort + + @property + def first(self): + """Gets the first of this PageDeliveryStatus. # noqa: E501 + + + :return: The first of this PageDeliveryStatus. # noqa: E501 + :rtype: bool + """ + return self._first + + @first.setter + def first(self, first): + """Sets the first of this PageDeliveryStatus. + + + :param first: The first of this PageDeliveryStatus. # noqa: E501 + :type: bool + """ + + self._first = first + + @property + def number_of_elements(self): + """Gets the number_of_elements of this PageDeliveryStatus. # noqa: E501 + + + :return: The number_of_elements of this PageDeliveryStatus. # noqa: E501 + :rtype: int + """ + return self._number_of_elements + + @number_of_elements.setter + def number_of_elements(self, number_of_elements): + """Sets the number_of_elements of this PageDeliveryStatus. + + + :param number_of_elements: The number_of_elements of this PageDeliveryStatus. # noqa: E501 + :type: int + """ + + self._number_of_elements = number_of_elements + + @property + def empty(self): + """Gets the empty of this PageDeliveryStatus. # noqa: E501 + + + :return: The empty of this PageDeliveryStatus. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this PageDeliveryStatus. + + + :param empty: The empty of this PageDeliveryStatus. # noqa: E501 + :type: bool + """ + + self._empty = empty + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageDeliveryStatus): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PageDeliveryStatus): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/page_email_preview.py b/mailslurp_client/models/page_email_preview.py new file mode 100644 index 00000000..458a6945 --- /dev/null +++ b/mailslurp_client/models/page_email_preview.py @@ -0,0 +1,407 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PageEmailPreview(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'content': 'list[EmailPreview]', + 'pageable': 'PageableObject', + 'total': 'int', + 'last': 'bool', + 'total_elements': 'int', + 'total_pages': 'int', + 'size': 'int', + 'number': 'int', + 'sort': 'Sort', + 'first': 'bool', + 'number_of_elements': 'int', + 'empty': 'bool' + } + + attribute_map = { + 'content': 'content', + 'pageable': 'pageable', + 'total': 'total', + 'last': 'last', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages', + 'size': 'size', + 'number': 'number', + 'sort': 'sort', + 'first': 'first', + 'number_of_elements': 'numberOfElements', + 'empty': 'empty' + } + + def __init__(self, content=None, pageable=None, total=None, last=None, total_elements=None, total_pages=None, size=None, number=None, sort=None, first=None, number_of_elements=None, empty=None, local_vars_configuration=None): # noqa: E501 + """PageEmailPreview - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._content = None + self._pageable = None + self._total = None + self._last = None + self._total_elements = None + self._total_pages = None + self._size = None + self._number = None + self._sort = None + self._first = None + self._number_of_elements = None + self._empty = None + self.discriminator = None + + if content is not None: + self.content = content + if pageable is not None: + self.pageable = pageable + if total is not None: + self.total = total + if last is not None: + self.last = last + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + if size is not None: + self.size = size + if number is not None: + self.number = number + if sort is not None: + self.sort = sort + if first is not None: + self.first = first + if number_of_elements is not None: + self.number_of_elements = number_of_elements + if empty is not None: + self.empty = empty + + @property + def content(self): + """Gets the content of this PageEmailPreview. # noqa: E501 + + + :return: The content of this PageEmailPreview. # noqa: E501 + :rtype: list[EmailPreview] + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this PageEmailPreview. + + + :param content: The content of this PageEmailPreview. # noqa: E501 + :type: list[EmailPreview] + """ + + self._content = content + + @property + def pageable(self): + """Gets the pageable of this PageEmailPreview. # noqa: E501 + + + :return: The pageable of this PageEmailPreview. # noqa: E501 + :rtype: PageableObject + """ + return self._pageable + + @pageable.setter + def pageable(self, pageable): + """Sets the pageable of this PageEmailPreview. + + + :param pageable: The pageable of this PageEmailPreview. # noqa: E501 + :type: PageableObject + """ + + self._pageable = pageable + + @property + def total(self): + """Gets the total of this PageEmailPreview. # noqa: E501 + + + :return: The total of this PageEmailPreview. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PageEmailPreview. + + + :param total: The total of this PageEmailPreview. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def last(self): + """Gets the last of this PageEmailPreview. # noqa: E501 + + + :return: The last of this PageEmailPreview. # noqa: E501 + :rtype: bool + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this PageEmailPreview. + + + :param last: The last of this PageEmailPreview. # noqa: E501 + :type: bool + """ + + self._last = last + + @property + def total_elements(self): + """Gets the total_elements of this PageEmailPreview. # noqa: E501 + + + :return: The total_elements of this PageEmailPreview. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageEmailPreview. + + + :param total_elements: The total_elements of this PageEmailPreview. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageEmailPreview. # noqa: E501 + + + :return: The total_pages of this PageEmailPreview. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageEmailPreview. + + + :param total_pages: The total_pages of this PageEmailPreview. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def size(self): + """Gets the size of this PageEmailPreview. # noqa: E501 + + + :return: The size of this PageEmailPreview. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this PageEmailPreview. + + + :param size: The size of this PageEmailPreview. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def number(self): + """Gets the number of this PageEmailPreview. # noqa: E501 + + + :return: The number of this PageEmailPreview. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this PageEmailPreview. + + + :param number: The number of this PageEmailPreview. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def sort(self): + """Gets the sort of this PageEmailPreview. # noqa: E501 + + + :return: The sort of this PageEmailPreview. # noqa: E501 + :rtype: Sort + """ + return self._sort + + @sort.setter + def sort(self, sort): + """Sets the sort of this PageEmailPreview. + + + :param sort: The sort of this PageEmailPreview. # noqa: E501 + :type: Sort + """ + + self._sort = sort + + @property + def first(self): + """Gets the first of this PageEmailPreview. # noqa: E501 + + + :return: The first of this PageEmailPreview. # noqa: E501 + :rtype: bool + """ + return self._first + + @first.setter + def first(self, first): + """Sets the first of this PageEmailPreview. + + + :param first: The first of this PageEmailPreview. # noqa: E501 + :type: bool + """ + + self._first = first + + @property + def number_of_elements(self): + """Gets the number_of_elements of this PageEmailPreview. # noqa: E501 + + + :return: The number_of_elements of this PageEmailPreview. # noqa: E501 + :rtype: int + """ + return self._number_of_elements + + @number_of_elements.setter + def number_of_elements(self, number_of_elements): + """Sets the number_of_elements of this PageEmailPreview. + + + :param number_of_elements: The number_of_elements of this PageEmailPreview. # noqa: E501 + :type: int + """ + + self._number_of_elements = number_of_elements + + @property + def empty(self): + """Gets the empty of this PageEmailPreview. # noqa: E501 + + + :return: The empty of this PageEmailPreview. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this PageEmailPreview. + + + :param empty: The empty of this PageEmailPreview. # noqa: E501 + :type: bool + """ + + self._empty = empty + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageEmailPreview): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PageEmailPreview): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/page_email_projection.py b/mailslurp_client/models/page_email_projection.py new file mode 100644 index 00000000..9fb7d0ab --- /dev/null +++ b/mailslurp_client/models/page_email_projection.py @@ -0,0 +1,407 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PageEmailProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'content': 'list[EmailProjection]', + 'pageable': 'PageableObject', + 'total': 'int', + 'last': 'bool', + 'total_elements': 'int', + 'total_pages': 'int', + 'size': 'int', + 'number': 'int', + 'sort': 'Sort', + 'first': 'bool', + 'number_of_elements': 'int', + 'empty': 'bool' + } + + attribute_map = { + 'content': 'content', + 'pageable': 'pageable', + 'total': 'total', + 'last': 'last', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages', + 'size': 'size', + 'number': 'number', + 'sort': 'sort', + 'first': 'first', + 'number_of_elements': 'numberOfElements', + 'empty': 'empty' + } + + def __init__(self, content=None, pageable=None, total=None, last=None, total_elements=None, total_pages=None, size=None, number=None, sort=None, first=None, number_of_elements=None, empty=None, local_vars_configuration=None): # noqa: E501 + """PageEmailProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._content = None + self._pageable = None + self._total = None + self._last = None + self._total_elements = None + self._total_pages = None + self._size = None + self._number = None + self._sort = None + self._first = None + self._number_of_elements = None + self._empty = None + self.discriminator = None + + if content is not None: + self.content = content + if pageable is not None: + self.pageable = pageable + if total is not None: + self.total = total + if last is not None: + self.last = last + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + if size is not None: + self.size = size + if number is not None: + self.number = number + if sort is not None: + self.sort = sort + if first is not None: + self.first = first + if number_of_elements is not None: + self.number_of_elements = number_of_elements + if empty is not None: + self.empty = empty + + @property + def content(self): + """Gets the content of this PageEmailProjection. # noqa: E501 + + + :return: The content of this PageEmailProjection. # noqa: E501 + :rtype: list[EmailProjection] + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this PageEmailProjection. + + + :param content: The content of this PageEmailProjection. # noqa: E501 + :type: list[EmailProjection] + """ + + self._content = content + + @property + def pageable(self): + """Gets the pageable of this PageEmailProjection. # noqa: E501 + + + :return: The pageable of this PageEmailProjection. # noqa: E501 + :rtype: PageableObject + """ + return self._pageable + + @pageable.setter + def pageable(self, pageable): + """Sets the pageable of this PageEmailProjection. + + + :param pageable: The pageable of this PageEmailProjection. # noqa: E501 + :type: PageableObject + """ + + self._pageable = pageable + + @property + def total(self): + """Gets the total of this PageEmailProjection. # noqa: E501 + + + :return: The total of this PageEmailProjection. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PageEmailProjection. + + + :param total: The total of this PageEmailProjection. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def last(self): + """Gets the last of this PageEmailProjection. # noqa: E501 + + + :return: The last of this PageEmailProjection. # noqa: E501 + :rtype: bool + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this PageEmailProjection. + + + :param last: The last of this PageEmailProjection. # noqa: E501 + :type: bool + """ + + self._last = last + + @property + def total_elements(self): + """Gets the total_elements of this PageEmailProjection. # noqa: E501 + + + :return: The total_elements of this PageEmailProjection. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageEmailProjection. + + + :param total_elements: The total_elements of this PageEmailProjection. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageEmailProjection. # noqa: E501 + + + :return: The total_pages of this PageEmailProjection. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageEmailProjection. + + + :param total_pages: The total_pages of this PageEmailProjection. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def size(self): + """Gets the size of this PageEmailProjection. # noqa: E501 + + + :return: The size of this PageEmailProjection. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this PageEmailProjection. + + + :param size: The size of this PageEmailProjection. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def number(self): + """Gets the number of this PageEmailProjection. # noqa: E501 + + + :return: The number of this PageEmailProjection. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this PageEmailProjection. + + + :param number: The number of this PageEmailProjection. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def sort(self): + """Gets the sort of this PageEmailProjection. # noqa: E501 + + + :return: The sort of this PageEmailProjection. # noqa: E501 + :rtype: Sort + """ + return self._sort + + @sort.setter + def sort(self, sort): + """Sets the sort of this PageEmailProjection. + + + :param sort: The sort of this PageEmailProjection. # noqa: E501 + :type: Sort + """ + + self._sort = sort + + @property + def first(self): + """Gets the first of this PageEmailProjection. # noqa: E501 + + + :return: The first of this PageEmailProjection. # noqa: E501 + :rtype: bool + """ + return self._first + + @first.setter + def first(self, first): + """Sets the first of this PageEmailProjection. + + + :param first: The first of this PageEmailProjection. # noqa: E501 + :type: bool + """ + + self._first = first + + @property + def number_of_elements(self): + """Gets the number_of_elements of this PageEmailProjection. # noqa: E501 + + + :return: The number_of_elements of this PageEmailProjection. # noqa: E501 + :rtype: int + """ + return self._number_of_elements + + @number_of_elements.setter + def number_of_elements(self, number_of_elements): + """Sets the number_of_elements of this PageEmailProjection. + + + :param number_of_elements: The number_of_elements of this PageEmailProjection. # noqa: E501 + :type: int + """ + + self._number_of_elements = number_of_elements + + @property + def empty(self): + """Gets the empty of this PageEmailProjection. # noqa: E501 + + + :return: The empty of this PageEmailProjection. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this PageEmailProjection. + + + :param empty: The empty of this PageEmailProjection. # noqa: E501 + :type: bool + """ + + self._empty = empty + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageEmailProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PageEmailProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/page_email_validation_request.py b/mailslurp_client/models/page_email_validation_request.py new file mode 100644 index 00000000..fab11195 --- /dev/null +++ b/mailslurp_client/models/page_email_validation_request.py @@ -0,0 +1,407 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PageEmailValidationRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'content': 'list[EmailValidationRequest]', + 'pageable': 'PageableObject', + 'total': 'int', + 'last': 'bool', + 'total_elements': 'int', + 'total_pages': 'int', + 'size': 'int', + 'number': 'int', + 'sort': 'Sort', + 'first': 'bool', + 'number_of_elements': 'int', + 'empty': 'bool' + } + + attribute_map = { + 'content': 'content', + 'pageable': 'pageable', + 'total': 'total', + 'last': 'last', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages', + 'size': 'size', + 'number': 'number', + 'sort': 'sort', + 'first': 'first', + 'number_of_elements': 'numberOfElements', + 'empty': 'empty' + } + + def __init__(self, content=None, pageable=None, total=None, last=None, total_elements=None, total_pages=None, size=None, number=None, sort=None, first=None, number_of_elements=None, empty=None, local_vars_configuration=None): # noqa: E501 + """PageEmailValidationRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._content = None + self._pageable = None + self._total = None + self._last = None + self._total_elements = None + self._total_pages = None + self._size = None + self._number = None + self._sort = None + self._first = None + self._number_of_elements = None + self._empty = None + self.discriminator = None + + if content is not None: + self.content = content + if pageable is not None: + self.pageable = pageable + if total is not None: + self.total = total + if last is not None: + self.last = last + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + if size is not None: + self.size = size + if number is not None: + self.number = number + if sort is not None: + self.sort = sort + if first is not None: + self.first = first + if number_of_elements is not None: + self.number_of_elements = number_of_elements + if empty is not None: + self.empty = empty + + @property + def content(self): + """Gets the content of this PageEmailValidationRequest. # noqa: E501 + + + :return: The content of this PageEmailValidationRequest. # noqa: E501 + :rtype: list[EmailValidationRequest] + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this PageEmailValidationRequest. + + + :param content: The content of this PageEmailValidationRequest. # noqa: E501 + :type: list[EmailValidationRequest] + """ + + self._content = content + + @property + def pageable(self): + """Gets the pageable of this PageEmailValidationRequest. # noqa: E501 + + + :return: The pageable of this PageEmailValidationRequest. # noqa: E501 + :rtype: PageableObject + """ + return self._pageable + + @pageable.setter + def pageable(self, pageable): + """Sets the pageable of this PageEmailValidationRequest. + + + :param pageable: The pageable of this PageEmailValidationRequest. # noqa: E501 + :type: PageableObject + """ + + self._pageable = pageable + + @property + def total(self): + """Gets the total of this PageEmailValidationRequest. # noqa: E501 + + + :return: The total of this PageEmailValidationRequest. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PageEmailValidationRequest. + + + :param total: The total of this PageEmailValidationRequest. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def last(self): + """Gets the last of this PageEmailValidationRequest. # noqa: E501 + + + :return: The last of this PageEmailValidationRequest. # noqa: E501 + :rtype: bool + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this PageEmailValidationRequest. + + + :param last: The last of this PageEmailValidationRequest. # noqa: E501 + :type: bool + """ + + self._last = last + + @property + def total_elements(self): + """Gets the total_elements of this PageEmailValidationRequest. # noqa: E501 + + + :return: The total_elements of this PageEmailValidationRequest. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageEmailValidationRequest. + + + :param total_elements: The total_elements of this PageEmailValidationRequest. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageEmailValidationRequest. # noqa: E501 + + + :return: The total_pages of this PageEmailValidationRequest. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageEmailValidationRequest. + + + :param total_pages: The total_pages of this PageEmailValidationRequest. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def size(self): + """Gets the size of this PageEmailValidationRequest. # noqa: E501 + + + :return: The size of this PageEmailValidationRequest. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this PageEmailValidationRequest. + + + :param size: The size of this PageEmailValidationRequest. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def number(self): + """Gets the number of this PageEmailValidationRequest. # noqa: E501 + + + :return: The number of this PageEmailValidationRequest. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this PageEmailValidationRequest. + + + :param number: The number of this PageEmailValidationRequest. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def sort(self): + """Gets the sort of this PageEmailValidationRequest. # noqa: E501 + + + :return: The sort of this PageEmailValidationRequest. # noqa: E501 + :rtype: Sort + """ + return self._sort + + @sort.setter + def sort(self, sort): + """Sets the sort of this PageEmailValidationRequest. + + + :param sort: The sort of this PageEmailValidationRequest. # noqa: E501 + :type: Sort + """ + + self._sort = sort + + @property + def first(self): + """Gets the first of this PageEmailValidationRequest. # noqa: E501 + + + :return: The first of this PageEmailValidationRequest. # noqa: E501 + :rtype: bool + """ + return self._first + + @first.setter + def first(self, first): + """Sets the first of this PageEmailValidationRequest. + + + :param first: The first of this PageEmailValidationRequest. # noqa: E501 + :type: bool + """ + + self._first = first + + @property + def number_of_elements(self): + """Gets the number_of_elements of this PageEmailValidationRequest. # noqa: E501 + + + :return: The number_of_elements of this PageEmailValidationRequest. # noqa: E501 + :rtype: int + """ + return self._number_of_elements + + @number_of_elements.setter + def number_of_elements(self, number_of_elements): + """Sets the number_of_elements of this PageEmailValidationRequest. + + + :param number_of_elements: The number_of_elements of this PageEmailValidationRequest. # noqa: E501 + :type: int + """ + + self._number_of_elements = number_of_elements + + @property + def empty(self): + """Gets the empty of this PageEmailValidationRequest. # noqa: E501 + + + :return: The empty of this PageEmailValidationRequest. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this PageEmailValidationRequest. + + + :param empty: The empty of this PageEmailValidationRequest. # noqa: E501 + :type: bool + """ + + self._empty = empty + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageEmailValidationRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PageEmailValidationRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/page_expired_inbox_record_projection.py b/mailslurp_client/models/page_expired_inbox_record_projection.py new file mode 100644 index 00000000..ad1eb721 --- /dev/null +++ b/mailslurp_client/models/page_expired_inbox_record_projection.py @@ -0,0 +1,407 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PageExpiredInboxRecordProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'content': 'list[ExpiredInboxRecordProjection]', + 'pageable': 'PageableObject', + 'total': 'int', + 'last': 'bool', + 'total_elements': 'int', + 'total_pages': 'int', + 'size': 'int', + 'number': 'int', + 'sort': 'Sort', + 'first': 'bool', + 'number_of_elements': 'int', + 'empty': 'bool' + } + + attribute_map = { + 'content': 'content', + 'pageable': 'pageable', + 'total': 'total', + 'last': 'last', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages', + 'size': 'size', + 'number': 'number', + 'sort': 'sort', + 'first': 'first', + 'number_of_elements': 'numberOfElements', + 'empty': 'empty' + } + + def __init__(self, content=None, pageable=None, total=None, last=None, total_elements=None, total_pages=None, size=None, number=None, sort=None, first=None, number_of_elements=None, empty=None, local_vars_configuration=None): # noqa: E501 + """PageExpiredInboxRecordProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._content = None + self._pageable = None + self._total = None + self._last = None + self._total_elements = None + self._total_pages = None + self._size = None + self._number = None + self._sort = None + self._first = None + self._number_of_elements = None + self._empty = None + self.discriminator = None + + if content is not None: + self.content = content + if pageable is not None: + self.pageable = pageable + if total is not None: + self.total = total + if last is not None: + self.last = last + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + if size is not None: + self.size = size + if number is not None: + self.number = number + if sort is not None: + self.sort = sort + if first is not None: + self.first = first + if number_of_elements is not None: + self.number_of_elements = number_of_elements + if empty is not None: + self.empty = empty + + @property + def content(self): + """Gets the content of this PageExpiredInboxRecordProjection. # noqa: E501 + + + :return: The content of this PageExpiredInboxRecordProjection. # noqa: E501 + :rtype: list[ExpiredInboxRecordProjection] + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this PageExpiredInboxRecordProjection. + + + :param content: The content of this PageExpiredInboxRecordProjection. # noqa: E501 + :type: list[ExpiredInboxRecordProjection] + """ + + self._content = content + + @property + def pageable(self): + """Gets the pageable of this PageExpiredInboxRecordProjection. # noqa: E501 + + + :return: The pageable of this PageExpiredInboxRecordProjection. # noqa: E501 + :rtype: PageableObject + """ + return self._pageable + + @pageable.setter + def pageable(self, pageable): + """Sets the pageable of this PageExpiredInboxRecordProjection. + + + :param pageable: The pageable of this PageExpiredInboxRecordProjection. # noqa: E501 + :type: PageableObject + """ + + self._pageable = pageable + + @property + def total(self): + """Gets the total of this PageExpiredInboxRecordProjection. # noqa: E501 + + + :return: The total of this PageExpiredInboxRecordProjection. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PageExpiredInboxRecordProjection. + + + :param total: The total of this PageExpiredInboxRecordProjection. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def last(self): + """Gets the last of this PageExpiredInboxRecordProjection. # noqa: E501 + + + :return: The last of this PageExpiredInboxRecordProjection. # noqa: E501 + :rtype: bool + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this PageExpiredInboxRecordProjection. + + + :param last: The last of this PageExpiredInboxRecordProjection. # noqa: E501 + :type: bool + """ + + self._last = last + + @property + def total_elements(self): + """Gets the total_elements of this PageExpiredInboxRecordProjection. # noqa: E501 + + + :return: The total_elements of this PageExpiredInboxRecordProjection. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageExpiredInboxRecordProjection. + + + :param total_elements: The total_elements of this PageExpiredInboxRecordProjection. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageExpiredInboxRecordProjection. # noqa: E501 + + + :return: The total_pages of this PageExpiredInboxRecordProjection. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageExpiredInboxRecordProjection. + + + :param total_pages: The total_pages of this PageExpiredInboxRecordProjection. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def size(self): + """Gets the size of this PageExpiredInboxRecordProjection. # noqa: E501 + + + :return: The size of this PageExpiredInboxRecordProjection. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this PageExpiredInboxRecordProjection. + + + :param size: The size of this PageExpiredInboxRecordProjection. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def number(self): + """Gets the number of this PageExpiredInboxRecordProjection. # noqa: E501 + + + :return: The number of this PageExpiredInboxRecordProjection. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this PageExpiredInboxRecordProjection. + + + :param number: The number of this PageExpiredInboxRecordProjection. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def sort(self): + """Gets the sort of this PageExpiredInboxRecordProjection. # noqa: E501 + + + :return: The sort of this PageExpiredInboxRecordProjection. # noqa: E501 + :rtype: Sort + """ + return self._sort + + @sort.setter + def sort(self, sort): + """Sets the sort of this PageExpiredInboxRecordProjection. + + + :param sort: The sort of this PageExpiredInboxRecordProjection. # noqa: E501 + :type: Sort + """ + + self._sort = sort + + @property + def first(self): + """Gets the first of this PageExpiredInboxRecordProjection. # noqa: E501 + + + :return: The first of this PageExpiredInboxRecordProjection. # noqa: E501 + :rtype: bool + """ + return self._first + + @first.setter + def first(self, first): + """Sets the first of this PageExpiredInboxRecordProjection. + + + :param first: The first of this PageExpiredInboxRecordProjection. # noqa: E501 + :type: bool + """ + + self._first = first + + @property + def number_of_elements(self): + """Gets the number_of_elements of this PageExpiredInboxRecordProjection. # noqa: E501 + + + :return: The number_of_elements of this PageExpiredInboxRecordProjection. # noqa: E501 + :rtype: int + """ + return self._number_of_elements + + @number_of_elements.setter + def number_of_elements(self, number_of_elements): + """Sets the number_of_elements of this PageExpiredInboxRecordProjection. + + + :param number_of_elements: The number_of_elements of this PageExpiredInboxRecordProjection. # noqa: E501 + :type: int + """ + + self._number_of_elements = number_of_elements + + @property + def empty(self): + """Gets the empty of this PageExpiredInboxRecordProjection. # noqa: E501 + + + :return: The empty of this PageExpiredInboxRecordProjection. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this PageExpiredInboxRecordProjection. + + + :param empty: The empty of this PageExpiredInboxRecordProjection. # noqa: E501 + :type: bool + """ + + self._empty = empty + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageExpiredInboxRecordProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PageExpiredInboxRecordProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/page_group_projection.py b/mailslurp_client/models/page_group_projection.py new file mode 100644 index 00000000..eb02f404 --- /dev/null +++ b/mailslurp_client/models/page_group_projection.py @@ -0,0 +1,407 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PageGroupProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'content': 'list[GroupProjection]', + 'pageable': 'PageableObject', + 'total': 'int', + 'last': 'bool', + 'total_elements': 'int', + 'total_pages': 'int', + 'size': 'int', + 'number': 'int', + 'sort': 'Sort', + 'first': 'bool', + 'number_of_elements': 'int', + 'empty': 'bool' + } + + attribute_map = { + 'content': 'content', + 'pageable': 'pageable', + 'total': 'total', + 'last': 'last', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages', + 'size': 'size', + 'number': 'number', + 'sort': 'sort', + 'first': 'first', + 'number_of_elements': 'numberOfElements', + 'empty': 'empty' + } + + def __init__(self, content=None, pageable=None, total=None, last=None, total_elements=None, total_pages=None, size=None, number=None, sort=None, first=None, number_of_elements=None, empty=None, local_vars_configuration=None): # noqa: E501 + """PageGroupProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._content = None + self._pageable = None + self._total = None + self._last = None + self._total_elements = None + self._total_pages = None + self._size = None + self._number = None + self._sort = None + self._first = None + self._number_of_elements = None + self._empty = None + self.discriminator = None + + if content is not None: + self.content = content + if pageable is not None: + self.pageable = pageable + if total is not None: + self.total = total + if last is not None: + self.last = last + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + if size is not None: + self.size = size + if number is not None: + self.number = number + if sort is not None: + self.sort = sort + if first is not None: + self.first = first + if number_of_elements is not None: + self.number_of_elements = number_of_elements + if empty is not None: + self.empty = empty + + @property + def content(self): + """Gets the content of this PageGroupProjection. # noqa: E501 + + + :return: The content of this PageGroupProjection. # noqa: E501 + :rtype: list[GroupProjection] + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this PageGroupProjection. + + + :param content: The content of this PageGroupProjection. # noqa: E501 + :type: list[GroupProjection] + """ + + self._content = content + + @property + def pageable(self): + """Gets the pageable of this PageGroupProjection. # noqa: E501 + + + :return: The pageable of this PageGroupProjection. # noqa: E501 + :rtype: PageableObject + """ + return self._pageable + + @pageable.setter + def pageable(self, pageable): + """Sets the pageable of this PageGroupProjection. + + + :param pageable: The pageable of this PageGroupProjection. # noqa: E501 + :type: PageableObject + """ + + self._pageable = pageable + + @property + def total(self): + """Gets the total of this PageGroupProjection. # noqa: E501 + + + :return: The total of this PageGroupProjection. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PageGroupProjection. + + + :param total: The total of this PageGroupProjection. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def last(self): + """Gets the last of this PageGroupProjection. # noqa: E501 + + + :return: The last of this PageGroupProjection. # noqa: E501 + :rtype: bool + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this PageGroupProjection. + + + :param last: The last of this PageGroupProjection. # noqa: E501 + :type: bool + """ + + self._last = last + + @property + def total_elements(self): + """Gets the total_elements of this PageGroupProjection. # noqa: E501 + + + :return: The total_elements of this PageGroupProjection. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageGroupProjection. + + + :param total_elements: The total_elements of this PageGroupProjection. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageGroupProjection. # noqa: E501 + + + :return: The total_pages of this PageGroupProjection. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageGroupProjection. + + + :param total_pages: The total_pages of this PageGroupProjection. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def size(self): + """Gets the size of this PageGroupProjection. # noqa: E501 + + + :return: The size of this PageGroupProjection. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this PageGroupProjection. + + + :param size: The size of this PageGroupProjection. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def number(self): + """Gets the number of this PageGroupProjection. # noqa: E501 + + + :return: The number of this PageGroupProjection. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this PageGroupProjection. + + + :param number: The number of this PageGroupProjection. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def sort(self): + """Gets the sort of this PageGroupProjection. # noqa: E501 + + + :return: The sort of this PageGroupProjection. # noqa: E501 + :rtype: Sort + """ + return self._sort + + @sort.setter + def sort(self, sort): + """Sets the sort of this PageGroupProjection. + + + :param sort: The sort of this PageGroupProjection. # noqa: E501 + :type: Sort + """ + + self._sort = sort + + @property + def first(self): + """Gets the first of this PageGroupProjection. # noqa: E501 + + + :return: The first of this PageGroupProjection. # noqa: E501 + :rtype: bool + """ + return self._first + + @first.setter + def first(self, first): + """Sets the first of this PageGroupProjection. + + + :param first: The first of this PageGroupProjection. # noqa: E501 + :type: bool + """ + + self._first = first + + @property + def number_of_elements(self): + """Gets the number_of_elements of this PageGroupProjection. # noqa: E501 + + + :return: The number_of_elements of this PageGroupProjection. # noqa: E501 + :rtype: int + """ + return self._number_of_elements + + @number_of_elements.setter + def number_of_elements(self, number_of_elements): + """Sets the number_of_elements of this PageGroupProjection. + + + :param number_of_elements: The number_of_elements of this PageGroupProjection. # noqa: E501 + :type: int + """ + + self._number_of_elements = number_of_elements + + @property + def empty(self): + """Gets the empty of this PageGroupProjection. # noqa: E501 + + + :return: The empty of this PageGroupProjection. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this PageGroupProjection. + + + :param empty: The empty of this PageGroupProjection. # noqa: E501 + :type: bool + """ + + self._empty = empty + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageGroupProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PageGroupProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/page_inbox_forwarder_dto.py b/mailslurp_client/models/page_inbox_forwarder_dto.py new file mode 100644 index 00000000..5a9e02de --- /dev/null +++ b/mailslurp_client/models/page_inbox_forwarder_dto.py @@ -0,0 +1,407 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PageInboxForwarderDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'content': 'list[InboxForwarderDto]', + 'pageable': 'PageableObject', + 'total': 'int', + 'last': 'bool', + 'total_elements': 'int', + 'total_pages': 'int', + 'size': 'int', + 'number': 'int', + 'sort': 'Sort', + 'first': 'bool', + 'number_of_elements': 'int', + 'empty': 'bool' + } + + attribute_map = { + 'content': 'content', + 'pageable': 'pageable', + 'total': 'total', + 'last': 'last', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages', + 'size': 'size', + 'number': 'number', + 'sort': 'sort', + 'first': 'first', + 'number_of_elements': 'numberOfElements', + 'empty': 'empty' + } + + def __init__(self, content=None, pageable=None, total=None, last=None, total_elements=None, total_pages=None, size=None, number=None, sort=None, first=None, number_of_elements=None, empty=None, local_vars_configuration=None): # noqa: E501 + """PageInboxForwarderDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._content = None + self._pageable = None + self._total = None + self._last = None + self._total_elements = None + self._total_pages = None + self._size = None + self._number = None + self._sort = None + self._first = None + self._number_of_elements = None + self._empty = None + self.discriminator = None + + if content is not None: + self.content = content + if pageable is not None: + self.pageable = pageable + if total is not None: + self.total = total + if last is not None: + self.last = last + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + if size is not None: + self.size = size + if number is not None: + self.number = number + if sort is not None: + self.sort = sort + if first is not None: + self.first = first + if number_of_elements is not None: + self.number_of_elements = number_of_elements + if empty is not None: + self.empty = empty + + @property + def content(self): + """Gets the content of this PageInboxForwarderDto. # noqa: E501 + + + :return: The content of this PageInboxForwarderDto. # noqa: E501 + :rtype: list[InboxForwarderDto] + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this PageInboxForwarderDto. + + + :param content: The content of this PageInboxForwarderDto. # noqa: E501 + :type: list[InboxForwarderDto] + """ + + self._content = content + + @property + def pageable(self): + """Gets the pageable of this PageInboxForwarderDto. # noqa: E501 + + + :return: The pageable of this PageInboxForwarderDto. # noqa: E501 + :rtype: PageableObject + """ + return self._pageable + + @pageable.setter + def pageable(self, pageable): + """Sets the pageable of this PageInboxForwarderDto. + + + :param pageable: The pageable of this PageInboxForwarderDto. # noqa: E501 + :type: PageableObject + """ + + self._pageable = pageable + + @property + def total(self): + """Gets the total of this PageInboxForwarderDto. # noqa: E501 + + + :return: The total of this PageInboxForwarderDto. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PageInboxForwarderDto. + + + :param total: The total of this PageInboxForwarderDto. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def last(self): + """Gets the last of this PageInboxForwarderDto. # noqa: E501 + + + :return: The last of this PageInboxForwarderDto. # noqa: E501 + :rtype: bool + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this PageInboxForwarderDto. + + + :param last: The last of this PageInboxForwarderDto. # noqa: E501 + :type: bool + """ + + self._last = last + + @property + def total_elements(self): + """Gets the total_elements of this PageInboxForwarderDto. # noqa: E501 + + + :return: The total_elements of this PageInboxForwarderDto. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageInboxForwarderDto. + + + :param total_elements: The total_elements of this PageInboxForwarderDto. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageInboxForwarderDto. # noqa: E501 + + + :return: The total_pages of this PageInboxForwarderDto. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageInboxForwarderDto. + + + :param total_pages: The total_pages of this PageInboxForwarderDto. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def size(self): + """Gets the size of this PageInboxForwarderDto. # noqa: E501 + + + :return: The size of this PageInboxForwarderDto. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this PageInboxForwarderDto. + + + :param size: The size of this PageInboxForwarderDto. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def number(self): + """Gets the number of this PageInboxForwarderDto. # noqa: E501 + + + :return: The number of this PageInboxForwarderDto. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this PageInboxForwarderDto. + + + :param number: The number of this PageInboxForwarderDto. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def sort(self): + """Gets the sort of this PageInboxForwarderDto. # noqa: E501 + + + :return: The sort of this PageInboxForwarderDto. # noqa: E501 + :rtype: Sort + """ + return self._sort + + @sort.setter + def sort(self, sort): + """Sets the sort of this PageInboxForwarderDto. + + + :param sort: The sort of this PageInboxForwarderDto. # noqa: E501 + :type: Sort + """ + + self._sort = sort + + @property + def first(self): + """Gets the first of this PageInboxForwarderDto. # noqa: E501 + + + :return: The first of this PageInboxForwarderDto. # noqa: E501 + :rtype: bool + """ + return self._first + + @first.setter + def first(self, first): + """Sets the first of this PageInboxForwarderDto. + + + :param first: The first of this PageInboxForwarderDto. # noqa: E501 + :type: bool + """ + + self._first = first + + @property + def number_of_elements(self): + """Gets the number_of_elements of this PageInboxForwarderDto. # noqa: E501 + + + :return: The number_of_elements of this PageInboxForwarderDto. # noqa: E501 + :rtype: int + """ + return self._number_of_elements + + @number_of_elements.setter + def number_of_elements(self, number_of_elements): + """Sets the number_of_elements of this PageInboxForwarderDto. + + + :param number_of_elements: The number_of_elements of this PageInboxForwarderDto. # noqa: E501 + :type: int + """ + + self._number_of_elements = number_of_elements + + @property + def empty(self): + """Gets the empty of this PageInboxForwarderDto. # noqa: E501 + + + :return: The empty of this PageInboxForwarderDto. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this PageInboxForwarderDto. + + + :param empty: The empty of this PageInboxForwarderDto. # noqa: E501 + :type: bool + """ + + self._empty = empty + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageInboxForwarderDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PageInboxForwarderDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/page_inbox_projection.py b/mailslurp_client/models/page_inbox_projection.py new file mode 100644 index 00000000..3f9cde4a --- /dev/null +++ b/mailslurp_client/models/page_inbox_projection.py @@ -0,0 +1,407 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PageInboxProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'content': 'list[InboxPreview]', + 'pageable': 'PageableObject', + 'total': 'int', + 'last': 'bool', + 'total_elements': 'int', + 'total_pages': 'int', + 'size': 'int', + 'number': 'int', + 'sort': 'Sort', + 'first': 'bool', + 'number_of_elements': 'int', + 'empty': 'bool' + } + + attribute_map = { + 'content': 'content', + 'pageable': 'pageable', + 'total': 'total', + 'last': 'last', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages', + 'size': 'size', + 'number': 'number', + 'sort': 'sort', + 'first': 'first', + 'number_of_elements': 'numberOfElements', + 'empty': 'empty' + } + + def __init__(self, content=None, pageable=None, total=None, last=None, total_elements=None, total_pages=None, size=None, number=None, sort=None, first=None, number_of_elements=None, empty=None, local_vars_configuration=None): # noqa: E501 + """PageInboxProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._content = None + self._pageable = None + self._total = None + self._last = None + self._total_elements = None + self._total_pages = None + self._size = None + self._number = None + self._sort = None + self._first = None + self._number_of_elements = None + self._empty = None + self.discriminator = None + + if content is not None: + self.content = content + if pageable is not None: + self.pageable = pageable + if total is not None: + self.total = total + if last is not None: + self.last = last + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + if size is not None: + self.size = size + if number is not None: + self.number = number + if sort is not None: + self.sort = sort + if first is not None: + self.first = first + if number_of_elements is not None: + self.number_of_elements = number_of_elements + if empty is not None: + self.empty = empty + + @property + def content(self): + """Gets the content of this PageInboxProjection. # noqa: E501 + + + :return: The content of this PageInboxProjection. # noqa: E501 + :rtype: list[InboxPreview] + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this PageInboxProjection. + + + :param content: The content of this PageInboxProjection. # noqa: E501 + :type: list[InboxPreview] + """ + + self._content = content + + @property + def pageable(self): + """Gets the pageable of this PageInboxProjection. # noqa: E501 + + + :return: The pageable of this PageInboxProjection. # noqa: E501 + :rtype: PageableObject + """ + return self._pageable + + @pageable.setter + def pageable(self, pageable): + """Sets the pageable of this PageInboxProjection. + + + :param pageable: The pageable of this PageInboxProjection. # noqa: E501 + :type: PageableObject + """ + + self._pageable = pageable + + @property + def total(self): + """Gets the total of this PageInboxProjection. # noqa: E501 + + + :return: The total of this PageInboxProjection. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PageInboxProjection. + + + :param total: The total of this PageInboxProjection. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def last(self): + """Gets the last of this PageInboxProjection. # noqa: E501 + + + :return: The last of this PageInboxProjection. # noqa: E501 + :rtype: bool + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this PageInboxProjection. + + + :param last: The last of this PageInboxProjection. # noqa: E501 + :type: bool + """ + + self._last = last + + @property + def total_elements(self): + """Gets the total_elements of this PageInboxProjection. # noqa: E501 + + + :return: The total_elements of this PageInboxProjection. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageInboxProjection. + + + :param total_elements: The total_elements of this PageInboxProjection. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageInboxProjection. # noqa: E501 + + + :return: The total_pages of this PageInboxProjection. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageInboxProjection. + + + :param total_pages: The total_pages of this PageInboxProjection. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def size(self): + """Gets the size of this PageInboxProjection. # noqa: E501 + + + :return: The size of this PageInboxProjection. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this PageInboxProjection. + + + :param size: The size of this PageInboxProjection. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def number(self): + """Gets the number of this PageInboxProjection. # noqa: E501 + + + :return: The number of this PageInboxProjection. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this PageInboxProjection. + + + :param number: The number of this PageInboxProjection. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def sort(self): + """Gets the sort of this PageInboxProjection. # noqa: E501 + + + :return: The sort of this PageInboxProjection. # noqa: E501 + :rtype: Sort + """ + return self._sort + + @sort.setter + def sort(self, sort): + """Sets the sort of this PageInboxProjection. + + + :param sort: The sort of this PageInboxProjection. # noqa: E501 + :type: Sort + """ + + self._sort = sort + + @property + def first(self): + """Gets the first of this PageInboxProjection. # noqa: E501 + + + :return: The first of this PageInboxProjection. # noqa: E501 + :rtype: bool + """ + return self._first + + @first.setter + def first(self, first): + """Sets the first of this PageInboxProjection. + + + :param first: The first of this PageInboxProjection. # noqa: E501 + :type: bool + """ + + self._first = first + + @property + def number_of_elements(self): + """Gets the number_of_elements of this PageInboxProjection. # noqa: E501 + + + :return: The number_of_elements of this PageInboxProjection. # noqa: E501 + :rtype: int + """ + return self._number_of_elements + + @number_of_elements.setter + def number_of_elements(self, number_of_elements): + """Sets the number_of_elements of this PageInboxProjection. + + + :param number_of_elements: The number_of_elements of this PageInboxProjection. # noqa: E501 + :type: int + """ + + self._number_of_elements = number_of_elements + + @property + def empty(self): + """Gets the empty of this PageInboxProjection. # noqa: E501 + + + :return: The empty of this PageInboxProjection. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this PageInboxProjection. + + + :param empty: The empty of this PageInboxProjection. # noqa: E501 + :type: bool + """ + + self._empty = empty + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageInboxProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PageInboxProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/page_inbox_ruleset_dto.py b/mailslurp_client/models/page_inbox_ruleset_dto.py new file mode 100644 index 00000000..1c1c1229 --- /dev/null +++ b/mailslurp_client/models/page_inbox_ruleset_dto.py @@ -0,0 +1,407 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PageInboxRulesetDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'content': 'list[InboxRulesetDto]', + 'pageable': 'PageableObject', + 'total': 'int', + 'last': 'bool', + 'total_elements': 'int', + 'total_pages': 'int', + 'size': 'int', + 'number': 'int', + 'sort': 'Sort', + 'first': 'bool', + 'number_of_elements': 'int', + 'empty': 'bool' + } + + attribute_map = { + 'content': 'content', + 'pageable': 'pageable', + 'total': 'total', + 'last': 'last', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages', + 'size': 'size', + 'number': 'number', + 'sort': 'sort', + 'first': 'first', + 'number_of_elements': 'numberOfElements', + 'empty': 'empty' + } + + def __init__(self, content=None, pageable=None, total=None, last=None, total_elements=None, total_pages=None, size=None, number=None, sort=None, first=None, number_of_elements=None, empty=None, local_vars_configuration=None): # noqa: E501 + """PageInboxRulesetDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._content = None + self._pageable = None + self._total = None + self._last = None + self._total_elements = None + self._total_pages = None + self._size = None + self._number = None + self._sort = None + self._first = None + self._number_of_elements = None + self._empty = None + self.discriminator = None + + if content is not None: + self.content = content + if pageable is not None: + self.pageable = pageable + if total is not None: + self.total = total + if last is not None: + self.last = last + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + if size is not None: + self.size = size + if number is not None: + self.number = number + if sort is not None: + self.sort = sort + if first is not None: + self.first = first + if number_of_elements is not None: + self.number_of_elements = number_of_elements + if empty is not None: + self.empty = empty + + @property + def content(self): + """Gets the content of this PageInboxRulesetDto. # noqa: E501 + + + :return: The content of this PageInboxRulesetDto. # noqa: E501 + :rtype: list[InboxRulesetDto] + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this PageInboxRulesetDto. + + + :param content: The content of this PageInboxRulesetDto. # noqa: E501 + :type: list[InboxRulesetDto] + """ + + self._content = content + + @property + def pageable(self): + """Gets the pageable of this PageInboxRulesetDto. # noqa: E501 + + + :return: The pageable of this PageInboxRulesetDto. # noqa: E501 + :rtype: PageableObject + """ + return self._pageable + + @pageable.setter + def pageable(self, pageable): + """Sets the pageable of this PageInboxRulesetDto. + + + :param pageable: The pageable of this PageInboxRulesetDto. # noqa: E501 + :type: PageableObject + """ + + self._pageable = pageable + + @property + def total(self): + """Gets the total of this PageInboxRulesetDto. # noqa: E501 + + + :return: The total of this PageInboxRulesetDto. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PageInboxRulesetDto. + + + :param total: The total of this PageInboxRulesetDto. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def last(self): + """Gets the last of this PageInboxRulesetDto. # noqa: E501 + + + :return: The last of this PageInboxRulesetDto. # noqa: E501 + :rtype: bool + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this PageInboxRulesetDto. + + + :param last: The last of this PageInboxRulesetDto. # noqa: E501 + :type: bool + """ + + self._last = last + + @property + def total_elements(self): + """Gets the total_elements of this PageInboxRulesetDto. # noqa: E501 + + + :return: The total_elements of this PageInboxRulesetDto. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageInboxRulesetDto. + + + :param total_elements: The total_elements of this PageInboxRulesetDto. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageInboxRulesetDto. # noqa: E501 + + + :return: The total_pages of this PageInboxRulesetDto. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageInboxRulesetDto. + + + :param total_pages: The total_pages of this PageInboxRulesetDto. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def size(self): + """Gets the size of this PageInboxRulesetDto. # noqa: E501 + + + :return: The size of this PageInboxRulesetDto. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this PageInboxRulesetDto. + + + :param size: The size of this PageInboxRulesetDto. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def number(self): + """Gets the number of this PageInboxRulesetDto. # noqa: E501 + + + :return: The number of this PageInboxRulesetDto. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this PageInboxRulesetDto. + + + :param number: The number of this PageInboxRulesetDto. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def sort(self): + """Gets the sort of this PageInboxRulesetDto. # noqa: E501 + + + :return: The sort of this PageInboxRulesetDto. # noqa: E501 + :rtype: Sort + """ + return self._sort + + @sort.setter + def sort(self, sort): + """Sets the sort of this PageInboxRulesetDto. + + + :param sort: The sort of this PageInboxRulesetDto. # noqa: E501 + :type: Sort + """ + + self._sort = sort + + @property + def first(self): + """Gets the first of this PageInboxRulesetDto. # noqa: E501 + + + :return: The first of this PageInboxRulesetDto. # noqa: E501 + :rtype: bool + """ + return self._first + + @first.setter + def first(self, first): + """Sets the first of this PageInboxRulesetDto. + + + :param first: The first of this PageInboxRulesetDto. # noqa: E501 + :type: bool + """ + + self._first = first + + @property + def number_of_elements(self): + """Gets the number_of_elements of this PageInboxRulesetDto. # noqa: E501 + + + :return: The number_of_elements of this PageInboxRulesetDto. # noqa: E501 + :rtype: int + """ + return self._number_of_elements + + @number_of_elements.setter + def number_of_elements(self, number_of_elements): + """Sets the number_of_elements of this PageInboxRulesetDto. + + + :param number_of_elements: The number_of_elements of this PageInboxRulesetDto. # noqa: E501 + :type: int + """ + + self._number_of_elements = number_of_elements + + @property + def empty(self): + """Gets the empty of this PageInboxRulesetDto. # noqa: E501 + + + :return: The empty of this PageInboxRulesetDto. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this PageInboxRulesetDto. + + + :param empty: The empty of this PageInboxRulesetDto. # noqa: E501 + :type: bool + """ + + self._empty = empty + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageInboxRulesetDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PageInboxRulesetDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/page_missed_email_projection.py b/mailslurp_client/models/page_missed_email_projection.py new file mode 100644 index 00000000..cd028310 --- /dev/null +++ b/mailslurp_client/models/page_missed_email_projection.py @@ -0,0 +1,407 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PageMissedEmailProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'content': 'list[MissedEmailProjection]', + 'pageable': 'PageableObject', + 'total': 'int', + 'last': 'bool', + 'total_elements': 'int', + 'total_pages': 'int', + 'size': 'int', + 'number': 'int', + 'sort': 'Sort', + 'first': 'bool', + 'number_of_elements': 'int', + 'empty': 'bool' + } + + attribute_map = { + 'content': 'content', + 'pageable': 'pageable', + 'total': 'total', + 'last': 'last', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages', + 'size': 'size', + 'number': 'number', + 'sort': 'sort', + 'first': 'first', + 'number_of_elements': 'numberOfElements', + 'empty': 'empty' + } + + def __init__(self, content=None, pageable=None, total=None, last=None, total_elements=None, total_pages=None, size=None, number=None, sort=None, first=None, number_of_elements=None, empty=None, local_vars_configuration=None): # noqa: E501 + """PageMissedEmailProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._content = None + self._pageable = None + self._total = None + self._last = None + self._total_elements = None + self._total_pages = None + self._size = None + self._number = None + self._sort = None + self._first = None + self._number_of_elements = None + self._empty = None + self.discriminator = None + + if content is not None: + self.content = content + if pageable is not None: + self.pageable = pageable + if total is not None: + self.total = total + if last is not None: + self.last = last + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + if size is not None: + self.size = size + if number is not None: + self.number = number + if sort is not None: + self.sort = sort + if first is not None: + self.first = first + if number_of_elements is not None: + self.number_of_elements = number_of_elements + if empty is not None: + self.empty = empty + + @property + def content(self): + """Gets the content of this PageMissedEmailProjection. # noqa: E501 + + + :return: The content of this PageMissedEmailProjection. # noqa: E501 + :rtype: list[MissedEmailProjection] + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this PageMissedEmailProjection. + + + :param content: The content of this PageMissedEmailProjection. # noqa: E501 + :type: list[MissedEmailProjection] + """ + + self._content = content + + @property + def pageable(self): + """Gets the pageable of this PageMissedEmailProjection. # noqa: E501 + + + :return: The pageable of this PageMissedEmailProjection. # noqa: E501 + :rtype: PageableObject + """ + return self._pageable + + @pageable.setter + def pageable(self, pageable): + """Sets the pageable of this PageMissedEmailProjection. + + + :param pageable: The pageable of this PageMissedEmailProjection. # noqa: E501 + :type: PageableObject + """ + + self._pageable = pageable + + @property + def total(self): + """Gets the total of this PageMissedEmailProjection. # noqa: E501 + + + :return: The total of this PageMissedEmailProjection. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PageMissedEmailProjection. + + + :param total: The total of this PageMissedEmailProjection. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def last(self): + """Gets the last of this PageMissedEmailProjection. # noqa: E501 + + + :return: The last of this PageMissedEmailProjection. # noqa: E501 + :rtype: bool + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this PageMissedEmailProjection. + + + :param last: The last of this PageMissedEmailProjection. # noqa: E501 + :type: bool + """ + + self._last = last + + @property + def total_elements(self): + """Gets the total_elements of this PageMissedEmailProjection. # noqa: E501 + + + :return: The total_elements of this PageMissedEmailProjection. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageMissedEmailProjection. + + + :param total_elements: The total_elements of this PageMissedEmailProjection. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageMissedEmailProjection. # noqa: E501 + + + :return: The total_pages of this PageMissedEmailProjection. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageMissedEmailProjection. + + + :param total_pages: The total_pages of this PageMissedEmailProjection. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def size(self): + """Gets the size of this PageMissedEmailProjection. # noqa: E501 + + + :return: The size of this PageMissedEmailProjection. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this PageMissedEmailProjection. + + + :param size: The size of this PageMissedEmailProjection. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def number(self): + """Gets the number of this PageMissedEmailProjection. # noqa: E501 + + + :return: The number of this PageMissedEmailProjection. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this PageMissedEmailProjection. + + + :param number: The number of this PageMissedEmailProjection. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def sort(self): + """Gets the sort of this PageMissedEmailProjection. # noqa: E501 + + + :return: The sort of this PageMissedEmailProjection. # noqa: E501 + :rtype: Sort + """ + return self._sort + + @sort.setter + def sort(self, sort): + """Sets the sort of this PageMissedEmailProjection. + + + :param sort: The sort of this PageMissedEmailProjection. # noqa: E501 + :type: Sort + """ + + self._sort = sort + + @property + def first(self): + """Gets the first of this PageMissedEmailProjection. # noqa: E501 + + + :return: The first of this PageMissedEmailProjection. # noqa: E501 + :rtype: bool + """ + return self._first + + @first.setter + def first(self, first): + """Sets the first of this PageMissedEmailProjection. + + + :param first: The first of this PageMissedEmailProjection. # noqa: E501 + :type: bool + """ + + self._first = first + + @property + def number_of_elements(self): + """Gets the number_of_elements of this PageMissedEmailProjection. # noqa: E501 + + + :return: The number_of_elements of this PageMissedEmailProjection. # noqa: E501 + :rtype: int + """ + return self._number_of_elements + + @number_of_elements.setter + def number_of_elements(self, number_of_elements): + """Sets the number_of_elements of this PageMissedEmailProjection. + + + :param number_of_elements: The number_of_elements of this PageMissedEmailProjection. # noqa: E501 + :type: int + """ + + self._number_of_elements = number_of_elements + + @property + def empty(self): + """Gets the empty of this PageMissedEmailProjection. # noqa: E501 + + + :return: The empty of this PageMissedEmailProjection. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this PageMissedEmailProjection. + + + :param empty: The empty of this PageMissedEmailProjection. # noqa: E501 + :type: bool + """ + + self._empty = empty + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageMissedEmailProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PageMissedEmailProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/page_organization_inbox_projection.py b/mailslurp_client/models/page_organization_inbox_projection.py new file mode 100644 index 00000000..f074a67a --- /dev/null +++ b/mailslurp_client/models/page_organization_inbox_projection.py @@ -0,0 +1,407 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PageOrganizationInboxProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'content': 'list[OrganizationInboxProjection]', + 'pageable': 'PageableObject', + 'total': 'int', + 'last': 'bool', + 'total_elements': 'int', + 'total_pages': 'int', + 'size': 'int', + 'number': 'int', + 'sort': 'Sort', + 'first': 'bool', + 'number_of_elements': 'int', + 'empty': 'bool' + } + + attribute_map = { + 'content': 'content', + 'pageable': 'pageable', + 'total': 'total', + 'last': 'last', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages', + 'size': 'size', + 'number': 'number', + 'sort': 'sort', + 'first': 'first', + 'number_of_elements': 'numberOfElements', + 'empty': 'empty' + } + + def __init__(self, content=None, pageable=None, total=None, last=None, total_elements=None, total_pages=None, size=None, number=None, sort=None, first=None, number_of_elements=None, empty=None, local_vars_configuration=None): # noqa: E501 + """PageOrganizationInboxProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._content = None + self._pageable = None + self._total = None + self._last = None + self._total_elements = None + self._total_pages = None + self._size = None + self._number = None + self._sort = None + self._first = None + self._number_of_elements = None + self._empty = None + self.discriminator = None + + if content is not None: + self.content = content + if pageable is not None: + self.pageable = pageable + if total is not None: + self.total = total + if last is not None: + self.last = last + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + if size is not None: + self.size = size + if number is not None: + self.number = number + if sort is not None: + self.sort = sort + if first is not None: + self.first = first + if number_of_elements is not None: + self.number_of_elements = number_of_elements + if empty is not None: + self.empty = empty + + @property + def content(self): + """Gets the content of this PageOrganizationInboxProjection. # noqa: E501 + + + :return: The content of this PageOrganizationInboxProjection. # noqa: E501 + :rtype: list[OrganizationInboxProjection] + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this PageOrganizationInboxProjection. + + + :param content: The content of this PageOrganizationInboxProjection. # noqa: E501 + :type: list[OrganizationInboxProjection] + """ + + self._content = content + + @property + def pageable(self): + """Gets the pageable of this PageOrganizationInboxProjection. # noqa: E501 + + + :return: The pageable of this PageOrganizationInboxProjection. # noqa: E501 + :rtype: PageableObject + """ + return self._pageable + + @pageable.setter + def pageable(self, pageable): + """Sets the pageable of this PageOrganizationInboxProjection. + + + :param pageable: The pageable of this PageOrganizationInboxProjection. # noqa: E501 + :type: PageableObject + """ + + self._pageable = pageable + + @property + def total(self): + """Gets the total of this PageOrganizationInboxProjection. # noqa: E501 + + + :return: The total of this PageOrganizationInboxProjection. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PageOrganizationInboxProjection. + + + :param total: The total of this PageOrganizationInboxProjection. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def last(self): + """Gets the last of this PageOrganizationInboxProjection. # noqa: E501 + + + :return: The last of this PageOrganizationInboxProjection. # noqa: E501 + :rtype: bool + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this PageOrganizationInboxProjection. + + + :param last: The last of this PageOrganizationInboxProjection. # noqa: E501 + :type: bool + """ + + self._last = last + + @property + def total_elements(self): + """Gets the total_elements of this PageOrganizationInboxProjection. # noqa: E501 + + + :return: The total_elements of this PageOrganizationInboxProjection. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageOrganizationInboxProjection. + + + :param total_elements: The total_elements of this PageOrganizationInboxProjection. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageOrganizationInboxProjection. # noqa: E501 + + + :return: The total_pages of this PageOrganizationInboxProjection. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageOrganizationInboxProjection. + + + :param total_pages: The total_pages of this PageOrganizationInboxProjection. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def size(self): + """Gets the size of this PageOrganizationInboxProjection. # noqa: E501 + + + :return: The size of this PageOrganizationInboxProjection. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this PageOrganizationInboxProjection. + + + :param size: The size of this PageOrganizationInboxProjection. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def number(self): + """Gets the number of this PageOrganizationInboxProjection. # noqa: E501 + + + :return: The number of this PageOrganizationInboxProjection. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this PageOrganizationInboxProjection. + + + :param number: The number of this PageOrganizationInboxProjection. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def sort(self): + """Gets the sort of this PageOrganizationInboxProjection. # noqa: E501 + + + :return: The sort of this PageOrganizationInboxProjection. # noqa: E501 + :rtype: Sort + """ + return self._sort + + @sort.setter + def sort(self, sort): + """Sets the sort of this PageOrganizationInboxProjection. + + + :param sort: The sort of this PageOrganizationInboxProjection. # noqa: E501 + :type: Sort + """ + + self._sort = sort + + @property + def first(self): + """Gets the first of this PageOrganizationInboxProjection. # noqa: E501 + + + :return: The first of this PageOrganizationInboxProjection. # noqa: E501 + :rtype: bool + """ + return self._first + + @first.setter + def first(self, first): + """Sets the first of this PageOrganizationInboxProjection. + + + :param first: The first of this PageOrganizationInboxProjection. # noqa: E501 + :type: bool + """ + + self._first = first + + @property + def number_of_elements(self): + """Gets the number_of_elements of this PageOrganizationInboxProjection. # noqa: E501 + + + :return: The number_of_elements of this PageOrganizationInboxProjection. # noqa: E501 + :rtype: int + """ + return self._number_of_elements + + @number_of_elements.setter + def number_of_elements(self, number_of_elements): + """Sets the number_of_elements of this PageOrganizationInboxProjection. + + + :param number_of_elements: The number_of_elements of this PageOrganizationInboxProjection. # noqa: E501 + :type: int + """ + + self._number_of_elements = number_of_elements + + @property + def empty(self): + """Gets the empty of this PageOrganizationInboxProjection. # noqa: E501 + + + :return: The empty of this PageOrganizationInboxProjection. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this PageOrganizationInboxProjection. + + + :param empty: The empty of this PageOrganizationInboxProjection. # noqa: E501 + :type: bool + """ + + self._empty = empty + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageOrganizationInboxProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PageOrganizationInboxProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/page_phone_number_projection.py b/mailslurp_client/models/page_phone_number_projection.py new file mode 100644 index 00000000..65298933 --- /dev/null +++ b/mailslurp_client/models/page_phone_number_projection.py @@ -0,0 +1,407 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PagePhoneNumberProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'content': 'list[PhoneNumberProjection]', + 'pageable': 'PageableObject', + 'total': 'int', + 'last': 'bool', + 'total_elements': 'int', + 'total_pages': 'int', + 'size': 'int', + 'number': 'int', + 'sort': 'Sort', + 'first': 'bool', + 'number_of_elements': 'int', + 'empty': 'bool' + } + + attribute_map = { + 'content': 'content', + 'pageable': 'pageable', + 'total': 'total', + 'last': 'last', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages', + 'size': 'size', + 'number': 'number', + 'sort': 'sort', + 'first': 'first', + 'number_of_elements': 'numberOfElements', + 'empty': 'empty' + } + + def __init__(self, content=None, pageable=None, total=None, last=None, total_elements=None, total_pages=None, size=None, number=None, sort=None, first=None, number_of_elements=None, empty=None, local_vars_configuration=None): # noqa: E501 + """PagePhoneNumberProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._content = None + self._pageable = None + self._total = None + self._last = None + self._total_elements = None + self._total_pages = None + self._size = None + self._number = None + self._sort = None + self._first = None + self._number_of_elements = None + self._empty = None + self.discriminator = None + + if content is not None: + self.content = content + if pageable is not None: + self.pageable = pageable + if total is not None: + self.total = total + if last is not None: + self.last = last + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + if size is not None: + self.size = size + if number is not None: + self.number = number + if sort is not None: + self.sort = sort + if first is not None: + self.first = first + if number_of_elements is not None: + self.number_of_elements = number_of_elements + if empty is not None: + self.empty = empty + + @property + def content(self): + """Gets the content of this PagePhoneNumberProjection. # noqa: E501 + + + :return: The content of this PagePhoneNumberProjection. # noqa: E501 + :rtype: list[PhoneNumberProjection] + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this PagePhoneNumberProjection. + + + :param content: The content of this PagePhoneNumberProjection. # noqa: E501 + :type: list[PhoneNumberProjection] + """ + + self._content = content + + @property + def pageable(self): + """Gets the pageable of this PagePhoneNumberProjection. # noqa: E501 + + + :return: The pageable of this PagePhoneNumberProjection. # noqa: E501 + :rtype: PageableObject + """ + return self._pageable + + @pageable.setter + def pageable(self, pageable): + """Sets the pageable of this PagePhoneNumberProjection. + + + :param pageable: The pageable of this PagePhoneNumberProjection. # noqa: E501 + :type: PageableObject + """ + + self._pageable = pageable + + @property + def total(self): + """Gets the total of this PagePhoneNumberProjection. # noqa: E501 + + + :return: The total of this PagePhoneNumberProjection. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PagePhoneNumberProjection. + + + :param total: The total of this PagePhoneNumberProjection. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def last(self): + """Gets the last of this PagePhoneNumberProjection. # noqa: E501 + + + :return: The last of this PagePhoneNumberProjection. # noqa: E501 + :rtype: bool + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this PagePhoneNumberProjection. + + + :param last: The last of this PagePhoneNumberProjection. # noqa: E501 + :type: bool + """ + + self._last = last + + @property + def total_elements(self): + """Gets the total_elements of this PagePhoneNumberProjection. # noqa: E501 + + + :return: The total_elements of this PagePhoneNumberProjection. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PagePhoneNumberProjection. + + + :param total_elements: The total_elements of this PagePhoneNumberProjection. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PagePhoneNumberProjection. # noqa: E501 + + + :return: The total_pages of this PagePhoneNumberProjection. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PagePhoneNumberProjection. + + + :param total_pages: The total_pages of this PagePhoneNumberProjection. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def size(self): + """Gets the size of this PagePhoneNumberProjection. # noqa: E501 + + + :return: The size of this PagePhoneNumberProjection. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this PagePhoneNumberProjection. + + + :param size: The size of this PagePhoneNumberProjection. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def number(self): + """Gets the number of this PagePhoneNumberProjection. # noqa: E501 + + + :return: The number of this PagePhoneNumberProjection. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this PagePhoneNumberProjection. + + + :param number: The number of this PagePhoneNumberProjection. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def sort(self): + """Gets the sort of this PagePhoneNumberProjection. # noqa: E501 + + + :return: The sort of this PagePhoneNumberProjection. # noqa: E501 + :rtype: Sort + """ + return self._sort + + @sort.setter + def sort(self, sort): + """Sets the sort of this PagePhoneNumberProjection. + + + :param sort: The sort of this PagePhoneNumberProjection. # noqa: E501 + :type: Sort + """ + + self._sort = sort + + @property + def first(self): + """Gets the first of this PagePhoneNumberProjection. # noqa: E501 + + + :return: The first of this PagePhoneNumberProjection. # noqa: E501 + :rtype: bool + """ + return self._first + + @first.setter + def first(self, first): + """Sets the first of this PagePhoneNumberProjection. + + + :param first: The first of this PagePhoneNumberProjection. # noqa: E501 + :type: bool + """ + + self._first = first + + @property + def number_of_elements(self): + """Gets the number_of_elements of this PagePhoneNumberProjection. # noqa: E501 + + + :return: The number_of_elements of this PagePhoneNumberProjection. # noqa: E501 + :rtype: int + """ + return self._number_of_elements + + @number_of_elements.setter + def number_of_elements(self, number_of_elements): + """Sets the number_of_elements of this PagePhoneNumberProjection. + + + :param number_of_elements: The number_of_elements of this PagePhoneNumberProjection. # noqa: E501 + :type: int + """ + + self._number_of_elements = number_of_elements + + @property + def empty(self): + """Gets the empty of this PagePhoneNumberProjection. # noqa: E501 + + + :return: The empty of this PagePhoneNumberProjection. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this PagePhoneNumberProjection. + + + :param empty: The empty of this PagePhoneNumberProjection. # noqa: E501 + :type: bool + """ + + self._empty = empty + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PagePhoneNumberProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PagePhoneNumberProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/page_sent_email_projection.py b/mailslurp_client/models/page_sent_email_projection.py new file mode 100644 index 00000000..373d075c --- /dev/null +++ b/mailslurp_client/models/page_sent_email_projection.py @@ -0,0 +1,425 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PageSentEmailProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'content': 'list[SentEmailProjection]', + 'pageable': 'PageableObject', + 'total': 'int', + 'size': 'int', + 'number': 'int', + 'number_of_elements': 'int', + 'total_elements': 'int', + 'total_pages': 'int', + 'last': 'bool', + 'sort': 'Sort', + 'first': 'bool', + 'empty': 'bool' + } + + attribute_map = { + 'content': 'content', + 'pageable': 'pageable', + 'total': 'total', + 'size': 'size', + 'number': 'number', + 'number_of_elements': 'numberOfElements', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages', + 'last': 'last', + 'sort': 'sort', + 'first': 'first', + 'empty': 'empty' + } + + def __init__(self, content=None, pageable=None, total=None, size=None, number=None, number_of_elements=None, total_elements=None, total_pages=None, last=None, sort=None, first=None, empty=None, local_vars_configuration=None): # noqa: E501 + """PageSentEmailProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._content = None + self._pageable = None + self._total = None + self._size = None + self._number = None + self._number_of_elements = None + self._total_elements = None + self._total_pages = None + self._last = None + self._sort = None + self._first = None + self._empty = None + self.discriminator = None + + self.content = content + if pageable is not None: + self.pageable = pageable + if total is not None: + self.total = total + self.size = size + self.number = number + self.number_of_elements = number_of_elements + self.total_elements = total_elements + self.total_pages = total_pages + if last is not None: + self.last = last + if sort is not None: + self.sort = sort + if first is not None: + self.first = first + if empty is not None: + self.empty = empty + + @property + def content(self): + """Gets the content of this PageSentEmailProjection. # noqa: E501 + + Collection of items # noqa: E501 + + :return: The content of this PageSentEmailProjection. # noqa: E501 + :rtype: list[SentEmailProjection] + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this PageSentEmailProjection. + + Collection of items # noqa: E501 + + :param content: The content of this PageSentEmailProjection. # noqa: E501 + :type: list[SentEmailProjection] + """ + if self.local_vars_configuration.client_side_validation and content is None: # noqa: E501 + raise ValueError("Invalid value for `content`, must not be `None`") # noqa: E501 + + self._content = content + + @property + def pageable(self): + """Gets the pageable of this PageSentEmailProjection. # noqa: E501 + + + :return: The pageable of this PageSentEmailProjection. # noqa: E501 + :rtype: PageableObject + """ + return self._pageable + + @pageable.setter + def pageable(self, pageable): + """Sets the pageable of this PageSentEmailProjection. + + + :param pageable: The pageable of this PageSentEmailProjection. # noqa: E501 + :type: PageableObject + """ + + self._pageable = pageable + + @property + def total(self): + """Gets the total of this PageSentEmailProjection. # noqa: E501 + + + :return: The total of this PageSentEmailProjection. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PageSentEmailProjection. + + + :param total: The total of this PageSentEmailProjection. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def size(self): + """Gets the size of this PageSentEmailProjection. # noqa: E501 + + Size of page requested # noqa: E501 + + :return: The size of this PageSentEmailProjection. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this PageSentEmailProjection. + + Size of page requested # noqa: E501 + + :param size: The size of this PageSentEmailProjection. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and size is None: # noqa: E501 + raise ValueError("Invalid value for `size`, must not be `None`") # noqa: E501 + + self._size = size + + @property + def number(self): + """Gets the number of this PageSentEmailProjection. # noqa: E501 + + Page number starting at 0 # noqa: E501 + + :return: The number of this PageSentEmailProjection. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this PageSentEmailProjection. + + Page number starting at 0 # noqa: E501 + + :param number: The number of this PageSentEmailProjection. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and number is None: # noqa: E501 + raise ValueError("Invalid value for `number`, must not be `None`") # noqa: E501 + + self._number = number + + @property + def number_of_elements(self): + """Gets the number_of_elements of this PageSentEmailProjection. # noqa: E501 + + Number of items returned # noqa: E501 + + :return: The number_of_elements of this PageSentEmailProjection. # noqa: E501 + :rtype: int + """ + return self._number_of_elements + + @number_of_elements.setter + def number_of_elements(self, number_of_elements): + """Sets the number_of_elements of this PageSentEmailProjection. + + Number of items returned # noqa: E501 + + :param number_of_elements: The number_of_elements of this PageSentEmailProjection. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and number_of_elements is None: # noqa: E501 + raise ValueError("Invalid value for `number_of_elements`, must not be `None`") # noqa: E501 + + self._number_of_elements = number_of_elements + + @property + def total_elements(self): + """Gets the total_elements of this PageSentEmailProjection. # noqa: E501 + + Total number of items available for querying # noqa: E501 + + :return: The total_elements of this PageSentEmailProjection. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageSentEmailProjection. + + Total number of items available for querying # noqa: E501 + + :param total_elements: The total_elements of this PageSentEmailProjection. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and total_elements is None: # noqa: E501 + raise ValueError("Invalid value for `total_elements`, must not be `None`") # noqa: E501 + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageSentEmailProjection. # noqa: E501 + + Total number of pages available # noqa: E501 + + :return: The total_pages of this PageSentEmailProjection. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageSentEmailProjection. + + Total number of pages available # noqa: E501 + + :param total_pages: The total_pages of this PageSentEmailProjection. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and total_pages is None: # noqa: E501 + raise ValueError("Invalid value for `total_pages`, must not be `None`") # noqa: E501 + + self._total_pages = total_pages + + @property + def last(self): + """Gets the last of this PageSentEmailProjection. # noqa: E501 + + + :return: The last of this PageSentEmailProjection. # noqa: E501 + :rtype: bool + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this PageSentEmailProjection. + + + :param last: The last of this PageSentEmailProjection. # noqa: E501 + :type: bool + """ + + self._last = last + + @property + def sort(self): + """Gets the sort of this PageSentEmailProjection. # noqa: E501 + + + :return: The sort of this PageSentEmailProjection. # noqa: E501 + :rtype: Sort + """ + return self._sort + + @sort.setter + def sort(self, sort): + """Sets the sort of this PageSentEmailProjection. + + + :param sort: The sort of this PageSentEmailProjection. # noqa: E501 + :type: Sort + """ + + self._sort = sort + + @property + def first(self): + """Gets the first of this PageSentEmailProjection. # noqa: E501 + + + :return: The first of this PageSentEmailProjection. # noqa: E501 + :rtype: bool + """ + return self._first + + @first.setter + def first(self, first): + """Sets the first of this PageSentEmailProjection. + + + :param first: The first of this PageSentEmailProjection. # noqa: E501 + :type: bool + """ + + self._first = first + + @property + def empty(self): + """Gets the empty of this PageSentEmailProjection. # noqa: E501 + + + :return: The empty of this PageSentEmailProjection. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this PageSentEmailProjection. + + + :param empty: The empty of this PageSentEmailProjection. # noqa: E501 + :type: bool + """ + + self._empty = empty + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageSentEmailProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PageSentEmailProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/page_sent_email_with_queue_projection.py b/mailslurp_client/models/page_sent_email_with_queue_projection.py new file mode 100644 index 00000000..b9b28a84 --- /dev/null +++ b/mailslurp_client/models/page_sent_email_with_queue_projection.py @@ -0,0 +1,425 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PageSentEmailWithQueueProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'content': 'list[SendWithQueueResult]', + 'pageable': 'PageableObject', + 'total': 'int', + 'size': 'int', + 'number': 'int', + 'number_of_elements': 'int', + 'total_elements': 'int', + 'total_pages': 'int', + 'last': 'bool', + 'sort': 'Sort', + 'first': 'bool', + 'empty': 'bool' + } + + attribute_map = { + 'content': 'content', + 'pageable': 'pageable', + 'total': 'total', + 'size': 'size', + 'number': 'number', + 'number_of_elements': 'numberOfElements', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages', + 'last': 'last', + 'sort': 'sort', + 'first': 'first', + 'empty': 'empty' + } + + def __init__(self, content=None, pageable=None, total=None, size=None, number=None, number_of_elements=None, total_elements=None, total_pages=None, last=None, sort=None, first=None, empty=None, local_vars_configuration=None): # noqa: E501 + """PageSentEmailWithQueueProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._content = None + self._pageable = None + self._total = None + self._size = None + self._number = None + self._number_of_elements = None + self._total_elements = None + self._total_pages = None + self._last = None + self._sort = None + self._first = None + self._empty = None + self.discriminator = None + + self.content = content + if pageable is not None: + self.pageable = pageable + if total is not None: + self.total = total + self.size = size + self.number = number + self.number_of_elements = number_of_elements + self.total_elements = total_elements + self.total_pages = total_pages + if last is not None: + self.last = last + if sort is not None: + self.sort = sort + if first is not None: + self.first = first + if empty is not None: + self.empty = empty + + @property + def content(self): + """Gets the content of this PageSentEmailWithQueueProjection. # noqa: E501 + + Collection of items # noqa: E501 + + :return: The content of this PageSentEmailWithQueueProjection. # noqa: E501 + :rtype: list[SendWithQueueResult] + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this PageSentEmailWithQueueProjection. + + Collection of items # noqa: E501 + + :param content: The content of this PageSentEmailWithQueueProjection. # noqa: E501 + :type: list[SendWithQueueResult] + """ + if self.local_vars_configuration.client_side_validation and content is None: # noqa: E501 + raise ValueError("Invalid value for `content`, must not be `None`") # noqa: E501 + + self._content = content + + @property + def pageable(self): + """Gets the pageable of this PageSentEmailWithQueueProjection. # noqa: E501 + + + :return: The pageable of this PageSentEmailWithQueueProjection. # noqa: E501 + :rtype: PageableObject + """ + return self._pageable + + @pageable.setter + def pageable(self, pageable): + """Sets the pageable of this PageSentEmailWithQueueProjection. + + + :param pageable: The pageable of this PageSentEmailWithQueueProjection. # noqa: E501 + :type: PageableObject + """ + + self._pageable = pageable + + @property + def total(self): + """Gets the total of this PageSentEmailWithQueueProjection. # noqa: E501 + + + :return: The total of this PageSentEmailWithQueueProjection. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PageSentEmailWithQueueProjection. + + + :param total: The total of this PageSentEmailWithQueueProjection. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def size(self): + """Gets the size of this PageSentEmailWithQueueProjection. # noqa: E501 + + Size of page requested # noqa: E501 + + :return: The size of this PageSentEmailWithQueueProjection. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this PageSentEmailWithQueueProjection. + + Size of page requested # noqa: E501 + + :param size: The size of this PageSentEmailWithQueueProjection. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and size is None: # noqa: E501 + raise ValueError("Invalid value for `size`, must not be `None`") # noqa: E501 + + self._size = size + + @property + def number(self): + """Gets the number of this PageSentEmailWithQueueProjection. # noqa: E501 + + Page number starting at 0 # noqa: E501 + + :return: The number of this PageSentEmailWithQueueProjection. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this PageSentEmailWithQueueProjection. + + Page number starting at 0 # noqa: E501 + + :param number: The number of this PageSentEmailWithQueueProjection. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and number is None: # noqa: E501 + raise ValueError("Invalid value for `number`, must not be `None`") # noqa: E501 + + self._number = number + + @property + def number_of_elements(self): + """Gets the number_of_elements of this PageSentEmailWithQueueProjection. # noqa: E501 + + Number of items returned # noqa: E501 + + :return: The number_of_elements of this PageSentEmailWithQueueProjection. # noqa: E501 + :rtype: int + """ + return self._number_of_elements + + @number_of_elements.setter + def number_of_elements(self, number_of_elements): + """Sets the number_of_elements of this PageSentEmailWithQueueProjection. + + Number of items returned # noqa: E501 + + :param number_of_elements: The number_of_elements of this PageSentEmailWithQueueProjection. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and number_of_elements is None: # noqa: E501 + raise ValueError("Invalid value for `number_of_elements`, must not be `None`") # noqa: E501 + + self._number_of_elements = number_of_elements + + @property + def total_elements(self): + """Gets the total_elements of this PageSentEmailWithQueueProjection. # noqa: E501 + + Total number of items available for querying # noqa: E501 + + :return: The total_elements of this PageSentEmailWithQueueProjection. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageSentEmailWithQueueProjection. + + Total number of items available for querying # noqa: E501 + + :param total_elements: The total_elements of this PageSentEmailWithQueueProjection. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and total_elements is None: # noqa: E501 + raise ValueError("Invalid value for `total_elements`, must not be `None`") # noqa: E501 + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageSentEmailWithQueueProjection. # noqa: E501 + + Total number of pages available # noqa: E501 + + :return: The total_pages of this PageSentEmailWithQueueProjection. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageSentEmailWithQueueProjection. + + Total number of pages available # noqa: E501 + + :param total_pages: The total_pages of this PageSentEmailWithQueueProjection. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and total_pages is None: # noqa: E501 + raise ValueError("Invalid value for `total_pages`, must not be `None`") # noqa: E501 + + self._total_pages = total_pages + + @property + def last(self): + """Gets the last of this PageSentEmailWithQueueProjection. # noqa: E501 + + + :return: The last of this PageSentEmailWithQueueProjection. # noqa: E501 + :rtype: bool + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this PageSentEmailWithQueueProjection. + + + :param last: The last of this PageSentEmailWithQueueProjection. # noqa: E501 + :type: bool + """ + + self._last = last + + @property + def sort(self): + """Gets the sort of this PageSentEmailWithQueueProjection. # noqa: E501 + + + :return: The sort of this PageSentEmailWithQueueProjection. # noqa: E501 + :rtype: Sort + """ + return self._sort + + @sort.setter + def sort(self, sort): + """Sets the sort of this PageSentEmailWithQueueProjection. + + + :param sort: The sort of this PageSentEmailWithQueueProjection. # noqa: E501 + :type: Sort + """ + + self._sort = sort + + @property + def first(self): + """Gets the first of this PageSentEmailWithQueueProjection. # noqa: E501 + + + :return: The first of this PageSentEmailWithQueueProjection. # noqa: E501 + :rtype: bool + """ + return self._first + + @first.setter + def first(self, first): + """Sets the first of this PageSentEmailWithQueueProjection. + + + :param first: The first of this PageSentEmailWithQueueProjection. # noqa: E501 + :type: bool + """ + + self._first = first + + @property + def empty(self): + """Gets the empty of this PageSentEmailWithQueueProjection. # noqa: E501 + + + :return: The empty of this PageSentEmailWithQueueProjection. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this PageSentEmailWithQueueProjection. + + + :param empty: The empty of this PageSentEmailWithQueueProjection. # noqa: E501 + :type: bool + """ + + self._empty = empty + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageSentEmailWithQueueProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PageSentEmailWithQueueProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/page_sms_projection.py b/mailslurp_client/models/page_sms_projection.py new file mode 100644 index 00000000..7d9aab25 --- /dev/null +++ b/mailslurp_client/models/page_sms_projection.py @@ -0,0 +1,407 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PageSmsProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'content': 'list[SmsProjection]', + 'pageable': 'PageableObject', + 'total': 'int', + 'last': 'bool', + 'total_elements': 'int', + 'total_pages': 'int', + 'size': 'int', + 'number': 'int', + 'sort': 'Sort', + 'first': 'bool', + 'number_of_elements': 'int', + 'empty': 'bool' + } + + attribute_map = { + 'content': 'content', + 'pageable': 'pageable', + 'total': 'total', + 'last': 'last', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages', + 'size': 'size', + 'number': 'number', + 'sort': 'sort', + 'first': 'first', + 'number_of_elements': 'numberOfElements', + 'empty': 'empty' + } + + def __init__(self, content=None, pageable=None, total=None, last=None, total_elements=None, total_pages=None, size=None, number=None, sort=None, first=None, number_of_elements=None, empty=None, local_vars_configuration=None): # noqa: E501 + """PageSmsProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._content = None + self._pageable = None + self._total = None + self._last = None + self._total_elements = None + self._total_pages = None + self._size = None + self._number = None + self._sort = None + self._first = None + self._number_of_elements = None + self._empty = None + self.discriminator = None + + if content is not None: + self.content = content + if pageable is not None: + self.pageable = pageable + if total is not None: + self.total = total + if last is not None: + self.last = last + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + if size is not None: + self.size = size + if number is not None: + self.number = number + if sort is not None: + self.sort = sort + if first is not None: + self.first = first + if number_of_elements is not None: + self.number_of_elements = number_of_elements + if empty is not None: + self.empty = empty + + @property + def content(self): + """Gets the content of this PageSmsProjection. # noqa: E501 + + + :return: The content of this PageSmsProjection. # noqa: E501 + :rtype: list[SmsProjection] + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this PageSmsProjection. + + + :param content: The content of this PageSmsProjection. # noqa: E501 + :type: list[SmsProjection] + """ + + self._content = content + + @property + def pageable(self): + """Gets the pageable of this PageSmsProjection. # noqa: E501 + + + :return: The pageable of this PageSmsProjection. # noqa: E501 + :rtype: PageableObject + """ + return self._pageable + + @pageable.setter + def pageable(self, pageable): + """Sets the pageable of this PageSmsProjection. + + + :param pageable: The pageable of this PageSmsProjection. # noqa: E501 + :type: PageableObject + """ + + self._pageable = pageable + + @property + def total(self): + """Gets the total of this PageSmsProjection. # noqa: E501 + + + :return: The total of this PageSmsProjection. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PageSmsProjection. + + + :param total: The total of this PageSmsProjection. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def last(self): + """Gets the last of this PageSmsProjection. # noqa: E501 + + + :return: The last of this PageSmsProjection. # noqa: E501 + :rtype: bool + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this PageSmsProjection. + + + :param last: The last of this PageSmsProjection. # noqa: E501 + :type: bool + """ + + self._last = last + + @property + def total_elements(self): + """Gets the total_elements of this PageSmsProjection. # noqa: E501 + + + :return: The total_elements of this PageSmsProjection. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageSmsProjection. + + + :param total_elements: The total_elements of this PageSmsProjection. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageSmsProjection. # noqa: E501 + + + :return: The total_pages of this PageSmsProjection. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageSmsProjection. + + + :param total_pages: The total_pages of this PageSmsProjection. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def size(self): + """Gets the size of this PageSmsProjection. # noqa: E501 + + + :return: The size of this PageSmsProjection. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this PageSmsProjection. + + + :param size: The size of this PageSmsProjection. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def number(self): + """Gets the number of this PageSmsProjection. # noqa: E501 + + + :return: The number of this PageSmsProjection. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this PageSmsProjection. + + + :param number: The number of this PageSmsProjection. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def sort(self): + """Gets the sort of this PageSmsProjection. # noqa: E501 + + + :return: The sort of this PageSmsProjection. # noqa: E501 + :rtype: Sort + """ + return self._sort + + @sort.setter + def sort(self, sort): + """Sets the sort of this PageSmsProjection. + + + :param sort: The sort of this PageSmsProjection. # noqa: E501 + :type: Sort + """ + + self._sort = sort + + @property + def first(self): + """Gets the first of this PageSmsProjection. # noqa: E501 + + + :return: The first of this PageSmsProjection. # noqa: E501 + :rtype: bool + """ + return self._first + + @first.setter + def first(self, first): + """Sets the first of this PageSmsProjection. + + + :param first: The first of this PageSmsProjection. # noqa: E501 + :type: bool + """ + + self._first = first + + @property + def number_of_elements(self): + """Gets the number_of_elements of this PageSmsProjection. # noqa: E501 + + + :return: The number_of_elements of this PageSmsProjection. # noqa: E501 + :rtype: int + """ + return self._number_of_elements + + @number_of_elements.setter + def number_of_elements(self, number_of_elements): + """Sets the number_of_elements of this PageSmsProjection. + + + :param number_of_elements: The number_of_elements of this PageSmsProjection. # noqa: E501 + :type: int + """ + + self._number_of_elements = number_of_elements + + @property + def empty(self): + """Gets the empty of this PageSmsProjection. # noqa: E501 + + + :return: The empty of this PageSmsProjection. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this PageSmsProjection. + + + :param empty: The empty of this PageSmsProjection. # noqa: E501 + :type: bool + """ + + self._empty = empty + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageSmsProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PageSmsProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/page_template_projection.py b/mailslurp_client/models/page_template_projection.py new file mode 100644 index 00000000..881d48d8 --- /dev/null +++ b/mailslurp_client/models/page_template_projection.py @@ -0,0 +1,407 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PageTemplateProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'content': 'list[TemplateProjection]', + 'pageable': 'PageableObject', + 'total': 'int', + 'last': 'bool', + 'total_elements': 'int', + 'total_pages': 'int', + 'size': 'int', + 'number': 'int', + 'sort': 'Sort', + 'first': 'bool', + 'number_of_elements': 'int', + 'empty': 'bool' + } + + attribute_map = { + 'content': 'content', + 'pageable': 'pageable', + 'total': 'total', + 'last': 'last', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages', + 'size': 'size', + 'number': 'number', + 'sort': 'sort', + 'first': 'first', + 'number_of_elements': 'numberOfElements', + 'empty': 'empty' + } + + def __init__(self, content=None, pageable=None, total=None, last=None, total_elements=None, total_pages=None, size=None, number=None, sort=None, first=None, number_of_elements=None, empty=None, local_vars_configuration=None): # noqa: E501 + """PageTemplateProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._content = None + self._pageable = None + self._total = None + self._last = None + self._total_elements = None + self._total_pages = None + self._size = None + self._number = None + self._sort = None + self._first = None + self._number_of_elements = None + self._empty = None + self.discriminator = None + + if content is not None: + self.content = content + if pageable is not None: + self.pageable = pageable + if total is not None: + self.total = total + if last is not None: + self.last = last + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + if size is not None: + self.size = size + if number is not None: + self.number = number + if sort is not None: + self.sort = sort + if first is not None: + self.first = first + if number_of_elements is not None: + self.number_of_elements = number_of_elements + if empty is not None: + self.empty = empty + + @property + def content(self): + """Gets the content of this PageTemplateProjection. # noqa: E501 + + + :return: The content of this PageTemplateProjection. # noqa: E501 + :rtype: list[TemplateProjection] + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this PageTemplateProjection. + + + :param content: The content of this PageTemplateProjection. # noqa: E501 + :type: list[TemplateProjection] + """ + + self._content = content + + @property + def pageable(self): + """Gets the pageable of this PageTemplateProjection. # noqa: E501 + + + :return: The pageable of this PageTemplateProjection. # noqa: E501 + :rtype: PageableObject + """ + return self._pageable + + @pageable.setter + def pageable(self, pageable): + """Sets the pageable of this PageTemplateProjection. + + + :param pageable: The pageable of this PageTemplateProjection. # noqa: E501 + :type: PageableObject + """ + + self._pageable = pageable + + @property + def total(self): + """Gets the total of this PageTemplateProjection. # noqa: E501 + + + :return: The total of this PageTemplateProjection. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PageTemplateProjection. + + + :param total: The total of this PageTemplateProjection. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def last(self): + """Gets the last of this PageTemplateProjection. # noqa: E501 + + + :return: The last of this PageTemplateProjection. # noqa: E501 + :rtype: bool + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this PageTemplateProjection. + + + :param last: The last of this PageTemplateProjection. # noqa: E501 + :type: bool + """ + + self._last = last + + @property + def total_elements(self): + """Gets the total_elements of this PageTemplateProjection. # noqa: E501 + + + :return: The total_elements of this PageTemplateProjection. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageTemplateProjection. + + + :param total_elements: The total_elements of this PageTemplateProjection. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageTemplateProjection. # noqa: E501 + + + :return: The total_pages of this PageTemplateProjection. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageTemplateProjection. + + + :param total_pages: The total_pages of this PageTemplateProjection. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def size(self): + """Gets the size of this PageTemplateProjection. # noqa: E501 + + + :return: The size of this PageTemplateProjection. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this PageTemplateProjection. + + + :param size: The size of this PageTemplateProjection. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def number(self): + """Gets the number of this PageTemplateProjection. # noqa: E501 + + + :return: The number of this PageTemplateProjection. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this PageTemplateProjection. + + + :param number: The number of this PageTemplateProjection. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def sort(self): + """Gets the sort of this PageTemplateProjection. # noqa: E501 + + + :return: The sort of this PageTemplateProjection. # noqa: E501 + :rtype: Sort + """ + return self._sort + + @sort.setter + def sort(self, sort): + """Sets the sort of this PageTemplateProjection. + + + :param sort: The sort of this PageTemplateProjection. # noqa: E501 + :type: Sort + """ + + self._sort = sort + + @property + def first(self): + """Gets the first of this PageTemplateProjection. # noqa: E501 + + + :return: The first of this PageTemplateProjection. # noqa: E501 + :rtype: bool + """ + return self._first + + @first.setter + def first(self, first): + """Sets the first of this PageTemplateProjection. + + + :param first: The first of this PageTemplateProjection. # noqa: E501 + :type: bool + """ + + self._first = first + + @property + def number_of_elements(self): + """Gets the number_of_elements of this PageTemplateProjection. # noqa: E501 + + + :return: The number_of_elements of this PageTemplateProjection. # noqa: E501 + :rtype: int + """ + return self._number_of_elements + + @number_of_elements.setter + def number_of_elements(self, number_of_elements): + """Sets the number_of_elements of this PageTemplateProjection. + + + :param number_of_elements: The number_of_elements of this PageTemplateProjection. # noqa: E501 + :type: int + """ + + self._number_of_elements = number_of_elements + + @property + def empty(self): + """Gets the empty of this PageTemplateProjection. # noqa: E501 + + + :return: The empty of this PageTemplateProjection. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this PageTemplateProjection. + + + :param empty: The empty of this PageTemplateProjection. # noqa: E501 + :type: bool + """ + + self._empty = empty + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageTemplateProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PageTemplateProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/page_thread_projection.py b/mailslurp_client/models/page_thread_projection.py new file mode 100644 index 00000000..133be1da --- /dev/null +++ b/mailslurp_client/models/page_thread_projection.py @@ -0,0 +1,407 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PageThreadProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'content': 'list[ThreadProjection]', + 'pageable': 'PageableObject', + 'total': 'int', + 'last': 'bool', + 'total_elements': 'int', + 'total_pages': 'int', + 'size': 'int', + 'number': 'int', + 'sort': 'Sort', + 'first': 'bool', + 'number_of_elements': 'int', + 'empty': 'bool' + } + + attribute_map = { + 'content': 'content', + 'pageable': 'pageable', + 'total': 'total', + 'last': 'last', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages', + 'size': 'size', + 'number': 'number', + 'sort': 'sort', + 'first': 'first', + 'number_of_elements': 'numberOfElements', + 'empty': 'empty' + } + + def __init__(self, content=None, pageable=None, total=None, last=None, total_elements=None, total_pages=None, size=None, number=None, sort=None, first=None, number_of_elements=None, empty=None, local_vars_configuration=None): # noqa: E501 + """PageThreadProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._content = None + self._pageable = None + self._total = None + self._last = None + self._total_elements = None + self._total_pages = None + self._size = None + self._number = None + self._sort = None + self._first = None + self._number_of_elements = None + self._empty = None + self.discriminator = None + + if content is not None: + self.content = content + if pageable is not None: + self.pageable = pageable + if total is not None: + self.total = total + if last is not None: + self.last = last + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + if size is not None: + self.size = size + if number is not None: + self.number = number + if sort is not None: + self.sort = sort + if first is not None: + self.first = first + if number_of_elements is not None: + self.number_of_elements = number_of_elements + if empty is not None: + self.empty = empty + + @property + def content(self): + """Gets the content of this PageThreadProjection. # noqa: E501 + + + :return: The content of this PageThreadProjection. # noqa: E501 + :rtype: list[ThreadProjection] + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this PageThreadProjection. + + + :param content: The content of this PageThreadProjection. # noqa: E501 + :type: list[ThreadProjection] + """ + + self._content = content + + @property + def pageable(self): + """Gets the pageable of this PageThreadProjection. # noqa: E501 + + + :return: The pageable of this PageThreadProjection. # noqa: E501 + :rtype: PageableObject + """ + return self._pageable + + @pageable.setter + def pageable(self, pageable): + """Sets the pageable of this PageThreadProjection. + + + :param pageable: The pageable of this PageThreadProjection. # noqa: E501 + :type: PageableObject + """ + + self._pageable = pageable + + @property + def total(self): + """Gets the total of this PageThreadProjection. # noqa: E501 + + + :return: The total of this PageThreadProjection. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PageThreadProjection. + + + :param total: The total of this PageThreadProjection. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def last(self): + """Gets the last of this PageThreadProjection. # noqa: E501 + + + :return: The last of this PageThreadProjection. # noqa: E501 + :rtype: bool + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this PageThreadProjection. + + + :param last: The last of this PageThreadProjection. # noqa: E501 + :type: bool + """ + + self._last = last + + @property + def total_elements(self): + """Gets the total_elements of this PageThreadProjection. # noqa: E501 + + + :return: The total_elements of this PageThreadProjection. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageThreadProjection. + + + :param total_elements: The total_elements of this PageThreadProjection. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageThreadProjection. # noqa: E501 + + + :return: The total_pages of this PageThreadProjection. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageThreadProjection. + + + :param total_pages: The total_pages of this PageThreadProjection. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def size(self): + """Gets the size of this PageThreadProjection. # noqa: E501 + + + :return: The size of this PageThreadProjection. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this PageThreadProjection. + + + :param size: The size of this PageThreadProjection. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def number(self): + """Gets the number of this PageThreadProjection. # noqa: E501 + + + :return: The number of this PageThreadProjection. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this PageThreadProjection. + + + :param number: The number of this PageThreadProjection. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def sort(self): + """Gets the sort of this PageThreadProjection. # noqa: E501 + + + :return: The sort of this PageThreadProjection. # noqa: E501 + :rtype: Sort + """ + return self._sort + + @sort.setter + def sort(self, sort): + """Sets the sort of this PageThreadProjection. + + + :param sort: The sort of this PageThreadProjection. # noqa: E501 + :type: Sort + """ + + self._sort = sort + + @property + def first(self): + """Gets the first of this PageThreadProjection. # noqa: E501 + + + :return: The first of this PageThreadProjection. # noqa: E501 + :rtype: bool + """ + return self._first + + @first.setter + def first(self, first): + """Sets the first of this PageThreadProjection. + + + :param first: The first of this PageThreadProjection. # noqa: E501 + :type: bool + """ + + self._first = first + + @property + def number_of_elements(self): + """Gets the number_of_elements of this PageThreadProjection. # noqa: E501 + + + :return: The number_of_elements of this PageThreadProjection. # noqa: E501 + :rtype: int + """ + return self._number_of_elements + + @number_of_elements.setter + def number_of_elements(self, number_of_elements): + """Sets the number_of_elements of this PageThreadProjection. + + + :param number_of_elements: The number_of_elements of this PageThreadProjection. # noqa: E501 + :type: int + """ + + self._number_of_elements = number_of_elements + + @property + def empty(self): + """Gets the empty of this PageThreadProjection. # noqa: E501 + + + :return: The empty of this PageThreadProjection. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this PageThreadProjection. + + + :param empty: The empty of this PageThreadProjection. # noqa: E501 + :type: bool + """ + + self._empty = empty + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageThreadProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PageThreadProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/page_tracking_pixel_projection.py b/mailslurp_client/models/page_tracking_pixel_projection.py new file mode 100644 index 00000000..ca9f06df --- /dev/null +++ b/mailslurp_client/models/page_tracking_pixel_projection.py @@ -0,0 +1,407 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PageTrackingPixelProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'content': 'list[TrackingPixelProjection]', + 'pageable': 'PageableObject', + 'total': 'int', + 'last': 'bool', + 'total_elements': 'int', + 'total_pages': 'int', + 'size': 'int', + 'number': 'int', + 'sort': 'Sort', + 'first': 'bool', + 'number_of_elements': 'int', + 'empty': 'bool' + } + + attribute_map = { + 'content': 'content', + 'pageable': 'pageable', + 'total': 'total', + 'last': 'last', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages', + 'size': 'size', + 'number': 'number', + 'sort': 'sort', + 'first': 'first', + 'number_of_elements': 'numberOfElements', + 'empty': 'empty' + } + + def __init__(self, content=None, pageable=None, total=None, last=None, total_elements=None, total_pages=None, size=None, number=None, sort=None, first=None, number_of_elements=None, empty=None, local_vars_configuration=None): # noqa: E501 + """PageTrackingPixelProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._content = None + self._pageable = None + self._total = None + self._last = None + self._total_elements = None + self._total_pages = None + self._size = None + self._number = None + self._sort = None + self._first = None + self._number_of_elements = None + self._empty = None + self.discriminator = None + + if content is not None: + self.content = content + if pageable is not None: + self.pageable = pageable + if total is not None: + self.total = total + if last is not None: + self.last = last + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + if size is not None: + self.size = size + if number is not None: + self.number = number + if sort is not None: + self.sort = sort + if first is not None: + self.first = first + if number_of_elements is not None: + self.number_of_elements = number_of_elements + if empty is not None: + self.empty = empty + + @property + def content(self): + """Gets the content of this PageTrackingPixelProjection. # noqa: E501 + + + :return: The content of this PageTrackingPixelProjection. # noqa: E501 + :rtype: list[TrackingPixelProjection] + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this PageTrackingPixelProjection. + + + :param content: The content of this PageTrackingPixelProjection. # noqa: E501 + :type: list[TrackingPixelProjection] + """ + + self._content = content + + @property + def pageable(self): + """Gets the pageable of this PageTrackingPixelProjection. # noqa: E501 + + + :return: The pageable of this PageTrackingPixelProjection. # noqa: E501 + :rtype: PageableObject + """ + return self._pageable + + @pageable.setter + def pageable(self, pageable): + """Sets the pageable of this PageTrackingPixelProjection. + + + :param pageable: The pageable of this PageTrackingPixelProjection. # noqa: E501 + :type: PageableObject + """ + + self._pageable = pageable + + @property + def total(self): + """Gets the total of this PageTrackingPixelProjection. # noqa: E501 + + + :return: The total of this PageTrackingPixelProjection. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PageTrackingPixelProjection. + + + :param total: The total of this PageTrackingPixelProjection. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def last(self): + """Gets the last of this PageTrackingPixelProjection. # noqa: E501 + + + :return: The last of this PageTrackingPixelProjection. # noqa: E501 + :rtype: bool + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this PageTrackingPixelProjection. + + + :param last: The last of this PageTrackingPixelProjection. # noqa: E501 + :type: bool + """ + + self._last = last + + @property + def total_elements(self): + """Gets the total_elements of this PageTrackingPixelProjection. # noqa: E501 + + + :return: The total_elements of this PageTrackingPixelProjection. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageTrackingPixelProjection. + + + :param total_elements: The total_elements of this PageTrackingPixelProjection. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageTrackingPixelProjection. # noqa: E501 + + + :return: The total_pages of this PageTrackingPixelProjection. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageTrackingPixelProjection. + + + :param total_pages: The total_pages of this PageTrackingPixelProjection. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def size(self): + """Gets the size of this PageTrackingPixelProjection. # noqa: E501 + + + :return: The size of this PageTrackingPixelProjection. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this PageTrackingPixelProjection. + + + :param size: The size of this PageTrackingPixelProjection. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def number(self): + """Gets the number of this PageTrackingPixelProjection. # noqa: E501 + + + :return: The number of this PageTrackingPixelProjection. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this PageTrackingPixelProjection. + + + :param number: The number of this PageTrackingPixelProjection. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def sort(self): + """Gets the sort of this PageTrackingPixelProjection. # noqa: E501 + + + :return: The sort of this PageTrackingPixelProjection. # noqa: E501 + :rtype: Sort + """ + return self._sort + + @sort.setter + def sort(self, sort): + """Sets the sort of this PageTrackingPixelProjection. + + + :param sort: The sort of this PageTrackingPixelProjection. # noqa: E501 + :type: Sort + """ + + self._sort = sort + + @property + def first(self): + """Gets the first of this PageTrackingPixelProjection. # noqa: E501 + + + :return: The first of this PageTrackingPixelProjection. # noqa: E501 + :rtype: bool + """ + return self._first + + @first.setter + def first(self, first): + """Sets the first of this PageTrackingPixelProjection. + + + :param first: The first of this PageTrackingPixelProjection. # noqa: E501 + :type: bool + """ + + self._first = first + + @property + def number_of_elements(self): + """Gets the number_of_elements of this PageTrackingPixelProjection. # noqa: E501 + + + :return: The number_of_elements of this PageTrackingPixelProjection. # noqa: E501 + :rtype: int + """ + return self._number_of_elements + + @number_of_elements.setter + def number_of_elements(self, number_of_elements): + """Sets the number_of_elements of this PageTrackingPixelProjection. + + + :param number_of_elements: The number_of_elements of this PageTrackingPixelProjection. # noqa: E501 + :type: int + """ + + self._number_of_elements = number_of_elements + + @property + def empty(self): + """Gets the empty of this PageTrackingPixelProjection. # noqa: E501 + + + :return: The empty of this PageTrackingPixelProjection. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this PageTrackingPixelProjection. + + + :param empty: The empty of this PageTrackingPixelProjection. # noqa: E501 + :type: bool + """ + + self._empty = empty + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageTrackingPixelProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PageTrackingPixelProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/page_unknown_missed_email_projection.py b/mailslurp_client/models/page_unknown_missed_email_projection.py new file mode 100644 index 00000000..41fe0bce --- /dev/null +++ b/mailslurp_client/models/page_unknown_missed_email_projection.py @@ -0,0 +1,407 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PageUnknownMissedEmailProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'content': 'list[UnknownMissedEmailProjection]', + 'pageable': 'PageableObject', + 'total': 'int', + 'last': 'bool', + 'total_elements': 'int', + 'total_pages': 'int', + 'size': 'int', + 'number': 'int', + 'sort': 'Sort', + 'first': 'bool', + 'number_of_elements': 'int', + 'empty': 'bool' + } + + attribute_map = { + 'content': 'content', + 'pageable': 'pageable', + 'total': 'total', + 'last': 'last', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages', + 'size': 'size', + 'number': 'number', + 'sort': 'sort', + 'first': 'first', + 'number_of_elements': 'numberOfElements', + 'empty': 'empty' + } + + def __init__(self, content=None, pageable=None, total=None, last=None, total_elements=None, total_pages=None, size=None, number=None, sort=None, first=None, number_of_elements=None, empty=None, local_vars_configuration=None): # noqa: E501 + """PageUnknownMissedEmailProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._content = None + self._pageable = None + self._total = None + self._last = None + self._total_elements = None + self._total_pages = None + self._size = None + self._number = None + self._sort = None + self._first = None + self._number_of_elements = None + self._empty = None + self.discriminator = None + + if content is not None: + self.content = content + if pageable is not None: + self.pageable = pageable + if total is not None: + self.total = total + if last is not None: + self.last = last + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + if size is not None: + self.size = size + if number is not None: + self.number = number + if sort is not None: + self.sort = sort + if first is not None: + self.first = first + if number_of_elements is not None: + self.number_of_elements = number_of_elements + if empty is not None: + self.empty = empty + + @property + def content(self): + """Gets the content of this PageUnknownMissedEmailProjection. # noqa: E501 + + + :return: The content of this PageUnknownMissedEmailProjection. # noqa: E501 + :rtype: list[UnknownMissedEmailProjection] + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this PageUnknownMissedEmailProjection. + + + :param content: The content of this PageUnknownMissedEmailProjection. # noqa: E501 + :type: list[UnknownMissedEmailProjection] + """ + + self._content = content + + @property + def pageable(self): + """Gets the pageable of this PageUnknownMissedEmailProjection. # noqa: E501 + + + :return: The pageable of this PageUnknownMissedEmailProjection. # noqa: E501 + :rtype: PageableObject + """ + return self._pageable + + @pageable.setter + def pageable(self, pageable): + """Sets the pageable of this PageUnknownMissedEmailProjection. + + + :param pageable: The pageable of this PageUnknownMissedEmailProjection. # noqa: E501 + :type: PageableObject + """ + + self._pageable = pageable + + @property + def total(self): + """Gets the total of this PageUnknownMissedEmailProjection. # noqa: E501 + + + :return: The total of this PageUnknownMissedEmailProjection. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PageUnknownMissedEmailProjection. + + + :param total: The total of this PageUnknownMissedEmailProjection. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def last(self): + """Gets the last of this PageUnknownMissedEmailProjection. # noqa: E501 + + + :return: The last of this PageUnknownMissedEmailProjection. # noqa: E501 + :rtype: bool + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this PageUnknownMissedEmailProjection. + + + :param last: The last of this PageUnknownMissedEmailProjection. # noqa: E501 + :type: bool + """ + + self._last = last + + @property + def total_elements(self): + """Gets the total_elements of this PageUnknownMissedEmailProjection. # noqa: E501 + + + :return: The total_elements of this PageUnknownMissedEmailProjection. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageUnknownMissedEmailProjection. + + + :param total_elements: The total_elements of this PageUnknownMissedEmailProjection. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageUnknownMissedEmailProjection. # noqa: E501 + + + :return: The total_pages of this PageUnknownMissedEmailProjection. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageUnknownMissedEmailProjection. + + + :param total_pages: The total_pages of this PageUnknownMissedEmailProjection. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def size(self): + """Gets the size of this PageUnknownMissedEmailProjection. # noqa: E501 + + + :return: The size of this PageUnknownMissedEmailProjection. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this PageUnknownMissedEmailProjection. + + + :param size: The size of this PageUnknownMissedEmailProjection. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def number(self): + """Gets the number of this PageUnknownMissedEmailProjection. # noqa: E501 + + + :return: The number of this PageUnknownMissedEmailProjection. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this PageUnknownMissedEmailProjection. + + + :param number: The number of this PageUnknownMissedEmailProjection. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def sort(self): + """Gets the sort of this PageUnknownMissedEmailProjection. # noqa: E501 + + + :return: The sort of this PageUnknownMissedEmailProjection. # noqa: E501 + :rtype: Sort + """ + return self._sort + + @sort.setter + def sort(self, sort): + """Sets the sort of this PageUnknownMissedEmailProjection. + + + :param sort: The sort of this PageUnknownMissedEmailProjection. # noqa: E501 + :type: Sort + """ + + self._sort = sort + + @property + def first(self): + """Gets the first of this PageUnknownMissedEmailProjection. # noqa: E501 + + + :return: The first of this PageUnknownMissedEmailProjection. # noqa: E501 + :rtype: bool + """ + return self._first + + @first.setter + def first(self, first): + """Sets the first of this PageUnknownMissedEmailProjection. + + + :param first: The first of this PageUnknownMissedEmailProjection. # noqa: E501 + :type: bool + """ + + self._first = first + + @property + def number_of_elements(self): + """Gets the number_of_elements of this PageUnknownMissedEmailProjection. # noqa: E501 + + + :return: The number_of_elements of this PageUnknownMissedEmailProjection. # noqa: E501 + :rtype: int + """ + return self._number_of_elements + + @number_of_elements.setter + def number_of_elements(self, number_of_elements): + """Sets the number_of_elements of this PageUnknownMissedEmailProjection. + + + :param number_of_elements: The number_of_elements of this PageUnknownMissedEmailProjection. # noqa: E501 + :type: int + """ + + self._number_of_elements = number_of_elements + + @property + def empty(self): + """Gets the empty of this PageUnknownMissedEmailProjection. # noqa: E501 + + + :return: The empty of this PageUnknownMissedEmailProjection. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this PageUnknownMissedEmailProjection. + + + :param empty: The empty of this PageUnknownMissedEmailProjection. # noqa: E501 + :type: bool + """ + + self._empty = empty + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageUnknownMissedEmailProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PageUnknownMissedEmailProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/page_webhook_projection.py b/mailslurp_client/models/page_webhook_projection.py new file mode 100644 index 00000000..da9e4769 --- /dev/null +++ b/mailslurp_client/models/page_webhook_projection.py @@ -0,0 +1,407 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PageWebhookProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'content': 'list[WebhookProjection]', + 'pageable': 'PageableObject', + 'total': 'int', + 'last': 'bool', + 'total_elements': 'int', + 'total_pages': 'int', + 'size': 'int', + 'number': 'int', + 'sort': 'Sort', + 'first': 'bool', + 'number_of_elements': 'int', + 'empty': 'bool' + } + + attribute_map = { + 'content': 'content', + 'pageable': 'pageable', + 'total': 'total', + 'last': 'last', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages', + 'size': 'size', + 'number': 'number', + 'sort': 'sort', + 'first': 'first', + 'number_of_elements': 'numberOfElements', + 'empty': 'empty' + } + + def __init__(self, content=None, pageable=None, total=None, last=None, total_elements=None, total_pages=None, size=None, number=None, sort=None, first=None, number_of_elements=None, empty=None, local_vars_configuration=None): # noqa: E501 + """PageWebhookProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._content = None + self._pageable = None + self._total = None + self._last = None + self._total_elements = None + self._total_pages = None + self._size = None + self._number = None + self._sort = None + self._first = None + self._number_of_elements = None + self._empty = None + self.discriminator = None + + if content is not None: + self.content = content + if pageable is not None: + self.pageable = pageable + if total is not None: + self.total = total + if last is not None: + self.last = last + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + if size is not None: + self.size = size + if number is not None: + self.number = number + if sort is not None: + self.sort = sort + if first is not None: + self.first = first + if number_of_elements is not None: + self.number_of_elements = number_of_elements + if empty is not None: + self.empty = empty + + @property + def content(self): + """Gets the content of this PageWebhookProjection. # noqa: E501 + + + :return: The content of this PageWebhookProjection. # noqa: E501 + :rtype: list[WebhookProjection] + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this PageWebhookProjection. + + + :param content: The content of this PageWebhookProjection. # noqa: E501 + :type: list[WebhookProjection] + """ + + self._content = content + + @property + def pageable(self): + """Gets the pageable of this PageWebhookProjection. # noqa: E501 + + + :return: The pageable of this PageWebhookProjection. # noqa: E501 + :rtype: PageableObject + """ + return self._pageable + + @pageable.setter + def pageable(self, pageable): + """Sets the pageable of this PageWebhookProjection. + + + :param pageable: The pageable of this PageWebhookProjection. # noqa: E501 + :type: PageableObject + """ + + self._pageable = pageable + + @property + def total(self): + """Gets the total of this PageWebhookProjection. # noqa: E501 + + + :return: The total of this PageWebhookProjection. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PageWebhookProjection. + + + :param total: The total of this PageWebhookProjection. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def last(self): + """Gets the last of this PageWebhookProjection. # noqa: E501 + + + :return: The last of this PageWebhookProjection. # noqa: E501 + :rtype: bool + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this PageWebhookProjection. + + + :param last: The last of this PageWebhookProjection. # noqa: E501 + :type: bool + """ + + self._last = last + + @property + def total_elements(self): + """Gets the total_elements of this PageWebhookProjection. # noqa: E501 + + + :return: The total_elements of this PageWebhookProjection. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageWebhookProjection. + + + :param total_elements: The total_elements of this PageWebhookProjection. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageWebhookProjection. # noqa: E501 + + + :return: The total_pages of this PageWebhookProjection. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageWebhookProjection. + + + :param total_pages: The total_pages of this PageWebhookProjection. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def size(self): + """Gets the size of this PageWebhookProjection. # noqa: E501 + + + :return: The size of this PageWebhookProjection. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this PageWebhookProjection. + + + :param size: The size of this PageWebhookProjection. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def number(self): + """Gets the number of this PageWebhookProjection. # noqa: E501 + + + :return: The number of this PageWebhookProjection. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this PageWebhookProjection. + + + :param number: The number of this PageWebhookProjection. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def sort(self): + """Gets the sort of this PageWebhookProjection. # noqa: E501 + + + :return: The sort of this PageWebhookProjection. # noqa: E501 + :rtype: Sort + """ + return self._sort + + @sort.setter + def sort(self, sort): + """Sets the sort of this PageWebhookProjection. + + + :param sort: The sort of this PageWebhookProjection. # noqa: E501 + :type: Sort + """ + + self._sort = sort + + @property + def first(self): + """Gets the first of this PageWebhookProjection. # noqa: E501 + + + :return: The first of this PageWebhookProjection. # noqa: E501 + :rtype: bool + """ + return self._first + + @first.setter + def first(self, first): + """Sets the first of this PageWebhookProjection. + + + :param first: The first of this PageWebhookProjection. # noqa: E501 + :type: bool + """ + + self._first = first + + @property + def number_of_elements(self): + """Gets the number_of_elements of this PageWebhookProjection. # noqa: E501 + + + :return: The number_of_elements of this PageWebhookProjection. # noqa: E501 + :rtype: int + """ + return self._number_of_elements + + @number_of_elements.setter + def number_of_elements(self, number_of_elements): + """Sets the number_of_elements of this PageWebhookProjection. + + + :param number_of_elements: The number_of_elements of this PageWebhookProjection. # noqa: E501 + :type: int + """ + + self._number_of_elements = number_of_elements + + @property + def empty(self): + """Gets the empty of this PageWebhookProjection. # noqa: E501 + + + :return: The empty of this PageWebhookProjection. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this PageWebhookProjection. + + + :param empty: The empty of this PageWebhookProjection. # noqa: E501 + :type: bool + """ + + self._empty = empty + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageWebhookProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PageWebhookProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/page_webhook_result.py b/mailslurp_client/models/page_webhook_result.py new file mode 100644 index 00000000..8ccc6f00 --- /dev/null +++ b/mailslurp_client/models/page_webhook_result.py @@ -0,0 +1,407 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PageWebhookResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'content': 'list[WebhookResultDto]', + 'pageable': 'PageableObject', + 'total': 'int', + 'last': 'bool', + 'total_elements': 'int', + 'total_pages': 'int', + 'size': 'int', + 'number': 'int', + 'sort': 'Sort', + 'first': 'bool', + 'number_of_elements': 'int', + 'empty': 'bool' + } + + attribute_map = { + 'content': 'content', + 'pageable': 'pageable', + 'total': 'total', + 'last': 'last', + 'total_elements': 'totalElements', + 'total_pages': 'totalPages', + 'size': 'size', + 'number': 'number', + 'sort': 'sort', + 'first': 'first', + 'number_of_elements': 'numberOfElements', + 'empty': 'empty' + } + + def __init__(self, content=None, pageable=None, total=None, last=None, total_elements=None, total_pages=None, size=None, number=None, sort=None, first=None, number_of_elements=None, empty=None, local_vars_configuration=None): # noqa: E501 + """PageWebhookResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._content = None + self._pageable = None + self._total = None + self._last = None + self._total_elements = None + self._total_pages = None + self._size = None + self._number = None + self._sort = None + self._first = None + self._number_of_elements = None + self._empty = None + self.discriminator = None + + if content is not None: + self.content = content + if pageable is not None: + self.pageable = pageable + if total is not None: + self.total = total + if last is not None: + self.last = last + if total_elements is not None: + self.total_elements = total_elements + if total_pages is not None: + self.total_pages = total_pages + if size is not None: + self.size = size + if number is not None: + self.number = number + if sort is not None: + self.sort = sort + if first is not None: + self.first = first + if number_of_elements is not None: + self.number_of_elements = number_of_elements + if empty is not None: + self.empty = empty + + @property + def content(self): + """Gets the content of this PageWebhookResult. # noqa: E501 + + + :return: The content of this PageWebhookResult. # noqa: E501 + :rtype: list[WebhookResultDto] + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this PageWebhookResult. + + + :param content: The content of this PageWebhookResult. # noqa: E501 + :type: list[WebhookResultDto] + """ + + self._content = content + + @property + def pageable(self): + """Gets the pageable of this PageWebhookResult. # noqa: E501 + + + :return: The pageable of this PageWebhookResult. # noqa: E501 + :rtype: PageableObject + """ + return self._pageable + + @pageable.setter + def pageable(self, pageable): + """Sets the pageable of this PageWebhookResult. + + + :param pageable: The pageable of this PageWebhookResult. # noqa: E501 + :type: PageableObject + """ + + self._pageable = pageable + + @property + def total(self): + """Gets the total of this PageWebhookResult. # noqa: E501 + + + :return: The total of this PageWebhookResult. # noqa: E501 + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this PageWebhookResult. + + + :param total: The total of this PageWebhookResult. # noqa: E501 + :type: int + """ + + self._total = total + + @property + def last(self): + """Gets the last of this PageWebhookResult. # noqa: E501 + + + :return: The last of this PageWebhookResult. # noqa: E501 + :rtype: bool + """ + return self._last + + @last.setter + def last(self, last): + """Sets the last of this PageWebhookResult. + + + :param last: The last of this PageWebhookResult. # noqa: E501 + :type: bool + """ + + self._last = last + + @property + def total_elements(self): + """Gets the total_elements of this PageWebhookResult. # noqa: E501 + + + :return: The total_elements of this PageWebhookResult. # noqa: E501 + :rtype: int + """ + return self._total_elements + + @total_elements.setter + def total_elements(self, total_elements): + """Sets the total_elements of this PageWebhookResult. + + + :param total_elements: The total_elements of this PageWebhookResult. # noqa: E501 + :type: int + """ + + self._total_elements = total_elements + + @property + def total_pages(self): + """Gets the total_pages of this PageWebhookResult. # noqa: E501 + + + :return: The total_pages of this PageWebhookResult. # noqa: E501 + :rtype: int + """ + return self._total_pages + + @total_pages.setter + def total_pages(self, total_pages): + """Sets the total_pages of this PageWebhookResult. + + + :param total_pages: The total_pages of this PageWebhookResult. # noqa: E501 + :type: int + """ + + self._total_pages = total_pages + + @property + def size(self): + """Gets the size of this PageWebhookResult. # noqa: E501 + + + :return: The size of this PageWebhookResult. # noqa: E501 + :rtype: int + """ + return self._size + + @size.setter + def size(self, size): + """Sets the size of this PageWebhookResult. + + + :param size: The size of this PageWebhookResult. # noqa: E501 + :type: int + """ + + self._size = size + + @property + def number(self): + """Gets the number of this PageWebhookResult. # noqa: E501 + + + :return: The number of this PageWebhookResult. # noqa: E501 + :rtype: int + """ + return self._number + + @number.setter + def number(self, number): + """Sets the number of this PageWebhookResult. + + + :param number: The number of this PageWebhookResult. # noqa: E501 + :type: int + """ + + self._number = number + + @property + def sort(self): + """Gets the sort of this PageWebhookResult. # noqa: E501 + + + :return: The sort of this PageWebhookResult. # noqa: E501 + :rtype: Sort + """ + return self._sort + + @sort.setter + def sort(self, sort): + """Sets the sort of this PageWebhookResult. + + + :param sort: The sort of this PageWebhookResult. # noqa: E501 + :type: Sort + """ + + self._sort = sort + + @property + def first(self): + """Gets the first of this PageWebhookResult. # noqa: E501 + + + :return: The first of this PageWebhookResult. # noqa: E501 + :rtype: bool + """ + return self._first + + @first.setter + def first(self, first): + """Sets the first of this PageWebhookResult. + + + :param first: The first of this PageWebhookResult. # noqa: E501 + :type: bool + """ + + self._first = first + + @property + def number_of_elements(self): + """Gets the number_of_elements of this PageWebhookResult. # noqa: E501 + + + :return: The number_of_elements of this PageWebhookResult. # noqa: E501 + :rtype: int + """ + return self._number_of_elements + + @number_of_elements.setter + def number_of_elements(self, number_of_elements): + """Sets the number_of_elements of this PageWebhookResult. + + + :param number_of_elements: The number_of_elements of this PageWebhookResult. # noqa: E501 + :type: int + """ + + self._number_of_elements = number_of_elements + + @property + def empty(self): + """Gets the empty of this PageWebhookResult. # noqa: E501 + + + :return: The empty of this PageWebhookResult. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this PageWebhookResult. + + + :param empty: The empty of this PageWebhookResult. # noqa: E501 + :type: bool + """ + + self._empty = empty + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageWebhookResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PageWebhookResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/pageable_object.py b/mailslurp_client/models/pageable_object.py new file mode 100644 index 00000000..0fc000bd --- /dev/null +++ b/mailslurp_client/models/pageable_object.py @@ -0,0 +1,251 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PageableObject(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'offset': 'int', + 'sort': 'Sort', + 'page_number': 'int', + 'page_size': 'int', + 'paged': 'bool', + 'unpaged': 'bool' + } + + attribute_map = { + 'offset': 'offset', + 'sort': 'sort', + 'page_number': 'pageNumber', + 'page_size': 'pageSize', + 'paged': 'paged', + 'unpaged': 'unpaged' + } + + def __init__(self, offset=None, sort=None, page_number=None, page_size=None, paged=None, unpaged=None, local_vars_configuration=None): # noqa: E501 + """PageableObject - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._offset = None + self._sort = None + self._page_number = None + self._page_size = None + self._paged = None + self._unpaged = None + self.discriminator = None + + if offset is not None: + self.offset = offset + if sort is not None: + self.sort = sort + if page_number is not None: + self.page_number = page_number + if page_size is not None: + self.page_size = page_size + if paged is not None: + self.paged = paged + if unpaged is not None: + self.unpaged = unpaged + + @property + def offset(self): + """Gets the offset of this PageableObject. # noqa: E501 + + + :return: The offset of this PageableObject. # noqa: E501 + :rtype: int + """ + return self._offset + + @offset.setter + def offset(self, offset): + """Sets the offset of this PageableObject. + + + :param offset: The offset of this PageableObject. # noqa: E501 + :type: int + """ + + self._offset = offset + + @property + def sort(self): + """Gets the sort of this PageableObject. # noqa: E501 + + + :return: The sort of this PageableObject. # noqa: E501 + :rtype: Sort + """ + return self._sort + + @sort.setter + def sort(self, sort): + """Sets the sort of this PageableObject. + + + :param sort: The sort of this PageableObject. # noqa: E501 + :type: Sort + """ + + self._sort = sort + + @property + def page_number(self): + """Gets the page_number of this PageableObject. # noqa: E501 + + + :return: The page_number of this PageableObject. # noqa: E501 + :rtype: int + """ + return self._page_number + + @page_number.setter + def page_number(self, page_number): + """Sets the page_number of this PageableObject. + + + :param page_number: The page_number of this PageableObject. # noqa: E501 + :type: int + """ + + self._page_number = page_number + + @property + def page_size(self): + """Gets the page_size of this PageableObject. # noqa: E501 + + + :return: The page_size of this PageableObject. # noqa: E501 + :rtype: int + """ + return self._page_size + + @page_size.setter + def page_size(self, page_size): + """Sets the page_size of this PageableObject. + + + :param page_size: The page_size of this PageableObject. # noqa: E501 + :type: int + """ + + self._page_size = page_size + + @property + def paged(self): + """Gets the paged of this PageableObject. # noqa: E501 + + + :return: The paged of this PageableObject. # noqa: E501 + :rtype: bool + """ + return self._paged + + @paged.setter + def paged(self, paged): + """Sets the paged of this PageableObject. + + + :param paged: The paged of this PageableObject. # noqa: E501 + :type: bool + """ + + self._paged = paged + + @property + def unpaged(self): + """Gets the unpaged of this PageableObject. # noqa: E501 + + + :return: The unpaged of this PageableObject. # noqa: E501 + :rtype: bool + """ + return self._unpaged + + @unpaged.setter + def unpaged(self, unpaged): + """Sets the unpaged of this PageableObject. + + + :param unpaged: The unpaged of this PageableObject. # noqa: E501 + :type: bool + """ + + self._unpaged = unpaged + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PageableObject): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PageableObject): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/phone_number_dto.py b/mailslurp_client/models/phone_number_dto.py new file mode 100644 index 00000000..d408f522 --- /dev/null +++ b/mailslurp_client/models/phone_number_dto.py @@ -0,0 +1,342 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PhoneNumberDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'user_id': 'str', + 'compliance_address': 'str', + 'emergency_address': 'str', + 'phone_number': 'str', + 'phone_country': 'str', + 'phone_plan': 'str', + 'created_at': 'datetime', + 'updated_at': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'user_id': 'userId', + 'compliance_address': 'complianceAddress', + 'emergency_address': 'emergencyAddress', + 'phone_number': 'phoneNumber', + 'phone_country': 'phoneCountry', + 'phone_plan': 'phonePlan', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt' + } + + def __init__(self, id=None, user_id=None, compliance_address=None, emergency_address=None, phone_number=None, phone_country=None, phone_plan=None, created_at=None, updated_at=None, local_vars_configuration=None): # noqa: E501 + """PhoneNumberDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._user_id = None + self._compliance_address = None + self._emergency_address = None + self._phone_number = None + self._phone_country = None + self._phone_plan = None + self._created_at = None + self._updated_at = None + self.discriminator = None + + self.id = id + self.user_id = user_id + if compliance_address is not None: + self.compliance_address = compliance_address + if emergency_address is not None: + self.emergency_address = emergency_address + self.phone_number = phone_number + self.phone_country = phone_country + self.phone_plan = phone_plan + self.created_at = created_at + self.updated_at = updated_at + + @property + def id(self): + """Gets the id of this PhoneNumberDto. # noqa: E501 + + + :return: The id of this PhoneNumberDto. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this PhoneNumberDto. + + + :param id: The id of this PhoneNumberDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def user_id(self): + """Gets the user_id of this PhoneNumberDto. # noqa: E501 + + + :return: The user_id of this PhoneNumberDto. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this PhoneNumberDto. + + + :param user_id: The user_id of this PhoneNumberDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def compliance_address(self): + """Gets the compliance_address of this PhoneNumberDto. # noqa: E501 + + + :return: The compliance_address of this PhoneNumberDto. # noqa: E501 + :rtype: str + """ + return self._compliance_address + + @compliance_address.setter + def compliance_address(self, compliance_address): + """Sets the compliance_address of this PhoneNumberDto. + + + :param compliance_address: The compliance_address of this PhoneNumberDto. # noqa: E501 + :type: str + """ + + self._compliance_address = compliance_address + + @property + def emergency_address(self): + """Gets the emergency_address of this PhoneNumberDto. # noqa: E501 + + + :return: The emergency_address of this PhoneNumberDto. # noqa: E501 + :rtype: str + """ + return self._emergency_address + + @emergency_address.setter + def emergency_address(self, emergency_address): + """Sets the emergency_address of this PhoneNumberDto. + + + :param emergency_address: The emergency_address of this PhoneNumberDto. # noqa: E501 + :type: str + """ + + self._emergency_address = emergency_address + + @property + def phone_number(self): + """Gets the phone_number of this PhoneNumberDto. # noqa: E501 + + + :return: The phone_number of this PhoneNumberDto. # noqa: E501 + :rtype: str + """ + return self._phone_number + + @phone_number.setter + def phone_number(self, phone_number): + """Sets the phone_number of this PhoneNumberDto. + + + :param phone_number: The phone_number of this PhoneNumberDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and phone_number is None: # noqa: E501 + raise ValueError("Invalid value for `phone_number`, must not be `None`") # noqa: E501 + + self._phone_number = phone_number + + @property + def phone_country(self): + """Gets the phone_country of this PhoneNumberDto. # noqa: E501 + + + :return: The phone_country of this PhoneNumberDto. # noqa: E501 + :rtype: str + """ + return self._phone_country + + @phone_country.setter + def phone_country(self, phone_country): + """Sets the phone_country of this PhoneNumberDto. + + + :param phone_country: The phone_country of this PhoneNumberDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and phone_country is None: # noqa: E501 + raise ValueError("Invalid value for `phone_country`, must not be `None`") # noqa: E501 + allowed_values = ["US", "GB"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and phone_country not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `phone_country` ({0}), must be one of {1}" # noqa: E501 + .format(phone_country, allowed_values) + ) + + self._phone_country = phone_country + + @property + def phone_plan(self): + """Gets the phone_plan of this PhoneNumberDto. # noqa: E501 + + + :return: The phone_plan of this PhoneNumberDto. # noqa: E501 + :rtype: str + """ + return self._phone_plan + + @phone_plan.setter + def phone_plan(self, phone_plan): + """Sets the phone_plan of this PhoneNumberDto. + + + :param phone_plan: The phone_plan of this PhoneNumberDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and phone_plan is None: # noqa: E501 + raise ValueError("Invalid value for `phone_plan`, must not be `None`") # noqa: E501 + + self._phone_plan = phone_plan + + @property + def created_at(self): + """Gets the created_at of this PhoneNumberDto. # noqa: E501 + + + :return: The created_at of this PhoneNumberDto. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this PhoneNumberDto. + + + :param created_at: The created_at of this PhoneNumberDto. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + @property + def updated_at(self): + """Gets the updated_at of this PhoneNumberDto. # noqa: E501 + + + :return: The updated_at of this PhoneNumberDto. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this PhoneNumberDto. + + + :param updated_at: The updated_at of this PhoneNumberDto. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and updated_at is None: # noqa: E501 + raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501 + + self._updated_at = updated_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PhoneNumberDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PhoneNumberDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/phone_number_projection.py b/mailslurp_client/models/phone_number_projection.py new file mode 100644 index 00000000..2e964592 --- /dev/null +++ b/mailslurp_client/models/phone_number_projection.py @@ -0,0 +1,236 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PhoneNumberProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'user_id': 'str', + 'phone_number': 'str', + 'phone_country': 'str', + 'created_at': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'user_id': 'userId', + 'phone_number': 'phoneNumber', + 'phone_country': 'phoneCountry', + 'created_at': 'createdAt' + } + + def __init__(self, id=None, user_id=None, phone_number=None, phone_country=None, created_at=None, local_vars_configuration=None): # noqa: E501 + """PhoneNumberProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._user_id = None + self._phone_number = None + self._phone_country = None + self._created_at = None + self.discriminator = None + + self.id = id + self.user_id = user_id + self.phone_number = phone_number + self.phone_country = phone_country + self.created_at = created_at + + @property + def id(self): + """Gets the id of this PhoneNumberProjection. # noqa: E501 + + + :return: The id of this PhoneNumberProjection. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this PhoneNumberProjection. + + + :param id: The id of this PhoneNumberProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def user_id(self): + """Gets the user_id of this PhoneNumberProjection. # noqa: E501 + + + :return: The user_id of this PhoneNumberProjection. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this PhoneNumberProjection. + + + :param user_id: The user_id of this PhoneNumberProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def phone_number(self): + """Gets the phone_number of this PhoneNumberProjection. # noqa: E501 + + + :return: The phone_number of this PhoneNumberProjection. # noqa: E501 + :rtype: str + """ + return self._phone_number + + @phone_number.setter + def phone_number(self, phone_number): + """Sets the phone_number of this PhoneNumberProjection. + + + :param phone_number: The phone_number of this PhoneNumberProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and phone_number is None: # noqa: E501 + raise ValueError("Invalid value for `phone_number`, must not be `None`") # noqa: E501 + + self._phone_number = phone_number + + @property + def phone_country(self): + """Gets the phone_country of this PhoneNumberProjection. # noqa: E501 + + + :return: The phone_country of this PhoneNumberProjection. # noqa: E501 + :rtype: str + """ + return self._phone_country + + @phone_country.setter + def phone_country(self, phone_country): + """Sets the phone_country of this PhoneNumberProjection. + + + :param phone_country: The phone_country of this PhoneNumberProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and phone_country is None: # noqa: E501 + raise ValueError("Invalid value for `phone_country`, must not be `None`") # noqa: E501 + allowed_values = ["US", "GB"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and phone_country not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `phone_country` ({0}), must be one of {1}" # noqa: E501 + .format(phone_country, allowed_values) + ) + + self._phone_country = phone_country + + @property + def created_at(self): + """Gets the created_at of this PhoneNumberProjection. # noqa: E501 + + + :return: The created_at of this PhoneNumberProjection. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this PhoneNumberProjection. + + + :param created_at: The created_at of this PhoneNumberProjection. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PhoneNumberProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PhoneNumberProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/phone_plan_dto.py b/mailslurp_client/models/phone_plan_dto.py new file mode 100644 index 00000000..4ad2b086 --- /dev/null +++ b/mailslurp_client/models/phone_plan_dto.py @@ -0,0 +1,209 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class PhonePlanDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'user_id': 'str', + 'phone_country': 'str', + 'created_at': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'user_id': 'userId', + 'phone_country': 'phoneCountry', + 'created_at': 'createdAt' + } + + def __init__(self, id=None, user_id=None, phone_country=None, created_at=None, local_vars_configuration=None): # noqa: E501 + """PhonePlanDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._user_id = None + self._phone_country = None + self._created_at = None + self.discriminator = None + + self.id = id + self.user_id = user_id + self.phone_country = phone_country + self.created_at = created_at + + @property + def id(self): + """Gets the id of this PhonePlanDto. # noqa: E501 + + + :return: The id of this PhonePlanDto. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this PhonePlanDto. + + + :param id: The id of this PhonePlanDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def user_id(self): + """Gets the user_id of this PhonePlanDto. # noqa: E501 + + + :return: The user_id of this PhonePlanDto. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this PhonePlanDto. + + + :param user_id: The user_id of this PhonePlanDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def phone_country(self): + """Gets the phone_country of this PhonePlanDto. # noqa: E501 + + + :return: The phone_country of this PhonePlanDto. # noqa: E501 + :rtype: str + """ + return self._phone_country + + @phone_country.setter + def phone_country(self, phone_country): + """Sets the phone_country of this PhonePlanDto. + + + :param phone_country: The phone_country of this PhonePlanDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and phone_country is None: # noqa: E501 + raise ValueError("Invalid value for `phone_country`, must not be `None`") # noqa: E501 + allowed_values = ["US", "GB"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and phone_country not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `phone_country` ({0}), must be one of {1}" # noqa: E501 + .format(phone_country, allowed_values) + ) + + self._phone_country = phone_country + + @property + def created_at(self): + """Gets the created_at of this PhonePlanDto. # noqa: E501 + + + :return: The created_at of this PhonePlanDto. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this PhonePlanDto. + + + :param created_at: The created_at of this PhonePlanDto. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PhonePlanDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, PhonePlanDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/raw_email_json.py b/mailslurp_client/models/raw_email_json.py new file mode 100644 index 00000000..1d642b5e --- /dev/null +++ b/mailslurp_client/models/raw_email_json.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class RawEmailJson(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'content': 'str' + } + + attribute_map = { + 'content': 'content' + } + + def __init__(self, content=None, local_vars_configuration=None): # noqa: E501 + """RawEmailJson - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._content = None + self.discriminator = None + + self.content = content + + @property + def content(self): + """Gets the content of this RawEmailJson. # noqa: E501 + + + :return: The content of this RawEmailJson. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this RawEmailJson. + + + :param content: The content of this RawEmailJson. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and content is None: # noqa: E501 + raise ValueError("Invalid value for `content`, must not be `None`") # noqa: E501 + + self._content = content + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RawEmailJson): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, RawEmailJson): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/recipient.py b/mailslurp_client/models/recipient.py new file mode 100644 index 00000000..689707e2 --- /dev/null +++ b/mailslurp_client/models/recipient.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class Recipient(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'raw_value': 'str', + 'email_address': 'str', + 'name': 'str' + } + + attribute_map = { + 'raw_value': 'rawValue', + 'email_address': 'emailAddress', + 'name': 'name' + } + + def __init__(self, raw_value=None, email_address=None, name=None, local_vars_configuration=None): # noqa: E501 + """Recipient - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._raw_value = None + self._email_address = None + self._name = None + self.discriminator = None + + self.raw_value = raw_value + self.email_address = email_address + if name is not None: + self.name = name + + @property + def raw_value(self): + """Gets the raw_value of this Recipient. # noqa: E501 + + + :return: The raw_value of this Recipient. # noqa: E501 + :rtype: str + """ + return self._raw_value + + @raw_value.setter + def raw_value(self, raw_value): + """Sets the raw_value of this Recipient. + + + :param raw_value: The raw_value of this Recipient. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and raw_value is None: # noqa: E501 + raise ValueError("Invalid value for `raw_value`, must not be `None`") # noqa: E501 + + self._raw_value = raw_value + + @property + def email_address(self): + """Gets the email_address of this Recipient. # noqa: E501 + + + :return: The email_address of this Recipient. # noqa: E501 + :rtype: str + """ + return self._email_address + + @email_address.setter + def email_address(self, email_address): + """Sets the email_address of this Recipient. + + + :param email_address: The email_address of this Recipient. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and email_address is None: # noqa: E501 + raise ValueError("Invalid value for `email_address`, must not be `None`") # noqa: E501 + + self._email_address = email_address + + @property + def name(self): + """Gets the name of this Recipient. # noqa: E501 + + + :return: The name of this Recipient. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Recipient. + + + :param name: The name of this Recipient. # noqa: E501 + :type: str + """ + + self._name = name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Recipient): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Recipient): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/reply_to_alias_email_options.py b/mailslurp_client/models/reply_to_alias_email_options.py new file mode 100644 index 00000000..2a6b5074 --- /dev/null +++ b/mailslurp_client/models/reply_to_alias_email_options.py @@ -0,0 +1,353 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class ReplyToAliasEmailOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'body': 'str', + 'is_html': 'bool', + 'charset': 'str', + 'attachments': 'list[str]', + 'template_variables': 'dict(str, object)', + 'template': 'str', + 'send_strategy': 'str', + 'use_inbox_name': 'bool', + 'html': 'bool' + } + + attribute_map = { + 'body': 'body', + 'is_html': 'isHTML', + 'charset': 'charset', + 'attachments': 'attachments', + 'template_variables': 'templateVariables', + 'template': 'template', + 'send_strategy': 'sendStrategy', + 'use_inbox_name': 'useInboxName', + 'html': 'html' + } + + def __init__(self, body=None, is_html=None, charset=None, attachments=None, template_variables=None, template=None, send_strategy=None, use_inbox_name=None, html=None, local_vars_configuration=None): # noqa: E501 + """ReplyToAliasEmailOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._body = None + self._is_html = None + self._charset = None + self._attachments = None + self._template_variables = None + self._template = None + self._send_strategy = None + self._use_inbox_name = None + self._html = None + self.discriminator = None + + self.body = body + self.is_html = is_html + if charset is not None: + self.charset = charset + if attachments is not None: + self.attachments = attachments + if template_variables is not None: + self.template_variables = template_variables + if template is not None: + self.template = template + if send_strategy is not None: + self.send_strategy = send_strategy + if use_inbox_name is not None: + self.use_inbox_name = use_inbox_name + if html is not None: + self.html = html + + @property + def body(self): + """Gets the body of this ReplyToAliasEmailOptions. # noqa: E501 + + Body of the reply email you want to send # noqa: E501 + + :return: The body of this ReplyToAliasEmailOptions. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this ReplyToAliasEmailOptions. + + Body of the reply email you want to send # noqa: E501 + + :param body: The body of this ReplyToAliasEmailOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and body is None: # noqa: E501 + raise ValueError("Invalid value for `body`, must not be `None`") # noqa: E501 + + self._body = body + + @property + def is_html(self): + """Gets the is_html of this ReplyToAliasEmailOptions. # noqa: E501 + + Is the reply HTML # noqa: E501 + + :return: The is_html of this ReplyToAliasEmailOptions. # noqa: E501 + :rtype: bool + """ + return self._is_html + + @is_html.setter + def is_html(self, is_html): + """Sets the is_html of this ReplyToAliasEmailOptions. + + Is the reply HTML # noqa: E501 + + :param is_html: The is_html of this ReplyToAliasEmailOptions. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and is_html is None: # noqa: E501 + raise ValueError("Invalid value for `is_html`, must not be `None`") # noqa: E501 + + self._is_html = is_html + + @property + def charset(self): + """Gets the charset of this ReplyToAliasEmailOptions. # noqa: E501 + + The charset that your message should be sent with. Optional. Default is UTF-8 # noqa: E501 + + :return: The charset of this ReplyToAliasEmailOptions. # noqa: E501 + :rtype: str + """ + return self._charset + + @charset.setter + def charset(self, charset): + """Sets the charset of this ReplyToAliasEmailOptions. + + The charset that your message should be sent with. Optional. Default is UTF-8 # noqa: E501 + + :param charset: The charset of this ReplyToAliasEmailOptions. # noqa: E501 + :type: str + """ + + self._charset = charset + + @property + def attachments(self): + """Gets the attachments of this ReplyToAliasEmailOptions. # noqa: E501 + + List of uploaded attachments to send with the reply. Optional. # noqa: E501 + + :return: The attachments of this ReplyToAliasEmailOptions. # noqa: E501 + :rtype: list[str] + """ + return self._attachments + + @attachments.setter + def attachments(self, attachments): + """Sets the attachments of this ReplyToAliasEmailOptions. + + List of uploaded attachments to send with the reply. Optional. # noqa: E501 + + :param attachments: The attachments of this ReplyToAliasEmailOptions. # noqa: E501 + :type: list[str] + """ + + self._attachments = attachments + + @property + def template_variables(self): + """Gets the template_variables of this ReplyToAliasEmailOptions. # noqa: E501 + + Template variables if using a template # noqa: E501 + + :return: The template_variables of this ReplyToAliasEmailOptions. # noqa: E501 + :rtype: dict(str, object) + """ + return self._template_variables + + @template_variables.setter + def template_variables(self, template_variables): + """Sets the template_variables of this ReplyToAliasEmailOptions. + + Template variables if using a template # noqa: E501 + + :param template_variables: The template_variables of this ReplyToAliasEmailOptions. # noqa: E501 + :type: dict(str, object) + """ + + self._template_variables = template_variables + + @property + def template(self): + """Gets the template of this ReplyToAliasEmailOptions. # noqa: E501 + + Template ID to use instead of body. Will use template variable map to fill defined variable slots. # noqa: E501 + + :return: The template of this ReplyToAliasEmailOptions. # noqa: E501 + :rtype: str + """ + return self._template + + @template.setter + def template(self, template): + """Sets the template of this ReplyToAliasEmailOptions. + + Template ID to use instead of body. Will use template variable map to fill defined variable slots. # noqa: E501 + + :param template: The template of this ReplyToAliasEmailOptions. # noqa: E501 + :type: str + """ + + self._template = template + + @property + def send_strategy(self): + """Gets the send_strategy of this ReplyToAliasEmailOptions. # noqa: E501 + + How an email should be sent based on its recipients # noqa: E501 + + :return: The send_strategy of this ReplyToAliasEmailOptions. # noqa: E501 + :rtype: str + """ + return self._send_strategy + + @send_strategy.setter + def send_strategy(self, send_strategy): + """Sets the send_strategy of this ReplyToAliasEmailOptions. + + How an email should be sent based on its recipients # noqa: E501 + + :param send_strategy: The send_strategy of this ReplyToAliasEmailOptions. # noqa: E501 + :type: str + """ + allowed_values = ["SINGLE_MESSAGE"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and send_strategy not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `send_strategy` ({0}), must be one of {1}" # noqa: E501 + .format(send_strategy, allowed_values) + ) + + self._send_strategy = send_strategy + + @property + def use_inbox_name(self): + """Gets the use_inbox_name of this ReplyToAliasEmailOptions. # noqa: E501 + + Optionally use inbox name as display name for sender email address # noqa: E501 + + :return: The use_inbox_name of this ReplyToAliasEmailOptions. # noqa: E501 + :rtype: bool + """ + return self._use_inbox_name + + @use_inbox_name.setter + def use_inbox_name(self, use_inbox_name): + """Sets the use_inbox_name of this ReplyToAliasEmailOptions. + + Optionally use inbox name as display name for sender email address # noqa: E501 + + :param use_inbox_name: The use_inbox_name of this ReplyToAliasEmailOptions. # noqa: E501 + :type: bool + """ + + self._use_inbox_name = use_inbox_name + + @property + def html(self): + """Gets the html of this ReplyToAliasEmailOptions. # noqa: E501 + + + :return: The html of this ReplyToAliasEmailOptions. # noqa: E501 + :rtype: bool + """ + return self._html + + @html.setter + def html(self, html): + """Sets the html of this ReplyToAliasEmailOptions. + + + :param html: The html of this ReplyToAliasEmailOptions. # noqa: E501 + :type: bool + """ + + self._html = html + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ReplyToAliasEmailOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ReplyToAliasEmailOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/reply_to_email_options.py b/mailslurp_client/models/reply_to_email_options.py new file mode 100644 index 00000000..258bc8a8 --- /dev/null +++ b/mailslurp_client/models/reply_to_email_options.py @@ -0,0 +1,409 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class ReplyToEmailOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'body': 'str', + 'is_html': 'bool', + '_from': 'str', + 'reply_to': 'str', + 'charset': 'str', + 'attachments': 'list[str]', + 'template_variables': 'dict(str, object)', + 'template': 'str', + 'send_strategy': 'str', + 'use_inbox_name': 'bool', + 'html': 'bool' + } + + attribute_map = { + 'body': 'body', + 'is_html': 'isHTML', + '_from': 'from', + 'reply_to': 'replyTo', + 'charset': 'charset', + 'attachments': 'attachments', + 'template_variables': 'templateVariables', + 'template': 'template', + 'send_strategy': 'sendStrategy', + 'use_inbox_name': 'useInboxName', + 'html': 'html' + } + + def __init__(self, body=None, is_html=None, _from=None, reply_to=None, charset=None, attachments=None, template_variables=None, template=None, send_strategy=None, use_inbox_name=None, html=None, local_vars_configuration=None): # noqa: E501 + """ReplyToEmailOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._body = None + self._is_html = None + self.__from = None + self._reply_to = None + self._charset = None + self._attachments = None + self._template_variables = None + self._template = None + self._send_strategy = None + self._use_inbox_name = None + self._html = None + self.discriminator = None + + self.body = body + self.is_html = is_html + if _from is not None: + self._from = _from + if reply_to is not None: + self.reply_to = reply_to + if charset is not None: + self.charset = charset + if attachments is not None: + self.attachments = attachments + if template_variables is not None: + self.template_variables = template_variables + if template is not None: + self.template = template + if send_strategy is not None: + self.send_strategy = send_strategy + if use_inbox_name is not None: + self.use_inbox_name = use_inbox_name + if html is not None: + self.html = html + + @property + def body(self): + """Gets the body of this ReplyToEmailOptions. # noqa: E501 + + Body of the reply email you want to send # noqa: E501 + + :return: The body of this ReplyToEmailOptions. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this ReplyToEmailOptions. + + Body of the reply email you want to send # noqa: E501 + + :param body: The body of this ReplyToEmailOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and body is None: # noqa: E501 + raise ValueError("Invalid value for `body`, must not be `None`") # noqa: E501 + + self._body = body + + @property + def is_html(self): + """Gets the is_html of this ReplyToEmailOptions. # noqa: E501 + + Is the reply HTML # noqa: E501 + + :return: The is_html of this ReplyToEmailOptions. # noqa: E501 + :rtype: bool + """ + return self._is_html + + @is_html.setter + def is_html(self, is_html): + """Sets the is_html of this ReplyToEmailOptions. + + Is the reply HTML # noqa: E501 + + :param is_html: The is_html of this ReplyToEmailOptions. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and is_html is None: # noqa: E501 + raise ValueError("Invalid value for `is_html`, must not be `None`") # noqa: E501 + + self._is_html = is_html + + @property + def _from(self): + """Gets the _from of this ReplyToEmailOptions. # noqa: E501 + + The from header that should be used. Optional # noqa: E501 + + :return: The _from of this ReplyToEmailOptions. # noqa: E501 + :rtype: str + """ + return self.__from + + @_from.setter + def _from(self, _from): + """Sets the _from of this ReplyToEmailOptions. + + The from header that should be used. Optional # noqa: E501 + + :param _from: The _from of this ReplyToEmailOptions. # noqa: E501 + :type: str + """ + + self.__from = _from + + @property + def reply_to(self): + """Gets the reply_to of this ReplyToEmailOptions. # noqa: E501 + + The replyTo header that should be used. Optional # noqa: E501 + + :return: The reply_to of this ReplyToEmailOptions. # noqa: E501 + :rtype: str + """ + return self._reply_to + + @reply_to.setter + def reply_to(self, reply_to): + """Sets the reply_to of this ReplyToEmailOptions. + + The replyTo header that should be used. Optional # noqa: E501 + + :param reply_to: The reply_to of this ReplyToEmailOptions. # noqa: E501 + :type: str + """ + + self._reply_to = reply_to + + @property + def charset(self): + """Gets the charset of this ReplyToEmailOptions. # noqa: E501 + + The charset that your message should be sent with. Optional. Default is UTF-8 # noqa: E501 + + :return: The charset of this ReplyToEmailOptions. # noqa: E501 + :rtype: str + """ + return self._charset + + @charset.setter + def charset(self, charset): + """Sets the charset of this ReplyToEmailOptions. + + The charset that your message should be sent with. Optional. Default is UTF-8 # noqa: E501 + + :param charset: The charset of this ReplyToEmailOptions. # noqa: E501 + :type: str + """ + + self._charset = charset + + @property + def attachments(self): + """Gets the attachments of this ReplyToEmailOptions. # noqa: E501 + + List of uploaded attachments to send with the reply. Optional. # noqa: E501 + + :return: The attachments of this ReplyToEmailOptions. # noqa: E501 + :rtype: list[str] + """ + return self._attachments + + @attachments.setter + def attachments(self, attachments): + """Sets the attachments of this ReplyToEmailOptions. + + List of uploaded attachments to send with the reply. Optional. # noqa: E501 + + :param attachments: The attachments of this ReplyToEmailOptions. # noqa: E501 + :type: list[str] + """ + + self._attachments = attachments + + @property + def template_variables(self): + """Gets the template_variables of this ReplyToEmailOptions. # noqa: E501 + + Template variables if using a template # noqa: E501 + + :return: The template_variables of this ReplyToEmailOptions. # noqa: E501 + :rtype: dict(str, object) + """ + return self._template_variables + + @template_variables.setter + def template_variables(self, template_variables): + """Sets the template_variables of this ReplyToEmailOptions. + + Template variables if using a template # noqa: E501 + + :param template_variables: The template_variables of this ReplyToEmailOptions. # noqa: E501 + :type: dict(str, object) + """ + + self._template_variables = template_variables + + @property + def template(self): + """Gets the template of this ReplyToEmailOptions. # noqa: E501 + + Template ID to use instead of body. Will use template variable map to fill defined variable slots. # noqa: E501 + + :return: The template of this ReplyToEmailOptions. # noqa: E501 + :rtype: str + """ + return self._template + + @template.setter + def template(self, template): + """Sets the template of this ReplyToEmailOptions. + + Template ID to use instead of body. Will use template variable map to fill defined variable slots. # noqa: E501 + + :param template: The template of this ReplyToEmailOptions. # noqa: E501 + :type: str + """ + + self._template = template + + @property + def send_strategy(self): + """Gets the send_strategy of this ReplyToEmailOptions. # noqa: E501 + + How an email should be sent based on its recipients # noqa: E501 + + :return: The send_strategy of this ReplyToEmailOptions. # noqa: E501 + :rtype: str + """ + return self._send_strategy + + @send_strategy.setter + def send_strategy(self, send_strategy): + """Sets the send_strategy of this ReplyToEmailOptions. + + How an email should be sent based on its recipients # noqa: E501 + + :param send_strategy: The send_strategy of this ReplyToEmailOptions. # noqa: E501 + :type: str + """ + allowed_values = ["SINGLE_MESSAGE"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and send_strategy not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `send_strategy` ({0}), must be one of {1}" # noqa: E501 + .format(send_strategy, allowed_values) + ) + + self._send_strategy = send_strategy + + @property + def use_inbox_name(self): + """Gets the use_inbox_name of this ReplyToEmailOptions. # noqa: E501 + + Optionally use inbox name as display name for sender email address # noqa: E501 + + :return: The use_inbox_name of this ReplyToEmailOptions. # noqa: E501 + :rtype: bool + """ + return self._use_inbox_name + + @use_inbox_name.setter + def use_inbox_name(self, use_inbox_name): + """Sets the use_inbox_name of this ReplyToEmailOptions. + + Optionally use inbox name as display name for sender email address # noqa: E501 + + :param use_inbox_name: The use_inbox_name of this ReplyToEmailOptions. # noqa: E501 + :type: bool + """ + + self._use_inbox_name = use_inbox_name + + @property + def html(self): + """Gets the html of this ReplyToEmailOptions. # noqa: E501 + + + :return: The html of this ReplyToEmailOptions. # noqa: E501 + :rtype: bool + """ + return self._html + + @html.setter + def html(self, html): + """Sets the html of this ReplyToEmailOptions. + + + :param html: The html of this ReplyToEmailOptions. # noqa: E501 + :type: bool + """ + + self._html = html + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ReplyToEmailOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ReplyToEmailOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/send_email_options.py b/mailslurp_client/models/send_email_options.py new file mode 100644 index 00000000..f24d7971 --- /dev/null +++ b/mailslurp_client/models/send_email_options.py @@ -0,0 +1,667 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class SendEmailOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'to_contacts': 'list[str]', + 'to_group': 'str', + 'to': 'list[str]', + '_from': 'str', + 'cc': 'list[str]', + 'bcc': 'list[str]', + 'subject': 'str', + 'reply_to': 'str', + 'body': 'str', + 'html': 'bool', + 'is_html': 'bool', + 'charset': 'str', + 'attachments': 'list[str]', + 'template_variables': 'dict(str, object)', + 'template': 'str', + 'send_strategy': 'str', + 'use_inbox_name': 'bool', + 'add_tracking_pixel': 'bool', + 'filter_bounced_recipients': 'bool', + 'validate_email_addresses': 'str' + } + + attribute_map = { + 'to_contacts': 'toContacts', + 'to_group': 'toGroup', + 'to': 'to', + '_from': 'from', + 'cc': 'cc', + 'bcc': 'bcc', + 'subject': 'subject', + 'reply_to': 'replyTo', + 'body': 'body', + 'html': 'html', + 'is_html': 'isHTML', + 'charset': 'charset', + 'attachments': 'attachments', + 'template_variables': 'templateVariables', + 'template': 'template', + 'send_strategy': 'sendStrategy', + 'use_inbox_name': 'useInboxName', + 'add_tracking_pixel': 'addTrackingPixel', + 'filter_bounced_recipients': 'filterBouncedRecipients', + 'validate_email_addresses': 'validateEmailAddresses' + } + + def __init__(self, to_contacts=None, to_group=None, to=None, _from=None, cc=None, bcc=None, subject=None, reply_to=None, body=None, html=None, is_html=None, charset=None, attachments=None, template_variables=None, template=None, send_strategy=None, use_inbox_name=None, add_tracking_pixel=None, filter_bounced_recipients=None, validate_email_addresses=None, local_vars_configuration=None): # noqa: E501 + """SendEmailOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._to_contacts = None + self._to_group = None + self._to = None + self.__from = None + self._cc = None + self._bcc = None + self._subject = None + self._reply_to = None + self._body = None + self._html = None + self._is_html = None + self._charset = None + self._attachments = None + self._template_variables = None + self._template = None + self._send_strategy = None + self._use_inbox_name = None + self._add_tracking_pixel = None + self._filter_bounced_recipients = None + self._validate_email_addresses = None + self.discriminator = None + + if to_contacts is not None: + self.to_contacts = to_contacts + if to_group is not None: + self.to_group = to_group + if to is not None: + self.to = to + if _from is not None: + self._from = _from + if cc is not None: + self.cc = cc + if bcc is not None: + self.bcc = bcc + if subject is not None: + self.subject = subject + if reply_to is not None: + self.reply_to = reply_to + if body is not None: + self.body = body + if html is not None: + self.html = html + if is_html is not None: + self.is_html = is_html + if charset is not None: + self.charset = charset + if attachments is not None: + self.attachments = attachments + if template_variables is not None: + self.template_variables = template_variables + if template is not None: + self.template = template + if send_strategy is not None: + self.send_strategy = send_strategy + if use_inbox_name is not None: + self.use_inbox_name = use_inbox_name + if add_tracking_pixel is not None: + self.add_tracking_pixel = add_tracking_pixel + if filter_bounced_recipients is not None: + self.filter_bounced_recipients = filter_bounced_recipients + if validate_email_addresses is not None: + self.validate_email_addresses = validate_email_addresses + + @property + def to_contacts(self): + """Gets the to_contacts of this SendEmailOptions. # noqa: E501 + + Optional list of contact IDs to send email to. Manage your contacts via the API or dashboard. When contacts are used the email is sent to each contact separately so they will not see other recipients. # noqa: E501 + + :return: The to_contacts of this SendEmailOptions. # noqa: E501 + :rtype: list[str] + """ + return self._to_contacts + + @to_contacts.setter + def to_contacts(self, to_contacts): + """Sets the to_contacts of this SendEmailOptions. + + Optional list of contact IDs to send email to. Manage your contacts via the API or dashboard. When contacts are used the email is sent to each contact separately so they will not see other recipients. # noqa: E501 + + :param to_contacts: The to_contacts of this SendEmailOptions. # noqa: E501 + :type: list[str] + """ + + self._to_contacts = to_contacts + + @property + def to_group(self): + """Gets the to_group of this SendEmailOptions. # noqa: E501 + + Optional contact group ID to send email to. You can create contacts and contact groups in the API or dashboard and use them for email campaigns. When contact groups are used the email is sent to each contact separately so they will not see other recipients # noqa: E501 + + :return: The to_group of this SendEmailOptions. # noqa: E501 + :rtype: str + """ + return self._to_group + + @to_group.setter + def to_group(self, to_group): + """Sets the to_group of this SendEmailOptions. + + Optional contact group ID to send email to. You can create contacts and contact groups in the API or dashboard and use them for email campaigns. When contact groups are used the email is sent to each contact separately so they will not see other recipients # noqa: E501 + + :param to_group: The to_group of this SendEmailOptions. # noqa: E501 + :type: str + """ + + self._to_group = to_group + + @property + def to(self): + """Gets the to of this SendEmailOptions. # noqa: E501 + + List of destination email addresses. Each email address must be RFC 5322 format. Even single recipients must be in array form. Maximum recipients per email depends on your plan. If you need to send many emails try using contacts or contact groups or use a non standard sendStrategy to ensure that spam filters are not triggered (many recipients in one email can affect your spam rating). Be cautious when sending emails that your recipients exist. High bounce rates (meaning a high percentage of emails cannot be delivered because an address does not exist) can result in account freezing. # noqa: E501 + + :return: The to of this SendEmailOptions. # noqa: E501 + :rtype: list[str] + """ + return self._to + + @to.setter + def to(self, to): + """Sets the to of this SendEmailOptions. + + List of destination email addresses. Each email address must be RFC 5322 format. Even single recipients must be in array form. Maximum recipients per email depends on your plan. If you need to send many emails try using contacts or contact groups or use a non standard sendStrategy to ensure that spam filters are not triggered (many recipients in one email can affect your spam rating). Be cautious when sending emails that your recipients exist. High bounce rates (meaning a high percentage of emails cannot be delivered because an address does not exist) can result in account freezing. # noqa: E501 + + :param to: The to of this SendEmailOptions. # noqa: E501 + :type: list[str] + """ + + self._to = to + + @property + def _from(self): + """Gets the _from of this SendEmailOptions. # noqa: E501 + + Optional from address. Email address is RFC 5322 format and may include a display name and email in angle brackets (`my@address.com` or `My inbox `). If no sender is set the source inbox address will be used for this field. If you set `useInboxName` to `true` the from field will include the inbox name as a display name: `inbox_name `. For this to work use the name field when creating an inbox. Beware of potential spam penalties when setting the from field to an address not used by the inbox. Your emails may get blocked by services if you impersonate another address. To use a custom email addresses use a custom domain. You can create domains with the DomainController. The domain must be verified in the dashboard before it can be used. # noqa: E501 + + :return: The _from of this SendEmailOptions. # noqa: E501 + :rtype: str + """ + return self.__from + + @_from.setter + def _from(self, _from): + """Sets the _from of this SendEmailOptions. + + Optional from address. Email address is RFC 5322 format and may include a display name and email in angle brackets (`my@address.com` or `My inbox `). If no sender is set the source inbox address will be used for this field. If you set `useInboxName` to `true` the from field will include the inbox name as a display name: `inbox_name `. For this to work use the name field when creating an inbox. Beware of potential spam penalties when setting the from field to an address not used by the inbox. Your emails may get blocked by services if you impersonate another address. To use a custom email addresses use a custom domain. You can create domains with the DomainController. The domain must be verified in the dashboard before it can be used. # noqa: E501 + + :param _from: The _from of this SendEmailOptions. # noqa: E501 + :type: str + """ + + self.__from = _from + + @property + def cc(self): + """Gets the cc of this SendEmailOptions. # noqa: E501 + + Optional list of cc destination email addresses # noqa: E501 + + :return: The cc of this SendEmailOptions. # noqa: E501 + :rtype: list[str] + """ + return self._cc + + @cc.setter + def cc(self, cc): + """Sets the cc of this SendEmailOptions. + + Optional list of cc destination email addresses # noqa: E501 + + :param cc: The cc of this SendEmailOptions. # noqa: E501 + :type: list[str] + """ + + self._cc = cc + + @property + def bcc(self): + """Gets the bcc of this SendEmailOptions. # noqa: E501 + + Optional list of bcc destination email addresses # noqa: E501 + + :return: The bcc of this SendEmailOptions. # noqa: E501 + :rtype: list[str] + """ + return self._bcc + + @bcc.setter + def bcc(self, bcc): + """Sets the bcc of this SendEmailOptions. + + Optional list of bcc destination email addresses # noqa: E501 + + :param bcc: The bcc of this SendEmailOptions. # noqa: E501 + :type: list[str] + """ + + self._bcc = bcc + + @property + def subject(self): + """Gets the subject of this SendEmailOptions. # noqa: E501 + + Optional email subject line # noqa: E501 + + :return: The subject of this SendEmailOptions. # noqa: E501 + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this SendEmailOptions. + + Optional email subject line # noqa: E501 + + :param subject: The subject of this SendEmailOptions. # noqa: E501 + :type: str + """ + + self._subject = subject + + @property + def reply_to(self): + """Gets the reply_to of this SendEmailOptions. # noqa: E501 + + Optional replyTo header # noqa: E501 + + :return: The reply_to of this SendEmailOptions. # noqa: E501 + :rtype: str + """ + return self._reply_to + + @reply_to.setter + def reply_to(self, reply_to): + """Sets the reply_to of this SendEmailOptions. + + Optional replyTo header # noqa: E501 + + :param reply_to: The reply_to of this SendEmailOptions. # noqa: E501 + :type: str + """ + + self._reply_to = reply_to + + @property + def body(self): + """Gets the body of this SendEmailOptions. # noqa: E501 + + Optional contents of email. If body contains HTML then set `isHTML` to true to ensure that email clients render it correctly. You can use moustache template syntax in the email body in conjunction with `toGroup` contact variables or `templateVariables` data. If you need more templating control consider creating a template and using the `template` property instead of the body. # noqa: E501 + + :return: The body of this SendEmailOptions. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this SendEmailOptions. + + Optional contents of email. If body contains HTML then set `isHTML` to true to ensure that email clients render it correctly. You can use moustache template syntax in the email body in conjunction with `toGroup` contact variables or `templateVariables` data. If you need more templating control consider creating a template and using the `template` property instead of the body. # noqa: E501 + + :param body: The body of this SendEmailOptions. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def html(self): + """Gets the html of this SendEmailOptions. # noqa: E501 + + Optional HTML flag to indicate that contents is HTML. Set's a `content-type: text/html` for email. (Deprecated: use `isHTML` instead.) # noqa: E501 + + :return: The html of this SendEmailOptions. # noqa: E501 + :rtype: bool + """ + return self._html + + @html.setter + def html(self, html): + """Sets the html of this SendEmailOptions. + + Optional HTML flag to indicate that contents is HTML. Set's a `content-type: text/html` for email. (Deprecated: use `isHTML` instead.) # noqa: E501 + + :param html: The html of this SendEmailOptions. # noqa: E501 + :type: bool + """ + + self._html = html + + @property + def is_html(self): + """Gets the is_html of this SendEmailOptions. # noqa: E501 + + Optional HTML flag. If true the `content-type` of the email will be `text/html`. Set to true when sending HTML to ensure proper rending on email clients # noqa: E501 + + :return: The is_html of this SendEmailOptions. # noqa: E501 + :rtype: bool + """ + return self._is_html + + @is_html.setter + def is_html(self, is_html): + """Sets the is_html of this SendEmailOptions. + + Optional HTML flag. If true the `content-type` of the email will be `text/html`. Set to true when sending HTML to ensure proper rending on email clients # noqa: E501 + + :param is_html: The is_html of this SendEmailOptions. # noqa: E501 + :type: bool + """ + + self._is_html = is_html + + @property + def charset(self): + """Gets the charset of this SendEmailOptions. # noqa: E501 + + Optional charset # noqa: E501 + + :return: The charset of this SendEmailOptions. # noqa: E501 + :rtype: str + """ + return self._charset + + @charset.setter + def charset(self, charset): + """Sets the charset of this SendEmailOptions. + + Optional charset # noqa: E501 + + :param charset: The charset of this SendEmailOptions. # noqa: E501 + :type: str + """ + + self._charset = charset + + @property + def attachments(self): + """Gets the attachments of this SendEmailOptions. # noqa: E501 + + Optional list of attachment IDs to send with this email. You must first upload each attachment separately via method call or dashboard in order to obtain attachment IDs. This way you can reuse attachments with different emails once uploaded. There are several ways to upload that support `multi-part form`, `base64 file encoding`, and octet stream binary uploads. See the `UploadController` for available methods. # noqa: E501 + + :return: The attachments of this SendEmailOptions. # noqa: E501 + :rtype: list[str] + """ + return self._attachments + + @attachments.setter + def attachments(self, attachments): + """Sets the attachments of this SendEmailOptions. + + Optional list of attachment IDs to send with this email. You must first upload each attachment separately via method call or dashboard in order to obtain attachment IDs. This way you can reuse attachments with different emails once uploaded. There are several ways to upload that support `multi-part form`, `base64 file encoding`, and octet stream binary uploads. See the `UploadController` for available methods. # noqa: E501 + + :param attachments: The attachments of this SendEmailOptions. # noqa: E501 + :type: list[str] + """ + + self._attachments = attachments + + @property + def template_variables(self): + """Gets the template_variables of this SendEmailOptions. # noqa: E501 + + Optional map of template variables. Will replace moustache syntax variables in subject and body or template with the associated values if found. # noqa: E501 + + :return: The template_variables of this SendEmailOptions. # noqa: E501 + :rtype: dict(str, object) + """ + return self._template_variables + + @template_variables.setter + def template_variables(self, template_variables): + """Sets the template_variables of this SendEmailOptions. + + Optional map of template variables. Will replace moustache syntax variables in subject and body or template with the associated values if found. # noqa: E501 + + :param template_variables: The template_variables of this SendEmailOptions. # noqa: E501 + :type: dict(str, object) + """ + + self._template_variables = template_variables + + @property + def template(self): + """Gets the template of this SendEmailOptions. # noqa: E501 + + Optional template ID to use for body. Will override body if provided. When using a template make sure you pass the corresponding map of `templateVariables`. You can find which variables are needed by fetching the template itself or viewing it in the dashboard. # noqa: E501 + + :return: The template of this SendEmailOptions. # noqa: E501 + :rtype: str + """ + return self._template + + @template.setter + def template(self, template): + """Sets the template of this SendEmailOptions. + + Optional template ID to use for body. Will override body if provided. When using a template make sure you pass the corresponding map of `templateVariables`. You can find which variables are needed by fetching the template itself or viewing it in the dashboard. # noqa: E501 + + :param template: The template of this SendEmailOptions. # noqa: E501 + :type: str + """ + + self._template = template + + @property + def send_strategy(self): + """Gets the send_strategy of this SendEmailOptions. # noqa: E501 + + How an email should be sent based on its recipients # noqa: E501 + + :return: The send_strategy of this SendEmailOptions. # noqa: E501 + :rtype: str + """ + return self._send_strategy + + @send_strategy.setter + def send_strategy(self, send_strategy): + """Sets the send_strategy of this SendEmailOptions. + + How an email should be sent based on its recipients # noqa: E501 + + :param send_strategy: The send_strategy of this SendEmailOptions. # noqa: E501 + :type: str + """ + allowed_values = ["SINGLE_MESSAGE"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and send_strategy not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `send_strategy` ({0}), must be one of {1}" # noqa: E501 + .format(send_strategy, allowed_values) + ) + + self._send_strategy = send_strategy + + @property + def use_inbox_name(self): + """Gets the use_inbox_name of this SendEmailOptions. # noqa: E501 + + Use name of inbox as sender email address name. Will construct RFC 5322 email address with `Inbox name ` if the inbox has a name. # noqa: E501 + + :return: The use_inbox_name of this SendEmailOptions. # noqa: E501 + :rtype: bool + """ + return self._use_inbox_name + + @use_inbox_name.setter + def use_inbox_name(self, use_inbox_name): + """Sets the use_inbox_name of this SendEmailOptions. + + Use name of inbox as sender email address name. Will construct RFC 5322 email address with `Inbox name ` if the inbox has a name. # noqa: E501 + + :param use_inbox_name: The use_inbox_name of this SendEmailOptions. # noqa: E501 + :type: bool + """ + + self._use_inbox_name = use_inbox_name + + @property + def add_tracking_pixel(self): + """Gets the add_tracking_pixel of this SendEmailOptions. # noqa: E501 + + Add tracking pixel to email # noqa: E501 + + :return: The add_tracking_pixel of this SendEmailOptions. # noqa: E501 + :rtype: bool + """ + return self._add_tracking_pixel + + @add_tracking_pixel.setter + def add_tracking_pixel(self, add_tracking_pixel): + """Sets the add_tracking_pixel of this SendEmailOptions. + + Add tracking pixel to email # noqa: E501 + + :param add_tracking_pixel: The add_tracking_pixel of this SendEmailOptions. # noqa: E501 + :type: bool + """ + + self._add_tracking_pixel = add_tracking_pixel + + @property + def filter_bounced_recipients(self): + """Gets the filter_bounced_recipients of this SendEmailOptions. # noqa: E501 + + Filter recipients to remove any bounced recipients from to, bcc, and cc before sending # noqa: E501 + + :return: The filter_bounced_recipients of this SendEmailOptions. # noqa: E501 + :rtype: bool + """ + return self._filter_bounced_recipients + + @filter_bounced_recipients.setter + def filter_bounced_recipients(self, filter_bounced_recipients): + """Sets the filter_bounced_recipients of this SendEmailOptions. + + Filter recipients to remove any bounced recipients from to, bcc, and cc before sending # noqa: E501 + + :param filter_bounced_recipients: The filter_bounced_recipients of this SendEmailOptions. # noqa: E501 + :type: bool + """ + + self._filter_bounced_recipients = filter_bounced_recipients + + @property + def validate_email_addresses(self): + """Gets the validate_email_addresses of this SendEmailOptions. # noqa: E501 + + Validate recipient email addresses before sending # noqa: E501 + + :return: The validate_email_addresses of this SendEmailOptions. # noqa: E501 + :rtype: str + """ + return self._validate_email_addresses + + @validate_email_addresses.setter + def validate_email_addresses(self, validate_email_addresses): + """Sets the validate_email_addresses of this SendEmailOptions. + + Validate recipient email addresses before sending # noqa: E501 + + :param validate_email_addresses: The validate_email_addresses of this SendEmailOptions. # noqa: E501 + :type: str + """ + allowed_values = ["VALIDATE_FILTER_REMOVE_INVALID", "VALIDATE_ERROR_IF_INVALID", "NO_VALIDATION"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and validate_email_addresses not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `validate_email_addresses` ({0}), must be one of {1}" # noqa: E501 + .format(validate_email_addresses, allowed_values) + ) + + self._validate_email_addresses = validate_email_addresses + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SendEmailOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SendEmailOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/send_smtp_envelope_options.py b/mailslurp_client/models/send_smtp_envelope_options.py new file mode 100644 index 00000000..f08187d1 --- /dev/null +++ b/mailslurp_client/models/send_smtp_envelope_options.py @@ -0,0 +1,176 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class SendSMTPEnvelopeOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'rcpt_to': 'list[str]', + 'mail_from': 'str', + 'data': 'str' + } + + attribute_map = { + 'rcpt_to': 'rcptTo', + 'mail_from': 'mailFrom', + 'data': 'data' + } + + def __init__(self, rcpt_to=None, mail_from=None, data=None, local_vars_configuration=None): # noqa: E501 + """SendSMTPEnvelopeOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._rcpt_to = None + self._mail_from = None + self._data = None + self.discriminator = None + + self.rcpt_to = rcpt_to + self.mail_from = mail_from + self.data = data + + @property + def rcpt_to(self): + """Gets the rcpt_to of this SendSMTPEnvelopeOptions. # noqa: E501 + + + :return: The rcpt_to of this SendSMTPEnvelopeOptions. # noqa: E501 + :rtype: list[str] + """ + return self._rcpt_to + + @rcpt_to.setter + def rcpt_to(self, rcpt_to): + """Sets the rcpt_to of this SendSMTPEnvelopeOptions. + + + :param rcpt_to: The rcpt_to of this SendSMTPEnvelopeOptions. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and rcpt_to is None: # noqa: E501 + raise ValueError("Invalid value for `rcpt_to`, must not be `None`") # noqa: E501 + + self._rcpt_to = rcpt_to + + @property + def mail_from(self): + """Gets the mail_from of this SendSMTPEnvelopeOptions. # noqa: E501 + + + :return: The mail_from of this SendSMTPEnvelopeOptions. # noqa: E501 + :rtype: str + """ + return self._mail_from + + @mail_from.setter + def mail_from(self, mail_from): + """Sets the mail_from of this SendSMTPEnvelopeOptions. + + + :param mail_from: The mail_from of this SendSMTPEnvelopeOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and mail_from is None: # noqa: E501 + raise ValueError("Invalid value for `mail_from`, must not be `None`") # noqa: E501 + + self._mail_from = mail_from + + @property + def data(self): + """Gets the data of this SendSMTPEnvelopeOptions. # noqa: E501 + + + :return: The data of this SendSMTPEnvelopeOptions. # noqa: E501 + :rtype: str + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this SendSMTPEnvelopeOptions. + + + :param data: The data of this SendSMTPEnvelopeOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and data is None: # noqa: E501 + raise ValueError("Invalid value for `data`, must not be `None`") # noqa: E501 + + self._data = data + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SendSMTPEnvelopeOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SendSMTPEnvelopeOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/send_with_queue_result.py b/mailslurp_client/models/send_with_queue_result.py new file mode 100644 index 00000000..9ae26778 --- /dev/null +++ b/mailslurp_client/models/send_with_queue_result.py @@ -0,0 +1,361 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class SendWithQueueResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'user_id': 'str', + 'subject': 'str', + 'inbox_id': 'str', + 'header_id': 'str', + 'delivered': 'bool', + 'exception_name': 'str', + 'message': 'str', + 'created_at': 'datetime', + 'updated_at': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'user_id': 'userId', + 'subject': 'subject', + 'inbox_id': 'inboxId', + 'header_id': 'headerId', + 'delivered': 'delivered', + 'exception_name': 'exceptionName', + 'message': 'message', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt' + } + + def __init__(self, id=None, user_id=None, subject=None, inbox_id=None, header_id=None, delivered=None, exception_name=None, message=None, created_at=None, updated_at=None, local_vars_configuration=None): # noqa: E501 + """SendWithQueueResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._user_id = None + self._subject = None + self._inbox_id = None + self._header_id = None + self._delivered = None + self._exception_name = None + self._message = None + self._created_at = None + self._updated_at = None + self.discriminator = None + + self.id = id + self.user_id = user_id + if subject is not None: + self.subject = subject + if inbox_id is not None: + self.inbox_id = inbox_id + self.header_id = header_id + self.delivered = delivered + if exception_name is not None: + self.exception_name = exception_name + if message is not None: + self.message = message + self.created_at = created_at + self.updated_at = updated_at + + @property + def id(self): + """Gets the id of this SendWithQueueResult. # noqa: E501 + + + :return: The id of this SendWithQueueResult. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this SendWithQueueResult. + + + :param id: The id of this SendWithQueueResult. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def user_id(self): + """Gets the user_id of this SendWithQueueResult. # noqa: E501 + + + :return: The user_id of this SendWithQueueResult. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this SendWithQueueResult. + + + :param user_id: The user_id of this SendWithQueueResult. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def subject(self): + """Gets the subject of this SendWithQueueResult. # noqa: E501 + + + :return: The subject of this SendWithQueueResult. # noqa: E501 + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this SendWithQueueResult. + + + :param subject: The subject of this SendWithQueueResult. # noqa: E501 + :type: str + """ + + self._subject = subject + + @property + def inbox_id(self): + """Gets the inbox_id of this SendWithQueueResult. # noqa: E501 + + + :return: The inbox_id of this SendWithQueueResult. # noqa: E501 + :rtype: str + """ + return self._inbox_id + + @inbox_id.setter + def inbox_id(self, inbox_id): + """Sets the inbox_id of this SendWithQueueResult. + + + :param inbox_id: The inbox_id of this SendWithQueueResult. # noqa: E501 + :type: str + """ + + self._inbox_id = inbox_id + + @property + def header_id(self): + """Gets the header_id of this SendWithQueueResult. # noqa: E501 + + + :return: The header_id of this SendWithQueueResult. # noqa: E501 + :rtype: str + """ + return self._header_id + + @header_id.setter + def header_id(self, header_id): + """Sets the header_id of this SendWithQueueResult. + + + :param header_id: The header_id of this SendWithQueueResult. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and header_id is None: # noqa: E501 + raise ValueError("Invalid value for `header_id`, must not be `None`") # noqa: E501 + + self._header_id = header_id + + @property + def delivered(self): + """Gets the delivered of this SendWithQueueResult. # noqa: E501 + + + :return: The delivered of this SendWithQueueResult. # noqa: E501 + :rtype: bool + """ + return self._delivered + + @delivered.setter + def delivered(self, delivered): + """Sets the delivered of this SendWithQueueResult. + + + :param delivered: The delivered of this SendWithQueueResult. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and delivered is None: # noqa: E501 + raise ValueError("Invalid value for `delivered`, must not be `None`") # noqa: E501 + + self._delivered = delivered + + @property + def exception_name(self): + """Gets the exception_name of this SendWithQueueResult. # noqa: E501 + + + :return: The exception_name of this SendWithQueueResult. # noqa: E501 + :rtype: str + """ + return self._exception_name + + @exception_name.setter + def exception_name(self, exception_name): + """Sets the exception_name of this SendWithQueueResult. + + + :param exception_name: The exception_name of this SendWithQueueResult. # noqa: E501 + :type: str + """ + + self._exception_name = exception_name + + @property + def message(self): + """Gets the message of this SendWithQueueResult. # noqa: E501 + + + :return: The message of this SendWithQueueResult. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this SendWithQueueResult. + + + :param message: The message of this SendWithQueueResult. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def created_at(self): + """Gets the created_at of this SendWithQueueResult. # noqa: E501 + + + :return: The created_at of this SendWithQueueResult. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this SendWithQueueResult. + + + :param created_at: The created_at of this SendWithQueueResult. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + @property + def updated_at(self): + """Gets the updated_at of this SendWithQueueResult. # noqa: E501 + + + :return: The updated_at of this SendWithQueueResult. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this SendWithQueueResult. + + + :param updated_at: The updated_at of this SendWithQueueResult. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and updated_at is None: # noqa: E501 + raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501 + + self._updated_at = updated_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SendWithQueueResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SendWithQueueResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/sender.py b/mailslurp_client/models/sender.py new file mode 100644 index 00000000..118edc8e --- /dev/null +++ b/mailslurp_client/models/sender.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class Sender(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'raw_value': 'str', + 'email_address': 'str', + 'name': 'str' + } + + attribute_map = { + 'raw_value': 'rawValue', + 'email_address': 'emailAddress', + 'name': 'name' + } + + def __init__(self, raw_value=None, email_address=None, name=None, local_vars_configuration=None): # noqa: E501 + """Sender - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._raw_value = None + self._email_address = None + self._name = None + self.discriminator = None + + self.raw_value = raw_value + self.email_address = email_address + if name is not None: + self.name = name + + @property + def raw_value(self): + """Gets the raw_value of this Sender. # noqa: E501 + + + :return: The raw_value of this Sender. # noqa: E501 + :rtype: str + """ + return self._raw_value + + @raw_value.setter + def raw_value(self, raw_value): + """Sets the raw_value of this Sender. + + + :param raw_value: The raw_value of this Sender. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and raw_value is None: # noqa: E501 + raise ValueError("Invalid value for `raw_value`, must not be `None`") # noqa: E501 + + self._raw_value = raw_value + + @property + def email_address(self): + """Gets the email_address of this Sender. # noqa: E501 + + + :return: The email_address of this Sender. # noqa: E501 + :rtype: str + """ + return self._email_address + + @email_address.setter + def email_address(self, email_address): + """Sets the email_address of this Sender. + + + :param email_address: The email_address of this Sender. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and email_address is None: # noqa: E501 + raise ValueError("Invalid value for `email_address`, must not be `None`") # noqa: E501 + + self._email_address = email_address + + @property + def name(self): + """Gets the name of this Sender. # noqa: E501 + + + :return: The name of this Sender. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this Sender. + + + :param name: The name of this Sender. # noqa: E501 + :type: str + """ + + self._name = name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Sender): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Sender): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/sent_email_dto.py b/mailslurp_client/models/sent_email_dto.py new file mode 100644 index 00000000..252b4480 --- /dev/null +++ b/mailslurp_client/models/sent_email_dto.py @@ -0,0 +1,763 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class SentEmailDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'user_id': 'str', + 'inbox_id': 'str', + 'domain_id': 'str', + 'to': 'list[str]', + '_from': 'str', + 'reply_to': 'str', + 'cc': 'list[str]', + 'bcc': 'list[str]', + 'attachments': 'list[str]', + 'subject': 'str', + 'body_md5_hash': 'str', + 'body': 'str', + 'to_contacts': 'list[str]', + 'to_group': 'str', + 'charset': 'str', + 'is_html': 'bool', + 'sent_at': 'datetime', + 'pixel_ids': 'list[str]', + 'message_id': 'str', + 'message_ids': 'list[str]', + 'virtual_send': 'bool', + 'template_id': 'str', + 'template_variables': 'dict(str, object)', + 'html': 'bool' + } + + attribute_map = { + 'id': 'id', + 'user_id': 'userId', + 'inbox_id': 'inboxId', + 'domain_id': 'domainId', + 'to': 'to', + '_from': 'from', + 'reply_to': 'replyTo', + 'cc': 'cc', + 'bcc': 'bcc', + 'attachments': 'attachments', + 'subject': 'subject', + 'body_md5_hash': 'bodyMD5Hash', + 'body': 'body', + 'to_contacts': 'toContacts', + 'to_group': 'toGroup', + 'charset': 'charset', + 'is_html': 'isHTML', + 'sent_at': 'sentAt', + 'pixel_ids': 'pixelIds', + 'message_id': 'messageId', + 'message_ids': 'messageIds', + 'virtual_send': 'virtualSend', + 'template_id': 'templateId', + 'template_variables': 'templateVariables', + 'html': 'html' + } + + def __init__(self, id=None, user_id=None, inbox_id=None, domain_id=None, to=None, _from=None, reply_to=None, cc=None, bcc=None, attachments=None, subject=None, body_md5_hash=None, body=None, to_contacts=None, to_group=None, charset=None, is_html=None, sent_at=None, pixel_ids=None, message_id=None, message_ids=None, virtual_send=None, template_id=None, template_variables=None, html=None, local_vars_configuration=None): # noqa: E501 + """SentEmailDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._user_id = None + self._inbox_id = None + self._domain_id = None + self._to = None + self.__from = None + self._reply_to = None + self._cc = None + self._bcc = None + self._attachments = None + self._subject = None + self._body_md5_hash = None + self._body = None + self._to_contacts = None + self._to_group = None + self._charset = None + self._is_html = None + self._sent_at = None + self._pixel_ids = None + self._message_id = None + self._message_ids = None + self._virtual_send = None + self._template_id = None + self._template_variables = None + self._html = None + self.discriminator = None + + self.id = id + self.user_id = user_id + self.inbox_id = inbox_id + if domain_id is not None: + self.domain_id = domain_id + if to is not None: + self.to = to + if _from is not None: + self._from = _from + if reply_to is not None: + self.reply_to = reply_to + if cc is not None: + self.cc = cc + if bcc is not None: + self.bcc = bcc + if attachments is not None: + self.attachments = attachments + if subject is not None: + self.subject = subject + if body_md5_hash is not None: + self.body_md5_hash = body_md5_hash + if body is not None: + self.body = body + if to_contacts is not None: + self.to_contacts = to_contacts + if to_group is not None: + self.to_group = to_group + if charset is not None: + self.charset = charset + if is_html is not None: + self.is_html = is_html + self.sent_at = sent_at + if pixel_ids is not None: + self.pixel_ids = pixel_ids + if message_id is not None: + self.message_id = message_id + if message_ids is not None: + self.message_ids = message_ids + if virtual_send is not None: + self.virtual_send = virtual_send + if template_id is not None: + self.template_id = template_id + if template_variables is not None: + self.template_variables = template_variables + if html is not None: + self.html = html + + @property + def id(self): + """Gets the id of this SentEmailDto. # noqa: E501 + + ID of sent email # noqa: E501 + + :return: The id of this SentEmailDto. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this SentEmailDto. + + ID of sent email # noqa: E501 + + :param id: The id of this SentEmailDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def user_id(self): + """Gets the user_id of this SentEmailDto. # noqa: E501 + + User ID # noqa: E501 + + :return: The user_id of this SentEmailDto. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this SentEmailDto. + + User ID # noqa: E501 + + :param user_id: The user_id of this SentEmailDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def inbox_id(self): + """Gets the inbox_id of this SentEmailDto. # noqa: E501 + + Inbox ID email was sent from # noqa: E501 + + :return: The inbox_id of this SentEmailDto. # noqa: E501 + :rtype: str + """ + return self._inbox_id + + @inbox_id.setter + def inbox_id(self, inbox_id): + """Sets the inbox_id of this SentEmailDto. + + Inbox ID email was sent from # noqa: E501 + + :param inbox_id: The inbox_id of this SentEmailDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and inbox_id is None: # noqa: E501 + raise ValueError("Invalid value for `inbox_id`, must not be `None`") # noqa: E501 + + self._inbox_id = inbox_id + + @property + def domain_id(self): + """Gets the domain_id of this SentEmailDto. # noqa: E501 + + Domain ID # noqa: E501 + + :return: The domain_id of this SentEmailDto. # noqa: E501 + :rtype: str + """ + return self._domain_id + + @domain_id.setter + def domain_id(self, domain_id): + """Sets the domain_id of this SentEmailDto. + + Domain ID # noqa: E501 + + :param domain_id: The domain_id of this SentEmailDto. # noqa: E501 + :type: str + """ + + self._domain_id = domain_id + + @property + def to(self): + """Gets the to of this SentEmailDto. # noqa: E501 + + Recipients email was sent to # noqa: E501 + + :return: The to of this SentEmailDto. # noqa: E501 + :rtype: list[str] + """ + return self._to + + @to.setter + def to(self, to): + """Sets the to of this SentEmailDto. + + Recipients email was sent to # noqa: E501 + + :param to: The to of this SentEmailDto. # noqa: E501 + :type: list[str] + """ + + self._to = to + + @property + def _from(self): + """Gets the _from of this SentEmailDto. # noqa: E501 + + + :return: The _from of this SentEmailDto. # noqa: E501 + :rtype: str + """ + return self.__from + + @_from.setter + def _from(self, _from): + """Sets the _from of this SentEmailDto. + + + :param _from: The _from of this SentEmailDto. # noqa: E501 + :type: str + """ + + self.__from = _from + + @property + def reply_to(self): + """Gets the reply_to of this SentEmailDto. # noqa: E501 + + + :return: The reply_to of this SentEmailDto. # noqa: E501 + :rtype: str + """ + return self._reply_to + + @reply_to.setter + def reply_to(self, reply_to): + """Sets the reply_to of this SentEmailDto. + + + :param reply_to: The reply_to of this SentEmailDto. # noqa: E501 + :type: str + """ + + self._reply_to = reply_to + + @property + def cc(self): + """Gets the cc of this SentEmailDto. # noqa: E501 + + + :return: The cc of this SentEmailDto. # noqa: E501 + :rtype: list[str] + """ + return self._cc + + @cc.setter + def cc(self, cc): + """Sets the cc of this SentEmailDto. + + + :param cc: The cc of this SentEmailDto. # noqa: E501 + :type: list[str] + """ + + self._cc = cc + + @property + def bcc(self): + """Gets the bcc of this SentEmailDto. # noqa: E501 + + + :return: The bcc of this SentEmailDto. # noqa: E501 + :rtype: list[str] + """ + return self._bcc + + @bcc.setter + def bcc(self, bcc): + """Sets the bcc of this SentEmailDto. + + + :param bcc: The bcc of this SentEmailDto. # noqa: E501 + :type: list[str] + """ + + self._bcc = bcc + + @property + def attachments(self): + """Gets the attachments of this SentEmailDto. # noqa: E501 + + Array of IDs of attachments that were sent with this email # noqa: E501 + + :return: The attachments of this SentEmailDto. # noqa: E501 + :rtype: list[str] + """ + return self._attachments + + @attachments.setter + def attachments(self, attachments): + """Sets the attachments of this SentEmailDto. + + Array of IDs of attachments that were sent with this email # noqa: E501 + + :param attachments: The attachments of this SentEmailDto. # noqa: E501 + :type: list[str] + """ + + self._attachments = attachments + + @property + def subject(self): + """Gets the subject of this SentEmailDto. # noqa: E501 + + + :return: The subject of this SentEmailDto. # noqa: E501 + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this SentEmailDto. + + + :param subject: The subject of this SentEmailDto. # noqa: E501 + :type: str + """ + + self._subject = subject + + @property + def body_md5_hash(self): + """Gets the body_md5_hash of this SentEmailDto. # noqa: E501 + + MD5 Hash # noqa: E501 + + :return: The body_md5_hash of this SentEmailDto. # noqa: E501 + :rtype: str + """ + return self._body_md5_hash + + @body_md5_hash.setter + def body_md5_hash(self, body_md5_hash): + """Sets the body_md5_hash of this SentEmailDto. + + MD5 Hash # noqa: E501 + + :param body_md5_hash: The body_md5_hash of this SentEmailDto. # noqa: E501 + :type: str + """ + + self._body_md5_hash = body_md5_hash + + @property + def body(self): + """Gets the body of this SentEmailDto. # noqa: E501 + + + :return: The body of this SentEmailDto. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this SentEmailDto. + + + :param body: The body of this SentEmailDto. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def to_contacts(self): + """Gets the to_contacts of this SentEmailDto. # noqa: E501 + + + :return: The to_contacts of this SentEmailDto. # noqa: E501 + :rtype: list[str] + """ + return self._to_contacts + + @to_contacts.setter + def to_contacts(self, to_contacts): + """Sets the to_contacts of this SentEmailDto. + + + :param to_contacts: The to_contacts of this SentEmailDto. # noqa: E501 + :type: list[str] + """ + + self._to_contacts = to_contacts + + @property + def to_group(self): + """Gets the to_group of this SentEmailDto. # noqa: E501 + + + :return: The to_group of this SentEmailDto. # noqa: E501 + :rtype: str + """ + return self._to_group + + @to_group.setter + def to_group(self, to_group): + """Sets the to_group of this SentEmailDto. + + + :param to_group: The to_group of this SentEmailDto. # noqa: E501 + :type: str + """ + + self._to_group = to_group + + @property + def charset(self): + """Gets the charset of this SentEmailDto. # noqa: E501 + + + :return: The charset of this SentEmailDto. # noqa: E501 + :rtype: str + """ + return self._charset + + @charset.setter + def charset(self, charset): + """Sets the charset of this SentEmailDto. + + + :param charset: The charset of this SentEmailDto. # noqa: E501 + :type: str + """ + + self._charset = charset + + @property + def is_html(self): + """Gets the is_html of this SentEmailDto. # noqa: E501 + + + :return: The is_html of this SentEmailDto. # noqa: E501 + :rtype: bool + """ + return self._is_html + + @is_html.setter + def is_html(self, is_html): + """Sets the is_html of this SentEmailDto. + + + :param is_html: The is_html of this SentEmailDto. # noqa: E501 + :type: bool + """ + + self._is_html = is_html + + @property + def sent_at(self): + """Gets the sent_at of this SentEmailDto. # noqa: E501 + + + :return: The sent_at of this SentEmailDto. # noqa: E501 + :rtype: datetime + """ + return self._sent_at + + @sent_at.setter + def sent_at(self, sent_at): + """Sets the sent_at of this SentEmailDto. + + + :param sent_at: The sent_at of this SentEmailDto. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and sent_at is None: # noqa: E501 + raise ValueError("Invalid value for `sent_at`, must not be `None`") # noqa: E501 + + self._sent_at = sent_at + + @property + def pixel_ids(self): + """Gets the pixel_ids of this SentEmailDto. # noqa: E501 + + + :return: The pixel_ids of this SentEmailDto. # noqa: E501 + :rtype: list[str] + """ + return self._pixel_ids + + @pixel_ids.setter + def pixel_ids(self, pixel_ids): + """Sets the pixel_ids of this SentEmailDto. + + + :param pixel_ids: The pixel_ids of this SentEmailDto. # noqa: E501 + :type: list[str] + """ + + self._pixel_ids = pixel_ids + + @property + def message_id(self): + """Gets the message_id of this SentEmailDto. # noqa: E501 + + + :return: The message_id of this SentEmailDto. # noqa: E501 + :rtype: str + """ + return self._message_id + + @message_id.setter + def message_id(self, message_id): + """Sets the message_id of this SentEmailDto. + + + :param message_id: The message_id of this SentEmailDto. # noqa: E501 + :type: str + """ + + self._message_id = message_id + + @property + def message_ids(self): + """Gets the message_ids of this SentEmailDto. # noqa: E501 + + + :return: The message_ids of this SentEmailDto. # noqa: E501 + :rtype: list[str] + """ + return self._message_ids + + @message_ids.setter + def message_ids(self, message_ids): + """Sets the message_ids of this SentEmailDto. + + + :param message_ids: The message_ids of this SentEmailDto. # noqa: E501 + :type: list[str] + """ + + self._message_ids = message_ids + + @property + def virtual_send(self): + """Gets the virtual_send of this SentEmailDto. # noqa: E501 + + + :return: The virtual_send of this SentEmailDto. # noqa: E501 + :rtype: bool + """ + return self._virtual_send + + @virtual_send.setter + def virtual_send(self, virtual_send): + """Sets the virtual_send of this SentEmailDto. + + + :param virtual_send: The virtual_send of this SentEmailDto. # noqa: E501 + :type: bool + """ + + self._virtual_send = virtual_send + + @property + def template_id(self): + """Gets the template_id of this SentEmailDto. # noqa: E501 + + + :return: The template_id of this SentEmailDto. # noqa: E501 + :rtype: str + """ + return self._template_id + + @template_id.setter + def template_id(self, template_id): + """Sets the template_id of this SentEmailDto. + + + :param template_id: The template_id of this SentEmailDto. # noqa: E501 + :type: str + """ + + self._template_id = template_id + + @property + def template_variables(self): + """Gets the template_variables of this SentEmailDto. # noqa: E501 + + + :return: The template_variables of this SentEmailDto. # noqa: E501 + :rtype: dict(str, object) + """ + return self._template_variables + + @template_variables.setter + def template_variables(self, template_variables): + """Sets the template_variables of this SentEmailDto. + + + :param template_variables: The template_variables of this SentEmailDto. # noqa: E501 + :type: dict(str, object) + """ + + self._template_variables = template_variables + + @property + def html(self): + """Gets the html of this SentEmailDto. # noqa: E501 + + + :return: The html of this SentEmailDto. # noqa: E501 + :rtype: bool + """ + return self._html + + @html.setter + def html(self, html): + """Sets the html of this SentEmailDto. + + + :param html: The html of this SentEmailDto. # noqa: E501 + :type: bool + """ + + self._html = html + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SentEmailDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SentEmailDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/sent_email_projection.py b/mailslurp_client/models/sent_email_projection.py new file mode 100644 index 00000000..73b3beb7 --- /dev/null +++ b/mailslurp_client/models/sent_email_projection.py @@ -0,0 +1,416 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class SentEmailProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + '_from': 'str', + 'user_id': 'str', + 'subject': 'str', + 'body_md5_hash': 'str', + 'bcc': 'list[str]', + 'cc': 'list[str]', + 'virtual_send': 'bool', + 'inbox_id': 'str', + 'attachments': 'list[str]', + 'to': 'list[str]', + 'created_at': 'datetime' + } + + attribute_map = { + 'id': 'id', + '_from': 'from', + 'user_id': 'userId', + 'subject': 'subject', + 'body_md5_hash': 'bodyMD5Hash', + 'bcc': 'bcc', + 'cc': 'cc', + 'virtual_send': 'virtualSend', + 'inbox_id': 'inboxId', + 'attachments': 'attachments', + 'to': 'to', + 'created_at': 'createdAt' + } + + def __init__(self, id=None, _from=None, user_id=None, subject=None, body_md5_hash=None, bcc=None, cc=None, virtual_send=None, inbox_id=None, attachments=None, to=None, created_at=None, local_vars_configuration=None): # noqa: E501 + """SentEmailProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self.__from = None + self._user_id = None + self._subject = None + self._body_md5_hash = None + self._bcc = None + self._cc = None + self._virtual_send = None + self._inbox_id = None + self._attachments = None + self._to = None + self._created_at = None + self.discriminator = None + + self.id = id + if _from is not None: + self._from = _from + self.user_id = user_id + if subject is not None: + self.subject = subject + if body_md5_hash is not None: + self.body_md5_hash = body_md5_hash + self.bcc = bcc + self.cc = cc + self.virtual_send = virtual_send + self.inbox_id = inbox_id + self.attachments = attachments + self.to = to + self.created_at = created_at + + @property + def id(self): + """Gets the id of this SentEmailProjection. # noqa: E501 + + + :return: The id of this SentEmailProjection. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this SentEmailProjection. + + + :param id: The id of this SentEmailProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def _from(self): + """Gets the _from of this SentEmailProjection. # noqa: E501 + + + :return: The _from of this SentEmailProjection. # noqa: E501 + :rtype: str + """ + return self.__from + + @_from.setter + def _from(self, _from): + """Sets the _from of this SentEmailProjection. + + + :param _from: The _from of this SentEmailProjection. # noqa: E501 + :type: str + """ + + self.__from = _from + + @property + def user_id(self): + """Gets the user_id of this SentEmailProjection. # noqa: E501 + + + :return: The user_id of this SentEmailProjection. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this SentEmailProjection. + + + :param user_id: The user_id of this SentEmailProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def subject(self): + """Gets the subject of this SentEmailProjection. # noqa: E501 + + + :return: The subject of this SentEmailProjection. # noqa: E501 + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this SentEmailProjection. + + + :param subject: The subject of this SentEmailProjection. # noqa: E501 + :type: str + """ + + self._subject = subject + + @property + def body_md5_hash(self): + """Gets the body_md5_hash of this SentEmailProjection. # noqa: E501 + + + :return: The body_md5_hash of this SentEmailProjection. # noqa: E501 + :rtype: str + """ + return self._body_md5_hash + + @body_md5_hash.setter + def body_md5_hash(self, body_md5_hash): + """Sets the body_md5_hash of this SentEmailProjection. + + + :param body_md5_hash: The body_md5_hash of this SentEmailProjection. # noqa: E501 + :type: str + """ + + self._body_md5_hash = body_md5_hash + + @property + def bcc(self): + """Gets the bcc of this SentEmailProjection. # noqa: E501 + + + :return: The bcc of this SentEmailProjection. # noqa: E501 + :rtype: list[str] + """ + return self._bcc + + @bcc.setter + def bcc(self, bcc): + """Sets the bcc of this SentEmailProjection. + + + :param bcc: The bcc of this SentEmailProjection. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and bcc is None: # noqa: E501 + raise ValueError("Invalid value for `bcc`, must not be `None`") # noqa: E501 + + self._bcc = bcc + + @property + def cc(self): + """Gets the cc of this SentEmailProjection. # noqa: E501 + + + :return: The cc of this SentEmailProjection. # noqa: E501 + :rtype: list[str] + """ + return self._cc + + @cc.setter + def cc(self, cc): + """Sets the cc of this SentEmailProjection. + + + :param cc: The cc of this SentEmailProjection. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and cc is None: # noqa: E501 + raise ValueError("Invalid value for `cc`, must not be `None`") # noqa: E501 + + self._cc = cc + + @property + def virtual_send(self): + """Gets the virtual_send of this SentEmailProjection. # noqa: E501 + + + :return: The virtual_send of this SentEmailProjection. # noqa: E501 + :rtype: bool + """ + return self._virtual_send + + @virtual_send.setter + def virtual_send(self, virtual_send): + """Sets the virtual_send of this SentEmailProjection. + + + :param virtual_send: The virtual_send of this SentEmailProjection. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and virtual_send is None: # noqa: E501 + raise ValueError("Invalid value for `virtual_send`, must not be `None`") # noqa: E501 + + self._virtual_send = virtual_send + + @property + def inbox_id(self): + """Gets the inbox_id of this SentEmailProjection. # noqa: E501 + + + :return: The inbox_id of this SentEmailProjection. # noqa: E501 + :rtype: str + """ + return self._inbox_id + + @inbox_id.setter + def inbox_id(self, inbox_id): + """Sets the inbox_id of this SentEmailProjection. + + + :param inbox_id: The inbox_id of this SentEmailProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and inbox_id is None: # noqa: E501 + raise ValueError("Invalid value for `inbox_id`, must not be `None`") # noqa: E501 + + self._inbox_id = inbox_id + + @property + def attachments(self): + """Gets the attachments of this SentEmailProjection. # noqa: E501 + + + :return: The attachments of this SentEmailProjection. # noqa: E501 + :rtype: list[str] + """ + return self._attachments + + @attachments.setter + def attachments(self, attachments): + """Sets the attachments of this SentEmailProjection. + + + :param attachments: The attachments of this SentEmailProjection. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and attachments is None: # noqa: E501 + raise ValueError("Invalid value for `attachments`, must not be `None`") # noqa: E501 + + self._attachments = attachments + + @property + def to(self): + """Gets the to of this SentEmailProjection. # noqa: E501 + + + :return: The to of this SentEmailProjection. # noqa: E501 + :rtype: list[str] + """ + return self._to + + @to.setter + def to(self, to): + """Sets the to of this SentEmailProjection. + + + :param to: The to of this SentEmailProjection. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and to is None: # noqa: E501 + raise ValueError("Invalid value for `to`, must not be `None`") # noqa: E501 + + self._to = to + + @property + def created_at(self): + """Gets the created_at of this SentEmailProjection. # noqa: E501 + + + :return: The created_at of this SentEmailProjection. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this SentEmailProjection. + + + :param created_at: The created_at of this SentEmailProjection. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SentEmailProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SentEmailProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/set_inbox_favourited_options.py b/mailslurp_client/models/set_inbox_favourited_options.py new file mode 100644 index 00000000..fe9183cb --- /dev/null +++ b/mailslurp_client/models/set_inbox_favourited_options.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class SetInboxFavouritedOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'state': 'bool' + } + + attribute_map = { + 'state': 'state' + } + + def __init__(self, state=None, local_vars_configuration=None): # noqa: E501 + """SetInboxFavouritedOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._state = None + self.discriminator = None + + self.state = state + + @property + def state(self): + """Gets the state of this SetInboxFavouritedOptions. # noqa: E501 + + Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering # noqa: E501 + + :return: The state of this SetInboxFavouritedOptions. # noqa: E501 + :rtype: bool + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this SetInboxFavouritedOptions. + + Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering # noqa: E501 + + :param state: The state of this SetInboxFavouritedOptions. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and state is None: # noqa: E501 + raise ValueError("Invalid value for `state`, must not be `None`") # noqa: E501 + + self._state = state + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SetInboxFavouritedOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SetInboxFavouritedOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/simple_send_email_options.py b/mailslurp_client/models/simple_send_email_options.py new file mode 100644 index 00000000..a7735975 --- /dev/null +++ b/mailslurp_client/models/simple_send_email_options.py @@ -0,0 +1,208 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class SimpleSendEmailOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'sender_id': 'str', + 'to': 'str', + 'body': 'str', + 'subject': 'str' + } + + attribute_map = { + 'sender_id': 'senderId', + 'to': 'to', + 'body': 'body', + 'subject': 'subject' + } + + def __init__(self, sender_id=None, to=None, body=None, subject=None, local_vars_configuration=None): # noqa: E501 + """SimpleSendEmailOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._sender_id = None + self._to = None + self._body = None + self._subject = None + self.discriminator = None + + if sender_id is not None: + self.sender_id = sender_id + self.to = to + if body is not None: + self.body = body + if subject is not None: + self.subject = subject + + @property + def sender_id(self): + """Gets the sender_id of this SimpleSendEmailOptions. # noqa: E501 + + ID of inbox to send from. If null an inbox will be created for sending # noqa: E501 + + :return: The sender_id of this SimpleSendEmailOptions. # noqa: E501 + :rtype: str + """ + return self._sender_id + + @sender_id.setter + def sender_id(self, sender_id): + """Sets the sender_id of this SimpleSendEmailOptions. + + ID of inbox to send from. If null an inbox will be created for sending # noqa: E501 + + :param sender_id: The sender_id of this SimpleSendEmailOptions. # noqa: E501 + :type: str + """ + + self._sender_id = sender_id + + @property + def to(self): + """Gets the to of this SimpleSendEmailOptions. # noqa: E501 + + Email address to send to # noqa: E501 + + :return: The to of this SimpleSendEmailOptions. # noqa: E501 + :rtype: str + """ + return self._to + + @to.setter + def to(self, to): + """Sets the to of this SimpleSendEmailOptions. + + Email address to send to # noqa: E501 + + :param to: The to of this SimpleSendEmailOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and to is None: # noqa: E501 + raise ValueError("Invalid value for `to`, must not be `None`") # noqa: E501 + + self._to = to + + @property + def body(self): + """Gets the body of this SimpleSendEmailOptions. # noqa: E501 + + Body of the email message. Supports HTML # noqa: E501 + + :return: The body of this SimpleSendEmailOptions. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this SimpleSendEmailOptions. + + Body of the email message. Supports HTML # noqa: E501 + + :param body: The body of this SimpleSendEmailOptions. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def subject(self): + """Gets the subject of this SimpleSendEmailOptions. # noqa: E501 + + Subject line of the email # noqa: E501 + + :return: The subject of this SimpleSendEmailOptions. # noqa: E501 + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this SimpleSendEmailOptions. + + Subject line of the email # noqa: E501 + + :param subject: The subject of this SimpleSendEmailOptions. # noqa: E501 + :type: str + """ + + self._subject = subject + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SimpleSendEmailOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SimpleSendEmailOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/sms_dto.py b/mailslurp_client/models/sms_dto.py new file mode 100644 index 00000000..df3a3fb6 --- /dev/null +++ b/mailslurp_client/models/sms_dto.py @@ -0,0 +1,311 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class SmsDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'user_id': 'str', + 'phone_number': 'str', + 'from_number': 'str', + 'body': 'str', + 'read': 'bool', + 'created_at': 'datetime', + 'updated_at': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'user_id': 'userId', + 'phone_number': 'phoneNumber', + 'from_number': 'fromNumber', + 'body': 'body', + 'read': 'read', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt' + } + + def __init__(self, id=None, user_id=None, phone_number=None, from_number=None, body=None, read=None, created_at=None, updated_at=None, local_vars_configuration=None): # noqa: E501 + """SmsDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._user_id = None + self._phone_number = None + self._from_number = None + self._body = None + self._read = None + self._created_at = None + self._updated_at = None + self.discriminator = None + + self.id = id + self.user_id = user_id + self.phone_number = phone_number + self.from_number = from_number + self.body = body + self.read = read + self.created_at = created_at + self.updated_at = updated_at + + @property + def id(self): + """Gets the id of this SmsDto. # noqa: E501 + + + :return: The id of this SmsDto. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this SmsDto. + + + :param id: The id of this SmsDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def user_id(self): + """Gets the user_id of this SmsDto. # noqa: E501 + + + :return: The user_id of this SmsDto. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this SmsDto. + + + :param user_id: The user_id of this SmsDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def phone_number(self): + """Gets the phone_number of this SmsDto. # noqa: E501 + + + :return: The phone_number of this SmsDto. # noqa: E501 + :rtype: str + """ + return self._phone_number + + @phone_number.setter + def phone_number(self, phone_number): + """Sets the phone_number of this SmsDto. + + + :param phone_number: The phone_number of this SmsDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and phone_number is None: # noqa: E501 + raise ValueError("Invalid value for `phone_number`, must not be `None`") # noqa: E501 + + self._phone_number = phone_number + + @property + def from_number(self): + """Gets the from_number of this SmsDto. # noqa: E501 + + + :return: The from_number of this SmsDto. # noqa: E501 + :rtype: str + """ + return self._from_number + + @from_number.setter + def from_number(self, from_number): + """Sets the from_number of this SmsDto. + + + :param from_number: The from_number of this SmsDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and from_number is None: # noqa: E501 + raise ValueError("Invalid value for `from_number`, must not be `None`") # noqa: E501 + + self._from_number = from_number + + @property + def body(self): + """Gets the body of this SmsDto. # noqa: E501 + + + :return: The body of this SmsDto. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this SmsDto. + + + :param body: The body of this SmsDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and body is None: # noqa: E501 + raise ValueError("Invalid value for `body`, must not be `None`") # noqa: E501 + + self._body = body + + @property + def read(self): + """Gets the read of this SmsDto. # noqa: E501 + + + :return: The read of this SmsDto. # noqa: E501 + :rtype: bool + """ + return self._read + + @read.setter + def read(self, read): + """Sets the read of this SmsDto. + + + :param read: The read of this SmsDto. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and read is None: # noqa: E501 + raise ValueError("Invalid value for `read`, must not be `None`") # noqa: E501 + + self._read = read + + @property + def created_at(self): + """Gets the created_at of this SmsDto. # noqa: E501 + + + :return: The created_at of this SmsDto. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this SmsDto. + + + :param created_at: The created_at of this SmsDto. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + @property + def updated_at(self): + """Gets the updated_at of this SmsDto. # noqa: E501 + + + :return: The updated_at of this SmsDto. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this SmsDto. + + + :param updated_at: The updated_at of this SmsDto. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and updated_at is None: # noqa: E501 + raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501 + + self._updated_at = updated_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmsDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SmsDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/sms_match_option.py b/mailslurp_client/models/sms_match_option.py new file mode 100644 index 00000000..f27621e4 --- /dev/null +++ b/mailslurp_client/models/sms_match_option.py @@ -0,0 +1,194 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class SmsMatchOption(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'field': 'str', + 'should': 'str', + 'value': 'str' + } + + attribute_map = { + 'field': 'field', + 'should': 'should', + 'value': 'value' + } + + def __init__(self, field=None, should=None, value=None, local_vars_configuration=None): # noqa: E501 + """SmsMatchOption - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._field = None + self._should = None + self._value = None + self.discriminator = None + + self.field = field + self.should = should + self.value = value + + @property + def field(self): + """Gets the field of this SmsMatchOption. # noqa: E501 + + Fields of an SMS object that can be used to filter results # noqa: E501 + + :return: The field of this SmsMatchOption. # noqa: E501 + :rtype: str + """ + return self._field + + @field.setter + def field(self, field): + """Sets the field of this SmsMatchOption. + + Fields of an SMS object that can be used to filter results # noqa: E501 + + :param field: The field of this SmsMatchOption. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and field is None: # noqa: E501 + raise ValueError("Invalid value for `field`, must not be `None`") # noqa: E501 + allowed_values = ["BODY", "FROM"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and field not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `field` ({0}), must be one of {1}" # noqa: E501 + .format(field, allowed_values) + ) + + self._field = field + + @property + def should(self): + """Gets the should of this SmsMatchOption. # noqa: E501 + + How the value of the email field specified should be compared to the value given in the match options. # noqa: E501 + + :return: The should of this SmsMatchOption. # noqa: E501 + :rtype: str + """ + return self._should + + @should.setter + def should(self, should): + """Sets the should of this SmsMatchOption. + + How the value of the email field specified should be compared to the value given in the match options. # noqa: E501 + + :param should: The should of this SmsMatchOption. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and should is None: # noqa: E501 + raise ValueError("Invalid value for `should`, must not be `None`") # noqa: E501 + allowed_values = ["CONTAIN", "EQUAL"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and should not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `should` ({0}), must be one of {1}" # noqa: E501 + .format(should, allowed_values) + ) + + self._should = should + + @property + def value(self): + """Gets the value of this SmsMatchOption. # noqa: E501 + + The value you wish to compare with the value of the field specified using the `should` value passed. For example `BODY` should `CONTAIN` a value passed. # noqa: E501 + + :return: The value of this SmsMatchOption. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this SmsMatchOption. + + The value you wish to compare with the value of the field specified using the `should` value passed. For example `BODY` should `CONTAIN` a value passed. # noqa: E501 + + :param value: The value of this SmsMatchOption. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 + + self._value = value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmsMatchOption): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SmsMatchOption): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/sms_preview.py b/mailslurp_client/models/sms_preview.py new file mode 100644 index 00000000..69ddd07b --- /dev/null +++ b/mailslurp_client/models/sms_preview.py @@ -0,0 +1,257 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class SmsPreview(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'user_id': 'str', + 'body': 'str', + 'phone_number': 'str', + 'from_number': 'str', + 'created_at': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'user_id': 'userId', + 'body': 'body', + 'phone_number': 'phoneNumber', + 'from_number': 'fromNumber', + 'created_at': 'createdAt' + } + + def __init__(self, id=None, user_id=None, body=None, phone_number=None, from_number=None, created_at=None, local_vars_configuration=None): # noqa: E501 + """SmsPreview - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._user_id = None + self._body = None + self._phone_number = None + self._from_number = None + self._created_at = None + self.discriminator = None + + self.id = id + self.user_id = user_id + self.body = body + self.phone_number = phone_number + self.from_number = from_number + self.created_at = created_at + + @property + def id(self): + """Gets the id of this SmsPreview. # noqa: E501 + + + :return: The id of this SmsPreview. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this SmsPreview. + + + :param id: The id of this SmsPreview. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def user_id(self): + """Gets the user_id of this SmsPreview. # noqa: E501 + + + :return: The user_id of this SmsPreview. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this SmsPreview. + + + :param user_id: The user_id of this SmsPreview. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def body(self): + """Gets the body of this SmsPreview. # noqa: E501 + + + :return: The body of this SmsPreview. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this SmsPreview. + + + :param body: The body of this SmsPreview. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and body is None: # noqa: E501 + raise ValueError("Invalid value for `body`, must not be `None`") # noqa: E501 + + self._body = body + + @property + def phone_number(self): + """Gets the phone_number of this SmsPreview. # noqa: E501 + + + :return: The phone_number of this SmsPreview. # noqa: E501 + :rtype: str + """ + return self._phone_number + + @phone_number.setter + def phone_number(self, phone_number): + """Sets the phone_number of this SmsPreview. + + + :param phone_number: The phone_number of this SmsPreview. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and phone_number is None: # noqa: E501 + raise ValueError("Invalid value for `phone_number`, must not be `None`") # noqa: E501 + + self._phone_number = phone_number + + @property + def from_number(self): + """Gets the from_number of this SmsPreview. # noqa: E501 + + + :return: The from_number of this SmsPreview. # noqa: E501 + :rtype: str + """ + return self._from_number + + @from_number.setter + def from_number(self, from_number): + """Sets the from_number of this SmsPreview. + + + :param from_number: The from_number of this SmsPreview. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and from_number is None: # noqa: E501 + raise ValueError("Invalid value for `from_number`, must not be `None`") # noqa: E501 + + self._from_number = from_number + + @property + def created_at(self): + """Gets the created_at of this SmsPreview. # noqa: E501 + + + :return: The created_at of this SmsPreview. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this SmsPreview. + + + :param created_at: The created_at of this SmsPreview. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmsPreview): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SmsPreview): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/sms_projection.py b/mailslurp_client/models/sms_projection.py new file mode 100644 index 00000000..6ab84ceb --- /dev/null +++ b/mailslurp_client/models/sms_projection.py @@ -0,0 +1,284 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class SmsProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'body': 'str', + 'user_id': 'str', + 'phone_number': 'str', + 'created_at': 'datetime', + 'from_number': 'str', + 'read': 'bool' + } + + attribute_map = { + 'id': 'id', + 'body': 'body', + 'user_id': 'userId', + 'phone_number': 'phoneNumber', + 'created_at': 'createdAt', + 'from_number': 'fromNumber', + 'read': 'read' + } + + def __init__(self, id=None, body=None, user_id=None, phone_number=None, created_at=None, from_number=None, read=None, local_vars_configuration=None): # noqa: E501 + """SmsProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._body = None + self._user_id = None + self._phone_number = None + self._created_at = None + self._from_number = None + self._read = None + self.discriminator = None + + self.id = id + self.body = body + self.user_id = user_id + self.phone_number = phone_number + self.created_at = created_at + self.from_number = from_number + self.read = read + + @property + def id(self): + """Gets the id of this SmsProjection. # noqa: E501 + + + :return: The id of this SmsProjection. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this SmsProjection. + + + :param id: The id of this SmsProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def body(self): + """Gets the body of this SmsProjection. # noqa: E501 + + + :return: The body of this SmsProjection. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this SmsProjection. + + + :param body: The body of this SmsProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and body is None: # noqa: E501 + raise ValueError("Invalid value for `body`, must not be `None`") # noqa: E501 + + self._body = body + + @property + def user_id(self): + """Gets the user_id of this SmsProjection. # noqa: E501 + + + :return: The user_id of this SmsProjection. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this SmsProjection. + + + :param user_id: The user_id of this SmsProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def phone_number(self): + """Gets the phone_number of this SmsProjection. # noqa: E501 + + + :return: The phone_number of this SmsProjection. # noqa: E501 + :rtype: str + """ + return self._phone_number + + @phone_number.setter + def phone_number(self, phone_number): + """Sets the phone_number of this SmsProjection. + + + :param phone_number: The phone_number of this SmsProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and phone_number is None: # noqa: E501 + raise ValueError("Invalid value for `phone_number`, must not be `None`") # noqa: E501 + + self._phone_number = phone_number + + @property + def created_at(self): + """Gets the created_at of this SmsProjection. # noqa: E501 + + + :return: The created_at of this SmsProjection. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this SmsProjection. + + + :param created_at: The created_at of this SmsProjection. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + @property + def from_number(self): + """Gets the from_number of this SmsProjection. # noqa: E501 + + + :return: The from_number of this SmsProjection. # noqa: E501 + :rtype: str + """ + return self._from_number + + @from_number.setter + def from_number(self, from_number): + """Sets the from_number of this SmsProjection. + + + :param from_number: The from_number of this SmsProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and from_number is None: # noqa: E501 + raise ValueError("Invalid value for `from_number`, must not be `None`") # noqa: E501 + + self._from_number = from_number + + @property + def read(self): + """Gets the read of this SmsProjection. # noqa: E501 + + + :return: The read of this SmsProjection. # noqa: E501 + :rtype: bool + """ + return self._read + + @read.setter + def read(self, read): + """Sets the read of this SmsProjection. + + + :param read: The read of this SmsProjection. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and read is None: # noqa: E501 + raise ValueError("Invalid value for `read`, must not be `None`") # noqa: E501 + + self._read = read + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SmsProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, SmsProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/sort.py b/mailslurp_client/models/sort.py new file mode 100644 index 00000000..9b7d9ed6 --- /dev/null +++ b/mailslurp_client/models/sort.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class Sort(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'empty': 'bool', + 'sorted': 'bool', + 'unsorted': 'bool' + } + + attribute_map = { + 'empty': 'empty', + 'sorted': 'sorted', + 'unsorted': 'unsorted' + } + + def __init__(self, empty=None, sorted=None, unsorted=None, local_vars_configuration=None): # noqa: E501 + """Sort - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._empty = None + self._sorted = None + self._unsorted = None + self.discriminator = None + + if empty is not None: + self.empty = empty + if sorted is not None: + self.sorted = sorted + if unsorted is not None: + self.unsorted = unsorted + + @property + def empty(self): + """Gets the empty of this Sort. # noqa: E501 + + + :return: The empty of this Sort. # noqa: E501 + :rtype: bool + """ + return self._empty + + @empty.setter + def empty(self, empty): + """Sets the empty of this Sort. + + + :param empty: The empty of this Sort. # noqa: E501 + :type: bool + """ + + self._empty = empty + + @property + def sorted(self): + """Gets the sorted of this Sort. # noqa: E501 + + + :return: The sorted of this Sort. # noqa: E501 + :rtype: bool + """ + return self._sorted + + @sorted.setter + def sorted(self, sorted): + """Sets the sorted of this Sort. + + + :param sorted: The sorted of this Sort. # noqa: E501 + :type: bool + """ + + self._sorted = sorted + + @property + def unsorted(self): + """Gets the unsorted of this Sort. # noqa: E501 + + + :return: The unsorted of this Sort. # noqa: E501 + :rtype: bool + """ + return self._unsorted + + @unsorted.setter + def unsorted(self, unsorted): + """Sets the unsorted of this Sort. + + + :param unsorted: The unsorted of this Sort. # noqa: E501 + :type: bool + """ + + self._unsorted = unsorted + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Sort): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, Sort): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/template_dto.py b/mailslurp_client/models/template_dto.py new file mode 100644 index 00000000..85fcc8a8 --- /dev/null +++ b/mailslurp_client/models/template_dto.py @@ -0,0 +1,240 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class TemplateDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'name': 'str', + 'variables': 'list[TemplateVariable]', + 'content': 'str', + 'created_at': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'variables': 'variables', + 'content': 'content', + 'created_at': 'createdAt' + } + + def __init__(self, id=None, name=None, variables=None, content=None, created_at=None, local_vars_configuration=None): # noqa: E501 + """TemplateDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._name = None + self._variables = None + self._content = None + self._created_at = None + self.discriminator = None + + self.id = id + self.name = name + self.variables = variables + self.content = content + self.created_at = created_at + + @property + def id(self): + """Gets the id of this TemplateDto. # noqa: E501 + + ID of template # noqa: E501 + + :return: The id of this TemplateDto. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this TemplateDto. + + ID of template # noqa: E501 + + :param id: The id of this TemplateDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def name(self): + """Gets the name of this TemplateDto. # noqa: E501 + + Template name # noqa: E501 + + :return: The name of this TemplateDto. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this TemplateDto. + + Template name # noqa: E501 + + :param name: The name of this TemplateDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def variables(self): + """Gets the variables of this TemplateDto. # noqa: E501 + + Variables available in template that can be replaced with values # noqa: E501 + + :return: The variables of this TemplateDto. # noqa: E501 + :rtype: list[TemplateVariable] + """ + return self._variables + + @variables.setter + def variables(self, variables): + """Sets the variables of this TemplateDto. + + Variables available in template that can be replaced with values # noqa: E501 + + :param variables: The variables of this TemplateDto. # noqa: E501 + :type: list[TemplateVariable] + """ + if self.local_vars_configuration.client_side_validation and variables is None: # noqa: E501 + raise ValueError("Invalid value for `variables`, must not be `None`") # noqa: E501 + + self._variables = variables + + @property + def content(self): + """Gets the content of this TemplateDto. # noqa: E501 + + Content of the template # noqa: E501 + + :return: The content of this TemplateDto. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this TemplateDto. + + Content of the template # noqa: E501 + + :param content: The content of this TemplateDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and content is None: # noqa: E501 + raise ValueError("Invalid value for `content`, must not be `None`") # noqa: E501 + + self._content = content + + @property + def created_at(self): + """Gets the created_at of this TemplateDto. # noqa: E501 + + Created at time # noqa: E501 + + :return: The created_at of this TemplateDto. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this TemplateDto. + + Created at time # noqa: E501 + + :param created_at: The created_at of this TemplateDto. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TemplateDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TemplateDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/template_preview.py b/mailslurp_client/models/template_preview.py new file mode 100644 index 00000000..44ce8a6b --- /dev/null +++ b/mailslurp_client/models/template_preview.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class TemplatePreview(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'preview': 'str' + } + + attribute_map = { + 'preview': 'preview' + } + + def __init__(self, preview=None, local_vars_configuration=None): # noqa: E501 + """TemplatePreview - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._preview = None + self.discriminator = None + + self.preview = preview + + @property + def preview(self): + """Gets the preview of this TemplatePreview. # noqa: E501 + + + :return: The preview of this TemplatePreview. # noqa: E501 + :rtype: str + """ + return self._preview + + @preview.setter + def preview(self, preview): + """Sets the preview of this TemplatePreview. + + + :param preview: The preview of this TemplatePreview. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and preview is None: # noqa: E501 + raise ValueError("Invalid value for `preview`, must not be `None`") # noqa: E501 + + self._preview = preview + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TemplatePreview): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TemplatePreview): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/template_projection.py b/mailslurp_client/models/template_projection.py new file mode 100644 index 00000000..bd9ba695 --- /dev/null +++ b/mailslurp_client/models/template_projection.py @@ -0,0 +1,230 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class TemplateProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'id': 'str', + 'variables': 'list[str]', + 'created_at': 'datetime', + 'updated_at': 'datetime' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'variables': 'variables', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt' + } + + def __init__(self, name=None, id=None, variables=None, created_at=None, updated_at=None, local_vars_configuration=None): # noqa: E501 + """TemplateProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._id = None + self._variables = None + self._created_at = None + self._updated_at = None + self.discriminator = None + + self.name = name + self.id = id + self.variables = variables + self.created_at = created_at + self.updated_at = updated_at + + @property + def name(self): + """Gets the name of this TemplateProjection. # noqa: E501 + + + :return: The name of this TemplateProjection. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this TemplateProjection. + + + :param name: The name of this TemplateProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def id(self): + """Gets the id of this TemplateProjection. # noqa: E501 + + + :return: The id of this TemplateProjection. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this TemplateProjection. + + + :param id: The id of this TemplateProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def variables(self): + """Gets the variables of this TemplateProjection. # noqa: E501 + + + :return: The variables of this TemplateProjection. # noqa: E501 + :rtype: list[str] + """ + return self._variables + + @variables.setter + def variables(self, variables): + """Sets the variables of this TemplateProjection. + + + :param variables: The variables of this TemplateProjection. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and variables is None: # noqa: E501 + raise ValueError("Invalid value for `variables`, must not be `None`") # noqa: E501 + + self._variables = variables + + @property + def created_at(self): + """Gets the created_at of this TemplateProjection. # noqa: E501 + + + :return: The created_at of this TemplateProjection. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this TemplateProjection. + + + :param created_at: The created_at of this TemplateProjection. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + @property + def updated_at(self): + """Gets the updated_at of this TemplateProjection. # noqa: E501 + + + :return: The updated_at of this TemplateProjection. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this TemplateProjection. + + + :param updated_at: The updated_at of this TemplateProjection. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and updated_at is None: # noqa: E501 + raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501 + + self._updated_at = updated_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TemplateProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TemplateProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/template_variable.py b/mailslurp_client/models/template_variable.py new file mode 100644 index 00000000..a1033b4a --- /dev/null +++ b/mailslurp_client/models/template_variable.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class TemplateVariable(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'variable_type': 'str' + } + + attribute_map = { + 'name': 'name', + 'variable_type': 'variableType' + } + + def __init__(self, name=None, variable_type=None, local_vars_configuration=None): # noqa: E501 + """TemplateVariable - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._variable_type = None + self.discriminator = None + + self.name = name + self.variable_type = variable_type + + @property + def name(self): + """Gets the name of this TemplateVariable. # noqa: E501 + + Name of variable. This can be used in a template as {{name}} # noqa: E501 + + :return: The name of this TemplateVariable. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this TemplateVariable. + + Name of variable. This can be used in a template as {{name}} # noqa: E501 + + :param name: The name of this TemplateVariable. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def variable_type(self): + """Gets the variable_type of this TemplateVariable. # noqa: E501 + + The type of variable # noqa: E501 + + :return: The variable_type of this TemplateVariable. # noqa: E501 + :rtype: str + """ + return self._variable_type + + @variable_type.setter + def variable_type(self, variable_type): + """Sets the variable_type of this TemplateVariable. + + The type of variable # noqa: E501 + + :param variable_type: The variable_type of this TemplateVariable. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and variable_type is None: # noqa: E501 + raise ValueError("Invalid value for `variable_type`, must not be `None`") # noqa: E501 + allowed_values = ["STRING"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and variable_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `variable_type` ({0}), must be one of {1}" # noqa: E501 + .format(variable_type, allowed_values) + ) + + self._variable_type = variable_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TemplateVariable): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TemplateVariable): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/test_new_inbox_forwarder_options.py b/mailslurp_client/models/test_new_inbox_forwarder_options.py new file mode 100644 index 00000000..c75ba359 --- /dev/null +++ b/mailslurp_client/models/test_new_inbox_forwarder_options.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class TestNewInboxForwarderOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'inbox_forwarder_test_options': 'InboxForwarderTestOptions', + 'create_inbox_forwarder_options': 'CreateInboxForwarderOptions' + } + + attribute_map = { + 'inbox_forwarder_test_options': 'inboxForwarderTestOptions', + 'create_inbox_forwarder_options': 'createInboxForwarderOptions' + } + + def __init__(self, inbox_forwarder_test_options=None, create_inbox_forwarder_options=None, local_vars_configuration=None): # noqa: E501 + """TestNewInboxForwarderOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._inbox_forwarder_test_options = None + self._create_inbox_forwarder_options = None + self.discriminator = None + + self.inbox_forwarder_test_options = inbox_forwarder_test_options + self.create_inbox_forwarder_options = create_inbox_forwarder_options + + @property + def inbox_forwarder_test_options(self): + """Gets the inbox_forwarder_test_options of this TestNewInboxForwarderOptions. # noqa: E501 + + + :return: The inbox_forwarder_test_options of this TestNewInboxForwarderOptions. # noqa: E501 + :rtype: InboxForwarderTestOptions + """ + return self._inbox_forwarder_test_options + + @inbox_forwarder_test_options.setter + def inbox_forwarder_test_options(self, inbox_forwarder_test_options): + """Sets the inbox_forwarder_test_options of this TestNewInboxForwarderOptions. + + + :param inbox_forwarder_test_options: The inbox_forwarder_test_options of this TestNewInboxForwarderOptions. # noqa: E501 + :type: InboxForwarderTestOptions + """ + if self.local_vars_configuration.client_side_validation and inbox_forwarder_test_options is None: # noqa: E501 + raise ValueError("Invalid value for `inbox_forwarder_test_options`, must not be `None`") # noqa: E501 + + self._inbox_forwarder_test_options = inbox_forwarder_test_options + + @property + def create_inbox_forwarder_options(self): + """Gets the create_inbox_forwarder_options of this TestNewInboxForwarderOptions. # noqa: E501 + + + :return: The create_inbox_forwarder_options of this TestNewInboxForwarderOptions. # noqa: E501 + :rtype: CreateInboxForwarderOptions + """ + return self._create_inbox_forwarder_options + + @create_inbox_forwarder_options.setter + def create_inbox_forwarder_options(self, create_inbox_forwarder_options): + """Sets the create_inbox_forwarder_options of this TestNewInboxForwarderOptions. + + + :param create_inbox_forwarder_options: The create_inbox_forwarder_options of this TestNewInboxForwarderOptions. # noqa: E501 + :type: CreateInboxForwarderOptions + """ + if self.local_vars_configuration.client_side_validation and create_inbox_forwarder_options is None: # noqa: E501 + raise ValueError("Invalid value for `create_inbox_forwarder_options`, must not be `None`") # noqa: E501 + + self._create_inbox_forwarder_options = create_inbox_forwarder_options + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TestNewInboxForwarderOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TestNewInboxForwarderOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/test_new_inbox_ruleset_options.py b/mailslurp_client/models/test_new_inbox_ruleset_options.py new file mode 100644 index 00000000..f27967f3 --- /dev/null +++ b/mailslurp_client/models/test_new_inbox_ruleset_options.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class TestNewInboxRulesetOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'inbox_ruleset_test_options': 'InboxRulesetTestOptions', + 'create_inbox_ruleset_options': 'CreateInboxRulesetOptions' + } + + attribute_map = { + 'inbox_ruleset_test_options': 'inboxRulesetTestOptions', + 'create_inbox_ruleset_options': 'createInboxRulesetOptions' + } + + def __init__(self, inbox_ruleset_test_options=None, create_inbox_ruleset_options=None, local_vars_configuration=None): # noqa: E501 + """TestNewInboxRulesetOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._inbox_ruleset_test_options = None + self._create_inbox_ruleset_options = None + self.discriminator = None + + self.inbox_ruleset_test_options = inbox_ruleset_test_options + self.create_inbox_ruleset_options = create_inbox_ruleset_options + + @property + def inbox_ruleset_test_options(self): + """Gets the inbox_ruleset_test_options of this TestNewInboxRulesetOptions. # noqa: E501 + + + :return: The inbox_ruleset_test_options of this TestNewInboxRulesetOptions. # noqa: E501 + :rtype: InboxRulesetTestOptions + """ + return self._inbox_ruleset_test_options + + @inbox_ruleset_test_options.setter + def inbox_ruleset_test_options(self, inbox_ruleset_test_options): + """Sets the inbox_ruleset_test_options of this TestNewInboxRulesetOptions. + + + :param inbox_ruleset_test_options: The inbox_ruleset_test_options of this TestNewInboxRulesetOptions. # noqa: E501 + :type: InboxRulesetTestOptions + """ + if self.local_vars_configuration.client_side_validation and inbox_ruleset_test_options is None: # noqa: E501 + raise ValueError("Invalid value for `inbox_ruleset_test_options`, must not be `None`") # noqa: E501 + + self._inbox_ruleset_test_options = inbox_ruleset_test_options + + @property + def create_inbox_ruleset_options(self): + """Gets the create_inbox_ruleset_options of this TestNewInboxRulesetOptions. # noqa: E501 + + + :return: The create_inbox_ruleset_options of this TestNewInboxRulesetOptions. # noqa: E501 + :rtype: CreateInboxRulesetOptions + """ + return self._create_inbox_ruleset_options + + @create_inbox_ruleset_options.setter + def create_inbox_ruleset_options(self, create_inbox_ruleset_options): + """Sets the create_inbox_ruleset_options of this TestNewInboxRulesetOptions. + + + :param create_inbox_ruleset_options: The create_inbox_ruleset_options of this TestNewInboxRulesetOptions. # noqa: E501 + :type: CreateInboxRulesetOptions + """ + if self.local_vars_configuration.client_side_validation and create_inbox_ruleset_options is None: # noqa: E501 + raise ValueError("Invalid value for `create_inbox_ruleset_options`, must not be `None`") # noqa: E501 + + self._create_inbox_ruleset_options = create_inbox_ruleset_options + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TestNewInboxRulesetOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TestNewInboxRulesetOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/test_phone_number_options.py b/mailslurp_client/models/test_phone_number_options.py new file mode 100644 index 00000000..b6ce6b5c --- /dev/null +++ b/mailslurp_client/models/test_phone_number_options.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class TestPhoneNumberOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'message': 'str' + } + + attribute_map = { + 'message': 'message' + } + + def __init__(self, message=None, local_vars_configuration=None): # noqa: E501 + """TestPhoneNumberOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._message = None + self.discriminator = None + + self.message = message + + @property + def message(self): + """Gets the message of this TestPhoneNumberOptions. # noqa: E501 + + + :return: The message of this TestPhoneNumberOptions. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this TestPhoneNumberOptions. + + + :param message: The message of this TestPhoneNumberOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message is None: # noqa: E501 + raise ValueError("Invalid value for `message`, must not be `None`") # noqa: E501 + + self._message = message + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TestPhoneNumberOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TestPhoneNumberOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/thread_projection.py b/mailslurp_client/models/thread_projection.py new file mode 100644 index 00000000..55d2c93b --- /dev/null +++ b/mailslurp_client/models/thread_projection.py @@ -0,0 +1,410 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class ThreadProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'id': 'str', + 'subject': 'str', + 'inbox_id': 'str', + 'user_id': 'str', + 'to': 'list[str]', + 'bcc': 'list[str]', + 'cc': 'list[str]', + 'created_at': 'datetime', + 'updated_at': 'datetime', + 'alias_id': 'str' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'subject': 'subject', + 'inbox_id': 'inboxId', + 'user_id': 'userId', + 'to': 'to', + 'bcc': 'bcc', + 'cc': 'cc', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt', + 'alias_id': 'aliasId' + } + + def __init__(self, name=None, id=None, subject=None, inbox_id=None, user_id=None, to=None, bcc=None, cc=None, created_at=None, updated_at=None, alias_id=None, local_vars_configuration=None): # noqa: E501 + """ThreadProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._id = None + self._subject = None + self._inbox_id = None + self._user_id = None + self._to = None + self._bcc = None + self._cc = None + self._created_at = None + self._updated_at = None + self._alias_id = None + self.discriminator = None + + if name is not None: + self.name = name + self.id = id + if subject is not None: + self.subject = subject + self.inbox_id = inbox_id + self.user_id = user_id + self.to = to + if bcc is not None: + self.bcc = bcc + if cc is not None: + self.cc = cc + self.created_at = created_at + self.updated_at = updated_at + self.alias_id = alias_id + + @property + def name(self): + """Gets the name of this ThreadProjection. # noqa: E501 + + Name of thread # noqa: E501 + + :return: The name of this ThreadProjection. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ThreadProjection. + + Name of thread # noqa: E501 + + :param name: The name of this ThreadProjection. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def id(self): + """Gets the id of this ThreadProjection. # noqa: E501 + + ID of email thread # noqa: E501 + + :return: The id of this ThreadProjection. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this ThreadProjection. + + ID of email thread # noqa: E501 + + :param id: The id of this ThreadProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def subject(self): + """Gets the subject of this ThreadProjection. # noqa: E501 + + Thread subject # noqa: E501 + + :return: The subject of this ThreadProjection. # noqa: E501 + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this ThreadProjection. + + Thread subject # noqa: E501 + + :param subject: The subject of this ThreadProjection. # noqa: E501 + :type: str + """ + + self._subject = subject + + @property + def inbox_id(self): + """Gets the inbox_id of this ThreadProjection. # noqa: E501 + + Inbox ID # noqa: E501 + + :return: The inbox_id of this ThreadProjection. # noqa: E501 + :rtype: str + """ + return self._inbox_id + + @inbox_id.setter + def inbox_id(self, inbox_id): + """Sets the inbox_id of this ThreadProjection. + + Inbox ID # noqa: E501 + + :param inbox_id: The inbox_id of this ThreadProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and inbox_id is None: # noqa: E501 + raise ValueError("Invalid value for `inbox_id`, must not be `None`") # noqa: E501 + + self._inbox_id = inbox_id + + @property + def user_id(self): + """Gets the user_id of this ThreadProjection. # noqa: E501 + + User ID # noqa: E501 + + :return: The user_id of this ThreadProjection. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this ThreadProjection. + + User ID # noqa: E501 + + :param user_id: The user_id of this ThreadProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def to(self): + """Gets the to of this ThreadProjection. # noqa: E501 + + To recipients # noqa: E501 + + :return: The to of this ThreadProjection. # noqa: E501 + :rtype: list[str] + """ + return self._to + + @to.setter + def to(self, to): + """Sets the to of this ThreadProjection. + + To recipients # noqa: E501 + + :param to: The to of this ThreadProjection. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and to is None: # noqa: E501 + raise ValueError("Invalid value for `to`, must not be `None`") # noqa: E501 + + self._to = to + + @property + def bcc(self): + """Gets the bcc of this ThreadProjection. # noqa: E501 + + BCC recipients # noqa: E501 + + :return: The bcc of this ThreadProjection. # noqa: E501 + :rtype: list[str] + """ + return self._bcc + + @bcc.setter + def bcc(self, bcc): + """Sets the bcc of this ThreadProjection. + + BCC recipients # noqa: E501 + + :param bcc: The bcc of this ThreadProjection. # noqa: E501 + :type: list[str] + """ + + self._bcc = bcc + + @property + def cc(self): + """Gets the cc of this ThreadProjection. # noqa: E501 + + CC recipients # noqa: E501 + + :return: The cc of this ThreadProjection. # noqa: E501 + :rtype: list[str] + """ + return self._cc + + @cc.setter + def cc(self, cc): + """Sets the cc of this ThreadProjection. + + CC recipients # noqa: E501 + + :param cc: The cc of this ThreadProjection. # noqa: E501 + :type: list[str] + """ + + self._cc = cc + + @property + def created_at(self): + """Gets the created_at of this ThreadProjection. # noqa: E501 + + Created at DateTime # noqa: E501 + + :return: The created_at of this ThreadProjection. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this ThreadProjection. + + Created at DateTime # noqa: E501 + + :param created_at: The created_at of this ThreadProjection. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + @property + def updated_at(self): + """Gets the updated_at of this ThreadProjection. # noqa: E501 + + Updated at DateTime # noqa: E501 + + :return: The updated_at of this ThreadProjection. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this ThreadProjection. + + Updated at DateTime # noqa: E501 + + :param updated_at: The updated_at of this ThreadProjection. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and updated_at is None: # noqa: E501 + raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501 + + self._updated_at = updated_at + + @property + def alias_id(self): + """Gets the alias_id of this ThreadProjection. # noqa: E501 + + Alias ID # noqa: E501 + + :return: The alias_id of this ThreadProjection. # noqa: E501 + :rtype: str + """ + return self._alias_id + + @alias_id.setter + def alias_id(self, alias_id): + """Sets the alias_id of this ThreadProjection. + + Alias ID # noqa: E501 + + :param alias_id: The alias_id of this ThreadProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and alias_id is None: # noqa: E501 + raise ValueError("Invalid value for `alias_id`, must not be `None`") # noqa: E501 + + self._alias_id = alias_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ThreadProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ThreadProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/tracking_pixel_dto.py b/mailslurp_client/models/tracking_pixel_dto.py new file mode 100644 index 00000000..dc8309b7 --- /dev/null +++ b/mailslurp_client/models/tracking_pixel_dto.py @@ -0,0 +1,334 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class TrackingPixelDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'seen': 'bool', + 'recipient': 'str', + 'html': 'str', + 'url': 'str', + 'inbox_id': 'str', + 'sent_email_id': 'str', + 'seen_at': 'datetime', + 'created_at': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'seen': 'seen', + 'recipient': 'recipient', + 'html': 'html', + 'url': 'url', + 'inbox_id': 'inboxId', + 'sent_email_id': 'sentEmailId', + 'seen_at': 'seenAt', + 'created_at': 'createdAt' + } + + def __init__(self, id=None, seen=None, recipient=None, html=None, url=None, inbox_id=None, sent_email_id=None, seen_at=None, created_at=None, local_vars_configuration=None): # noqa: E501 + """TrackingPixelDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._seen = None + self._recipient = None + self._html = None + self._url = None + self._inbox_id = None + self._sent_email_id = None + self._seen_at = None + self._created_at = None + self.discriminator = None + + self.id = id + self.seen = seen + if recipient is not None: + self.recipient = recipient + self.html = html + self.url = url + if inbox_id is not None: + self.inbox_id = inbox_id + if sent_email_id is not None: + self.sent_email_id = sent_email_id + if seen_at is not None: + self.seen_at = seen_at + self.created_at = created_at + + @property + def id(self): + """Gets the id of this TrackingPixelDto. # noqa: E501 + + + :return: The id of this TrackingPixelDto. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this TrackingPixelDto. + + + :param id: The id of this TrackingPixelDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def seen(self): + """Gets the seen of this TrackingPixelDto. # noqa: E501 + + + :return: The seen of this TrackingPixelDto. # noqa: E501 + :rtype: bool + """ + return self._seen + + @seen.setter + def seen(self, seen): + """Sets the seen of this TrackingPixelDto. + + + :param seen: The seen of this TrackingPixelDto. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and seen is None: # noqa: E501 + raise ValueError("Invalid value for `seen`, must not be `None`") # noqa: E501 + + self._seen = seen + + @property + def recipient(self): + """Gets the recipient of this TrackingPixelDto. # noqa: E501 + + + :return: The recipient of this TrackingPixelDto. # noqa: E501 + :rtype: str + """ + return self._recipient + + @recipient.setter + def recipient(self, recipient): + """Sets the recipient of this TrackingPixelDto. + + + :param recipient: The recipient of this TrackingPixelDto. # noqa: E501 + :type: str + """ + + self._recipient = recipient + + @property + def html(self): + """Gets the html of this TrackingPixelDto. # noqa: E501 + + + :return: The html of this TrackingPixelDto. # noqa: E501 + :rtype: str + """ + return self._html + + @html.setter + def html(self, html): + """Sets the html of this TrackingPixelDto. + + + :param html: The html of this TrackingPixelDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and html is None: # noqa: E501 + raise ValueError("Invalid value for `html`, must not be `None`") # noqa: E501 + + self._html = html + + @property + def url(self): + """Gets the url of this TrackingPixelDto. # noqa: E501 + + + :return: The url of this TrackingPixelDto. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this TrackingPixelDto. + + + :param url: The url of this TrackingPixelDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and url is None: # noqa: E501 + raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501 + + self._url = url + + @property + def inbox_id(self): + """Gets the inbox_id of this TrackingPixelDto. # noqa: E501 + + + :return: The inbox_id of this TrackingPixelDto. # noqa: E501 + :rtype: str + """ + return self._inbox_id + + @inbox_id.setter + def inbox_id(self, inbox_id): + """Sets the inbox_id of this TrackingPixelDto. + + + :param inbox_id: The inbox_id of this TrackingPixelDto. # noqa: E501 + :type: str + """ + + self._inbox_id = inbox_id + + @property + def sent_email_id(self): + """Gets the sent_email_id of this TrackingPixelDto. # noqa: E501 + + + :return: The sent_email_id of this TrackingPixelDto. # noqa: E501 + :rtype: str + """ + return self._sent_email_id + + @sent_email_id.setter + def sent_email_id(self, sent_email_id): + """Sets the sent_email_id of this TrackingPixelDto. + + + :param sent_email_id: The sent_email_id of this TrackingPixelDto. # noqa: E501 + :type: str + """ + + self._sent_email_id = sent_email_id + + @property + def seen_at(self): + """Gets the seen_at of this TrackingPixelDto. # noqa: E501 + + + :return: The seen_at of this TrackingPixelDto. # noqa: E501 + :rtype: datetime + """ + return self._seen_at + + @seen_at.setter + def seen_at(self, seen_at): + """Sets the seen_at of this TrackingPixelDto. + + + :param seen_at: The seen_at of this TrackingPixelDto. # noqa: E501 + :type: datetime + """ + + self._seen_at = seen_at + + @property + def created_at(self): + """Gets the created_at of this TrackingPixelDto. # noqa: E501 + + + :return: The created_at of this TrackingPixelDto. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this TrackingPixelDto. + + + :param created_at: The created_at of this TrackingPixelDto. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TrackingPixelDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TrackingPixelDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/tracking_pixel_projection.py b/mailslurp_client/models/tracking_pixel_projection.py new file mode 100644 index 00000000..0d1ec1a4 --- /dev/null +++ b/mailslurp_client/models/tracking_pixel_projection.py @@ -0,0 +1,333 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class TrackingPixelProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'id': 'str', + 'inbox_id': 'str', + 'user_id': 'str', + 'sent_email_id': 'str', + 'created_at': 'datetime', + 'recipient': 'str', + 'seen': 'bool', + 'seen_at': 'datetime' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'inbox_id': 'inboxId', + 'user_id': 'userId', + 'sent_email_id': 'sentEmailId', + 'created_at': 'createdAt', + 'recipient': 'recipient', + 'seen': 'seen', + 'seen_at': 'seenAt' + } + + def __init__(self, name=None, id=None, inbox_id=None, user_id=None, sent_email_id=None, created_at=None, recipient=None, seen=None, seen_at=None, local_vars_configuration=None): # noqa: E501 + """TrackingPixelProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._id = None + self._inbox_id = None + self._user_id = None + self._sent_email_id = None + self._created_at = None + self._recipient = None + self._seen = None + self._seen_at = None + self.discriminator = None + + if name is not None: + self.name = name + self.id = id + if inbox_id is not None: + self.inbox_id = inbox_id + self.user_id = user_id + if sent_email_id is not None: + self.sent_email_id = sent_email_id + self.created_at = created_at + if recipient is not None: + self.recipient = recipient + self.seen = seen + if seen_at is not None: + self.seen_at = seen_at + + @property + def name(self): + """Gets the name of this TrackingPixelProjection. # noqa: E501 + + + :return: The name of this TrackingPixelProjection. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this TrackingPixelProjection. + + + :param name: The name of this TrackingPixelProjection. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def id(self): + """Gets the id of this TrackingPixelProjection. # noqa: E501 + + + :return: The id of this TrackingPixelProjection. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this TrackingPixelProjection. + + + :param id: The id of this TrackingPixelProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def inbox_id(self): + """Gets the inbox_id of this TrackingPixelProjection. # noqa: E501 + + + :return: The inbox_id of this TrackingPixelProjection. # noqa: E501 + :rtype: str + """ + return self._inbox_id + + @inbox_id.setter + def inbox_id(self, inbox_id): + """Sets the inbox_id of this TrackingPixelProjection. + + + :param inbox_id: The inbox_id of this TrackingPixelProjection. # noqa: E501 + :type: str + """ + + self._inbox_id = inbox_id + + @property + def user_id(self): + """Gets the user_id of this TrackingPixelProjection. # noqa: E501 + + + :return: The user_id of this TrackingPixelProjection. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this TrackingPixelProjection. + + + :param user_id: The user_id of this TrackingPixelProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def sent_email_id(self): + """Gets the sent_email_id of this TrackingPixelProjection. # noqa: E501 + + + :return: The sent_email_id of this TrackingPixelProjection. # noqa: E501 + :rtype: str + """ + return self._sent_email_id + + @sent_email_id.setter + def sent_email_id(self, sent_email_id): + """Sets the sent_email_id of this TrackingPixelProjection. + + + :param sent_email_id: The sent_email_id of this TrackingPixelProjection. # noqa: E501 + :type: str + """ + + self._sent_email_id = sent_email_id + + @property + def created_at(self): + """Gets the created_at of this TrackingPixelProjection. # noqa: E501 + + + :return: The created_at of this TrackingPixelProjection. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this TrackingPixelProjection. + + + :param created_at: The created_at of this TrackingPixelProjection. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + @property + def recipient(self): + """Gets the recipient of this TrackingPixelProjection. # noqa: E501 + + + :return: The recipient of this TrackingPixelProjection. # noqa: E501 + :rtype: str + """ + return self._recipient + + @recipient.setter + def recipient(self, recipient): + """Sets the recipient of this TrackingPixelProjection. + + + :param recipient: The recipient of this TrackingPixelProjection. # noqa: E501 + :type: str + """ + + self._recipient = recipient + + @property + def seen(self): + """Gets the seen of this TrackingPixelProjection. # noqa: E501 + + + :return: The seen of this TrackingPixelProjection. # noqa: E501 + :rtype: bool + """ + return self._seen + + @seen.setter + def seen(self, seen): + """Sets the seen of this TrackingPixelProjection. + + + :param seen: The seen of this TrackingPixelProjection. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and seen is None: # noqa: E501 + raise ValueError("Invalid value for `seen`, must not be `None`") # noqa: E501 + + self._seen = seen + + @property + def seen_at(self): + """Gets the seen_at of this TrackingPixelProjection. # noqa: E501 + + + :return: The seen_at of this TrackingPixelProjection. # noqa: E501 + :rtype: datetime + """ + return self._seen_at + + @seen_at.setter + def seen_at(self, seen_at): + """Sets the seen_at of this TrackingPixelProjection. + + + :param seen_at: The seen_at of this TrackingPixelProjection. # noqa: E501 + :type: datetime + """ + + self._seen_at = seen_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TrackingPixelProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, TrackingPixelProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/unknown_missed_email_projection.py b/mailslurp_client/models/unknown_missed_email_projection.py new file mode 100644 index 00000000..91caecba --- /dev/null +++ b/mailslurp_client/models/unknown_missed_email_projection.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class UnknownMissedEmailProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + '_from': 'str', + 'subject': 'str', + 'to': 'list[str]', + 'created_at': 'datetime' + } + + attribute_map = { + 'id': 'id', + '_from': 'from', + 'subject': 'subject', + 'to': 'to', + 'created_at': 'createdAt' + } + + def __init__(self, id=None, _from=None, subject=None, to=None, created_at=None, local_vars_configuration=None): # noqa: E501 + """UnknownMissedEmailProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self.__from = None + self._subject = None + self._to = None + self._created_at = None + self.discriminator = None + + self.id = id + if _from is not None: + self._from = _from + if subject is not None: + self.subject = subject + if to is not None: + self.to = to + self.created_at = created_at + + @property + def id(self): + """Gets the id of this UnknownMissedEmailProjection. # noqa: E501 + + + :return: The id of this UnknownMissedEmailProjection. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this UnknownMissedEmailProjection. + + + :param id: The id of this UnknownMissedEmailProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def _from(self): + """Gets the _from of this UnknownMissedEmailProjection. # noqa: E501 + + + :return: The _from of this UnknownMissedEmailProjection. # noqa: E501 + :rtype: str + """ + return self.__from + + @_from.setter + def _from(self, _from): + """Sets the _from of this UnknownMissedEmailProjection. + + + :param _from: The _from of this UnknownMissedEmailProjection. # noqa: E501 + :type: str + """ + + self.__from = _from + + @property + def subject(self): + """Gets the subject of this UnknownMissedEmailProjection. # noqa: E501 + + + :return: The subject of this UnknownMissedEmailProjection. # noqa: E501 + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this UnknownMissedEmailProjection. + + + :param subject: The subject of this UnknownMissedEmailProjection. # noqa: E501 + :type: str + """ + + self._subject = subject + + @property + def to(self): + """Gets the to of this UnknownMissedEmailProjection. # noqa: E501 + + + :return: The to of this UnknownMissedEmailProjection. # noqa: E501 + :rtype: list[str] + """ + return self._to + + @to.setter + def to(self, to): + """Sets the to of this UnknownMissedEmailProjection. + + + :param to: The to of this UnknownMissedEmailProjection. # noqa: E501 + :type: list[str] + """ + + self._to = to + + @property + def created_at(self): + """Gets the created_at of this UnknownMissedEmailProjection. # noqa: E501 + + + :return: The created_at of this UnknownMissedEmailProjection. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this UnknownMissedEmailProjection. + + + :param created_at: The created_at of this UnknownMissedEmailProjection. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnknownMissedEmailProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UnknownMissedEmailProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/unread_count.py b/mailslurp_client/models/unread_count.py new file mode 100644 index 00000000..428983fc --- /dev/null +++ b/mailslurp_client/models/unread_count.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class UnreadCount(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'count': 'int' + } + + attribute_map = { + 'count': 'count' + } + + def __init__(self, count=None, local_vars_configuration=None): # noqa: E501 + """UnreadCount - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._count = None + self.discriminator = None + + self.count = count + + @property + def count(self): + """Gets the count of this UnreadCount. # noqa: E501 + + + :return: The count of this UnreadCount. # noqa: E501 + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """Sets the count of this UnreadCount. + + + :param count: The count of this UnreadCount. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and count is None: # noqa: E501 + raise ValueError("Invalid value for `count`, must not be `None`") # noqa: E501 + + self._count = count + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnreadCount): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UnreadCount): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/unseen_error_count_dto.py b/mailslurp_client/models/unseen_error_count_dto.py new file mode 100644 index 00000000..d37fb835 --- /dev/null +++ b/mailslurp_client/models/unseen_error_count_dto.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class UnseenErrorCountDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'count': 'int' + } + + attribute_map = { + 'count': 'count' + } + + def __init__(self, count=None, local_vars_configuration=None): # noqa: E501 + """UnseenErrorCountDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._count = None + self.discriminator = None + + self.count = count + + @property + def count(self): + """Gets the count of this UnseenErrorCountDto. # noqa: E501 + + + :return: The count of this UnseenErrorCountDto. # noqa: E501 + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """Sets the count of this UnseenErrorCountDto. + + + :param count: The count of this UnseenErrorCountDto. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and count is None: # noqa: E501 + raise ValueError("Invalid value for `count`, must not be `None`") # noqa: E501 + + self._count = count + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UnseenErrorCountDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UnseenErrorCountDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/update_alias_options.py b/mailslurp_client/models/update_alias_options.py new file mode 100644 index 00000000..b0af5a46 --- /dev/null +++ b/mailslurp_client/models/update_alias_options.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class UpdateAliasOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str' + } + + attribute_map = { + 'name': 'name' + } + + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 + """UpdateAliasOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self.discriminator = None + + if name is not None: + self.name = name + + @property + def name(self): + """Gets the name of this UpdateAliasOptions. # noqa: E501 + + Optional name for alias # noqa: E501 + + :return: The name of this UpdateAliasOptions. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this UpdateAliasOptions. + + Optional name for alias # noqa: E501 + + :param name: The name of this UpdateAliasOptions. # noqa: E501 + :type: str + """ + + self._name = name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateAliasOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateAliasOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/update_domain_options.py b/mailslurp_client/models/update_domain_options.py new file mode 100644 index 00000000..9c03cac6 --- /dev/null +++ b/mailslurp_client/models/update_domain_options.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class UpdateDomainOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'catch_all_inbox_id': 'str' + } + + attribute_map = { + 'catch_all_inbox_id': 'catchAllInboxId' + } + + def __init__(self, catch_all_inbox_id=None, local_vars_configuration=None): # noqa: E501 + """UpdateDomainOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._catch_all_inbox_id = None + self.discriminator = None + + if catch_all_inbox_id is not None: + self.catch_all_inbox_id = catch_all_inbox_id + + @property + def catch_all_inbox_id(self): + """Gets the catch_all_inbox_id of this UpdateDomainOptions. # noqa: E501 + + + :return: The catch_all_inbox_id of this UpdateDomainOptions. # noqa: E501 + :rtype: str + """ + return self._catch_all_inbox_id + + @catch_all_inbox_id.setter + def catch_all_inbox_id(self, catch_all_inbox_id): + """Sets the catch_all_inbox_id of this UpdateDomainOptions. + + + :param catch_all_inbox_id: The catch_all_inbox_id of this UpdateDomainOptions. # noqa: E501 + :type: str + """ + + self._catch_all_inbox_id = catch_all_inbox_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateDomainOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateDomainOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/update_group_contacts.py b/mailslurp_client/models/update_group_contacts.py new file mode 100644 index 00000000..7b5d1bf6 --- /dev/null +++ b/mailslurp_client/models/update_group_contacts.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class UpdateGroupContacts(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'contact_ids': 'list[str]' + } + + attribute_map = { + 'contact_ids': 'contactIds' + } + + def __init__(self, contact_ids=None, local_vars_configuration=None): # noqa: E501 + """UpdateGroupContacts - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._contact_ids = None + self.discriminator = None + + self.contact_ids = contact_ids + + @property + def contact_ids(self): + """Gets the contact_ids of this UpdateGroupContacts. # noqa: E501 + + + :return: The contact_ids of this UpdateGroupContacts. # noqa: E501 + :rtype: list[str] + """ + return self._contact_ids + + @contact_ids.setter + def contact_ids(self, contact_ids): + """Sets the contact_ids of this UpdateGroupContacts. + + + :param contact_ids: The contact_ids of this UpdateGroupContacts. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and contact_ids is None: # noqa: E501 + raise ValueError("Invalid value for `contact_ids`, must not be `None`") # noqa: E501 + + self._contact_ids = contact_ids + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateGroupContacts): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateGroupContacts): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/update_inbox_options.py b/mailslurp_client/models/update_inbox_options.py new file mode 100644 index 00000000..822fe988 --- /dev/null +++ b/mailslurp_client/models/update_inbox_options.py @@ -0,0 +1,230 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class UpdateInboxOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'description': 'str', + 'tags': 'list[str]', + 'expires_at': 'datetime', + 'favourite': 'bool' + } + + attribute_map = { + 'name': 'name', + 'description': 'description', + 'tags': 'tags', + 'expires_at': 'expiresAt', + 'favourite': 'favourite' + } + + def __init__(self, name=None, description=None, tags=None, expires_at=None, favourite=None, local_vars_configuration=None): # noqa: E501 + """UpdateInboxOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._description = None + self._tags = None + self._expires_at = None + self._favourite = None + self.discriminator = None + + self.name = name + self.description = description + self.tags = tags + self.expires_at = expires_at + self.favourite = favourite + + @property + def name(self): + """Gets the name of this UpdateInboxOptions. # noqa: E501 + + Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search # noqa: E501 + + :return: The name of this UpdateInboxOptions. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this UpdateInboxOptions. + + Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search # noqa: E501 + + :param name: The name of this UpdateInboxOptions. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def description(self): + """Gets the description of this UpdateInboxOptions. # noqa: E501 + + Description of an inbox for labelling and searching purposes # noqa: E501 + + :return: The description of this UpdateInboxOptions. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this UpdateInboxOptions. + + Description of an inbox for labelling and searching purposes # noqa: E501 + + :param description: The description of this UpdateInboxOptions. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def tags(self): + """Gets the tags of this UpdateInboxOptions. # noqa: E501 + + Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. # noqa: E501 + + :return: The tags of this UpdateInboxOptions. # noqa: E501 + :rtype: list[str] + """ + return self._tags + + @tags.setter + def tags(self, tags): + """Sets the tags of this UpdateInboxOptions. + + Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI. # noqa: E501 + + :param tags: The tags of this UpdateInboxOptions. # noqa: E501 + :type: list[str] + """ + + self._tags = tags + + @property + def expires_at(self): + """Gets the expires_at of this UpdateInboxOptions. # noqa: E501 + + Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email. # noqa: E501 + + :return: The expires_at of this UpdateInboxOptions. # noqa: E501 + :rtype: datetime + """ + return self._expires_at + + @expires_at.setter + def expires_at(self, expires_at): + """Sets the expires_at of this UpdateInboxOptions. + + Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email. # noqa: E501 + + :param expires_at: The expires_at of this UpdateInboxOptions. # noqa: E501 + :type: datetime + """ + + self._expires_at = expires_at + + @property + def favourite(self): + """Gets the favourite of this UpdateInboxOptions. # noqa: E501 + + Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering # noqa: E501 + + :return: The favourite of this UpdateInboxOptions. # noqa: E501 + :rtype: bool + """ + return self._favourite + + @favourite.setter + def favourite(self, favourite): + """Sets the favourite of this UpdateInboxOptions. + + Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering # noqa: E501 + + :param favourite: The favourite of this UpdateInboxOptions. # noqa: E501 + :type: bool + """ + + self._favourite = favourite + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateInboxOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UpdateInboxOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/upload_attachment_options.py b/mailslurp_client/models/upload_attachment_options.py new file mode 100644 index 00000000..a4b27245 --- /dev/null +++ b/mailslurp_client/models/upload_attachment_options.py @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class UploadAttachmentOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'content_type': 'str', + 'filename': 'str', + 'base64_contents': 'str' + } + + attribute_map = { + 'content_type': 'contentType', + 'filename': 'filename', + 'base64_contents': 'base64Contents' + } + + def __init__(self, content_type=None, filename=None, base64_contents=None, local_vars_configuration=None): # noqa: E501 + """UploadAttachmentOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._content_type = None + self._filename = None + self._base64_contents = None + self.discriminator = None + + self.content_type = content_type + self.filename = filename + self.base64_contents = base64_contents + + @property + def content_type(self): + """Gets the content_type of this UploadAttachmentOptions. # noqa: E501 + + Optional contentType for file. For instance `application/pdf` # noqa: E501 + + :return: The content_type of this UploadAttachmentOptions. # noqa: E501 + :rtype: str + """ + return self._content_type + + @content_type.setter + def content_type(self, content_type): + """Sets the content_type of this UploadAttachmentOptions. + + Optional contentType for file. For instance `application/pdf` # noqa: E501 + + :param content_type: The content_type of this UploadAttachmentOptions. # noqa: E501 + :type: str + """ + + self._content_type = content_type + + @property + def filename(self): + """Gets the filename of this UploadAttachmentOptions. # noqa: E501 + + Optional filename to save upload with. Will be the name that is shown in email clients # noqa: E501 + + :return: The filename of this UploadAttachmentOptions. # noqa: E501 + :rtype: str + """ + return self._filename + + @filename.setter + def filename(self, filename): + """Sets the filename of this UploadAttachmentOptions. + + Optional filename to save upload with. Will be the name that is shown in email clients # noqa: E501 + + :param filename: The filename of this UploadAttachmentOptions. # noqa: E501 + :type: str + """ + + self._filename = filename + + @property + def base64_contents(self): + """Gets the base64_contents of this UploadAttachmentOptions. # noqa: E501 + + Base64 encoded string of file contents. Typically this means reading the bytes or string content of a file and then converting that to a base64 encoded string. For examples of how to do this see https://www.mailslurp.com/guides/base64-file-uploads/ # noqa: E501 + + :return: The base64_contents of this UploadAttachmentOptions. # noqa: E501 + :rtype: str + """ + return self._base64_contents + + @base64_contents.setter + def base64_contents(self, base64_contents): + """Sets the base64_contents of this UploadAttachmentOptions. + + Base64 encoded string of file contents. Typically this means reading the bytes or string content of a file and then converting that to a base64 encoded string. For examples of how to do this see https://www.mailslurp.com/guides/base64-file-uploads/ # noqa: E501 + + :param base64_contents: The base64_contents of this UploadAttachmentOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and base64_contents is None: # noqa: E501 + raise ValueError("Invalid value for `base64_contents`, must not be `None`") # noqa: E501 + + self._base64_contents = base64_contents + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UploadAttachmentOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UploadAttachmentOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/user_info_dto.py b/mailslurp_client/models/user_info_dto.py new file mode 100644 index 00000000..4baf7735 --- /dev/null +++ b/mailslurp_client/models/user_info_dto.py @@ -0,0 +1,274 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class UserInfoDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'email_address': 'str', + 'account_state': 'str', + 'subscription_type': 'str', + 'account_type': 'str', + 'created_at': 'datetime' + } + + attribute_map = { + 'id': 'id', + 'email_address': 'emailAddress', + 'account_state': 'accountState', + 'subscription_type': 'subscriptionType', + 'account_type': 'accountType', + 'created_at': 'createdAt' + } + + def __init__(self, id=None, email_address=None, account_state=None, subscription_type=None, account_type=None, created_at=None, local_vars_configuration=None): # noqa: E501 + """UserInfoDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._email_address = None + self._account_state = None + self._subscription_type = None + self._account_type = None + self._created_at = None + self.discriminator = None + + self.id = id + self.email_address = email_address + self.account_state = account_state + if subscription_type is not None: + self.subscription_type = subscription_type + self.account_type = account_type + self.created_at = created_at + + @property + def id(self): + """Gets the id of this UserInfoDto. # noqa: E501 + + + :return: The id of this UserInfoDto. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this UserInfoDto. + + + :param id: The id of this UserInfoDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def email_address(self): + """Gets the email_address of this UserInfoDto. # noqa: E501 + + + :return: The email_address of this UserInfoDto. # noqa: E501 + :rtype: str + """ + return self._email_address + + @email_address.setter + def email_address(self, email_address): + """Sets the email_address of this UserInfoDto. + + + :param email_address: The email_address of this UserInfoDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and email_address is None: # noqa: E501 + raise ValueError("Invalid value for `email_address`, must not be `None`") # noqa: E501 + + self._email_address = email_address + + @property + def account_state(self): + """Gets the account_state of this UserInfoDto. # noqa: E501 + + + :return: The account_state of this UserInfoDto. # noqa: E501 + :rtype: str + """ + return self._account_state + + @account_state.setter + def account_state(self, account_state): + """Sets the account_state of this UserInfoDto. + + + :param account_state: The account_state of this UserInfoDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and account_state is None: # noqa: E501 + raise ValueError("Invalid value for `account_state`, must not be `None`") # noqa: E501 + allowed_values = ["FROZEN", "ACTIVE"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and account_state not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `account_state` ({0}), must be one of {1}" # noqa: E501 + .format(account_state, allowed_values) + ) + + self._account_state = account_state + + @property + def subscription_type(self): + """Gets the subscription_type of this UserInfoDto. # noqa: E501 + + + :return: The subscription_type of this UserInfoDto. # noqa: E501 + :rtype: str + """ + return self._subscription_type + + @subscription_type.setter + def subscription_type(self, subscription_type): + """Sets the subscription_type of this UserInfoDto. + + + :param subscription_type: The subscription_type of this UserInfoDto. # noqa: E501 + :type: str + """ + allowed_values = ["PRO_MONTHLY", "STARTER", "TEAM", "ENTERPRISE"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and subscription_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `subscription_type` ({0}), must be one of {1}" # noqa: E501 + .format(subscription_type, allowed_values) + ) + + self._subscription_type = subscription_type + + @property + def account_type(self): + """Gets the account_type of this UserInfoDto. # noqa: E501 + + + :return: The account_type of this UserInfoDto. # noqa: E501 + :rtype: str + """ + return self._account_type + + @account_type.setter + def account_type(self, account_type): + """Sets the account_type of this UserInfoDto. + + + :param account_type: The account_type of this UserInfoDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and account_type is None: # noqa: E501 + raise ValueError("Invalid value for `account_type`, must not be `None`") # noqa: E501 + allowed_values = ["SOLO", "CHILD_SOLO", "CHILD_TEAM"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and account_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `account_type` ({0}), must be one of {1}" # noqa: E501 + .format(account_type, allowed_values) + ) + + self._account_type = account_type + + @property + def created_at(self): + """Gets the created_at of this UserInfoDto. # noqa: E501 + + + :return: The created_at of this UserInfoDto. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this UserInfoDto. + + + :param created_at: The created_at of this UserInfoDto. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UserInfoDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, UserInfoDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/validate_email_address_list_options.py b/mailslurp_client/models/validate_email_address_list_options.py new file mode 100644 index 00000000..a89e1c0b --- /dev/null +++ b/mailslurp_client/models/validate_email_address_list_options.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class ValidateEmailAddressListOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'email_address_list': 'list[str]' + } + + attribute_map = { + 'email_address_list': 'emailAddressList' + } + + def __init__(self, email_address_list=None, local_vars_configuration=None): # noqa: E501 + """ValidateEmailAddressListOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._email_address_list = None + self.discriminator = None + + self.email_address_list = email_address_list + + @property + def email_address_list(self): + """Gets the email_address_list of this ValidateEmailAddressListOptions. # noqa: E501 + + + :return: The email_address_list of this ValidateEmailAddressListOptions. # noqa: E501 + :rtype: list[str] + """ + return self._email_address_list + + @email_address_list.setter + def email_address_list(self, email_address_list): + """Sets the email_address_list of this ValidateEmailAddressListOptions. + + + :param email_address_list: The email_address_list of this ValidateEmailAddressListOptions. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and email_address_list is None: # noqa: E501 + raise ValueError("Invalid value for `email_address_list`, must not be `None`") # noqa: E501 + + self._email_address_list = email_address_list + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ValidateEmailAddressListOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ValidateEmailAddressListOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/validate_email_address_list_result.py b/mailslurp_client/models/validate_email_address_list_result.py new file mode 100644 index 00000000..8c3dd5fa --- /dev/null +++ b/mailslurp_client/models/validate_email_address_list_result.py @@ -0,0 +1,176 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class ValidateEmailAddressListResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'valid_email_addresses': 'list[str]', + 'invalid_email_addresses': 'list[str]', + 'result_map_email_address_is_valid': 'dict(str, bool)' + } + + attribute_map = { + 'valid_email_addresses': 'validEmailAddresses', + 'invalid_email_addresses': 'invalidEmailAddresses', + 'result_map_email_address_is_valid': 'resultMapEmailAddressIsValid' + } + + def __init__(self, valid_email_addresses=None, invalid_email_addresses=None, result_map_email_address_is_valid=None, local_vars_configuration=None): # noqa: E501 + """ValidateEmailAddressListResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._valid_email_addresses = None + self._invalid_email_addresses = None + self._result_map_email_address_is_valid = None + self.discriminator = None + + self.valid_email_addresses = valid_email_addresses + self.invalid_email_addresses = invalid_email_addresses + self.result_map_email_address_is_valid = result_map_email_address_is_valid + + @property + def valid_email_addresses(self): + """Gets the valid_email_addresses of this ValidateEmailAddressListResult. # noqa: E501 + + + :return: The valid_email_addresses of this ValidateEmailAddressListResult. # noqa: E501 + :rtype: list[str] + """ + return self._valid_email_addresses + + @valid_email_addresses.setter + def valid_email_addresses(self, valid_email_addresses): + """Sets the valid_email_addresses of this ValidateEmailAddressListResult. + + + :param valid_email_addresses: The valid_email_addresses of this ValidateEmailAddressListResult. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and valid_email_addresses is None: # noqa: E501 + raise ValueError("Invalid value for `valid_email_addresses`, must not be `None`") # noqa: E501 + + self._valid_email_addresses = valid_email_addresses + + @property + def invalid_email_addresses(self): + """Gets the invalid_email_addresses of this ValidateEmailAddressListResult. # noqa: E501 + + + :return: The invalid_email_addresses of this ValidateEmailAddressListResult. # noqa: E501 + :rtype: list[str] + """ + return self._invalid_email_addresses + + @invalid_email_addresses.setter + def invalid_email_addresses(self, invalid_email_addresses): + """Sets the invalid_email_addresses of this ValidateEmailAddressListResult. + + + :param invalid_email_addresses: The invalid_email_addresses of this ValidateEmailAddressListResult. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and invalid_email_addresses is None: # noqa: E501 + raise ValueError("Invalid value for `invalid_email_addresses`, must not be `None`") # noqa: E501 + + self._invalid_email_addresses = invalid_email_addresses + + @property + def result_map_email_address_is_valid(self): + """Gets the result_map_email_address_is_valid of this ValidateEmailAddressListResult. # noqa: E501 + + + :return: The result_map_email_address_is_valid of this ValidateEmailAddressListResult. # noqa: E501 + :rtype: dict(str, bool) + """ + return self._result_map_email_address_is_valid + + @result_map_email_address_is_valid.setter + def result_map_email_address_is_valid(self, result_map_email_address_is_valid): + """Sets the result_map_email_address_is_valid of this ValidateEmailAddressListResult. + + + :param result_map_email_address_is_valid: The result_map_email_address_is_valid of this ValidateEmailAddressListResult. # noqa: E501 + :type: dict(str, bool) + """ + if self.local_vars_configuration.client_side_validation and result_map_email_address_is_valid is None: # noqa: E501 + raise ValueError("Invalid value for `result_map_email_address_is_valid`, must not be `None`") # noqa: E501 + + self._result_map_email_address_is_valid = result_map_email_address_is_valid + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ValidateEmailAddressListResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ValidateEmailAddressListResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/validation_dto.py b/mailslurp_client/models/validation_dto.py new file mode 100644 index 00000000..7ab994fa --- /dev/null +++ b/mailslurp_client/models/validation_dto.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class ValidationDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'email_id': 'str', + 'html': 'HTMLValidationResult' + } + + attribute_map = { + 'email_id': 'emailId', + 'html': 'html' + } + + def __init__(self, email_id=None, html=None, local_vars_configuration=None): # noqa: E501 + """ValidationDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._email_id = None + self._html = None + self.discriminator = None + + self.email_id = email_id + self.html = html + + @property + def email_id(self): + """Gets the email_id of this ValidationDto. # noqa: E501 + + ID of the email validated # noqa: E501 + + :return: The email_id of this ValidationDto. # noqa: E501 + :rtype: str + """ + return self._email_id + + @email_id.setter + def email_id(self, email_id): + """Sets the email_id of this ValidationDto. + + ID of the email validated # noqa: E501 + + :param email_id: The email_id of this ValidationDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and email_id is None: # noqa: E501 + raise ValueError("Invalid value for `email_id`, must not be `None`") # noqa: E501 + + self._email_id = email_id + + @property + def html(self): + """Gets the html of this ValidationDto. # noqa: E501 + + + :return: The html of this ValidationDto. # noqa: E501 + :rtype: HTMLValidationResult + """ + return self._html + + @html.setter + def html(self, html): + """Sets the html of this ValidationDto. + + + :param html: The html of this ValidationDto. # noqa: E501 + :type: HTMLValidationResult + """ + if self.local_vars_configuration.client_side_validation and html is None: # noqa: E501 + raise ValueError("Invalid value for `html`, must not be `None`") # noqa: E501 + + self._html = html + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ValidationDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ValidationDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/validation_message.py b/mailslurp_client/models/validation_message.py new file mode 100644 index 00000000..2c4dc25e --- /dev/null +++ b/mailslurp_client/models/validation_message.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class ValidationMessage(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'line_number': 'int', + 'message': 'str' + } + + attribute_map = { + 'line_number': 'lineNumber', + 'message': 'message' + } + + def __init__(self, line_number=None, message=None, local_vars_configuration=None): # noqa: E501 + """ValidationMessage - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._line_number = None + self._message = None + self.discriminator = None + + self.line_number = line_number + if message is not None: + self.message = message + + @property + def line_number(self): + """Gets the line_number of this ValidationMessage. # noqa: E501 + + + :return: The line_number of this ValidationMessage. # noqa: E501 + :rtype: int + """ + return self._line_number + + @line_number.setter + def line_number(self, line_number): + """Sets the line_number of this ValidationMessage. + + + :param line_number: The line_number of this ValidationMessage. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and line_number is None: # noqa: E501 + raise ValueError("Invalid value for `line_number`, must not be `None`") # noqa: E501 + + self._line_number = line_number + + @property + def message(self): + """Gets the message of this ValidationMessage. # noqa: E501 + + + :return: The message of this ValidationMessage. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this ValidationMessage. + + + :param message: The message of this ValidationMessage. # noqa: E501 + :type: str + """ + + self._message = message + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ValidationMessage): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, ValidationMessage): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/verify_email_address_options.py b/mailslurp_client/models/verify_email_address_options.py new file mode 100644 index 00000000..6fe18849 --- /dev/null +++ b/mailslurp_client/models/verify_email_address_options.py @@ -0,0 +1,200 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class VerifyEmailAddressOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'mail_server_domain': 'str', + 'email_address': 'str', + 'sender_email_address': 'str', + 'port': 'int' + } + + attribute_map = { + 'mail_server_domain': 'mailServerDomain', + 'email_address': 'emailAddress', + 'sender_email_address': 'senderEmailAddress', + 'port': 'port' + } + + def __init__(self, mail_server_domain=None, email_address=None, sender_email_address=None, port=None, local_vars_configuration=None): # noqa: E501 + """VerifyEmailAddressOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._mail_server_domain = None + self._email_address = None + self._sender_email_address = None + self._port = None + self.discriminator = None + + if mail_server_domain is not None: + self.mail_server_domain = mail_server_domain + self.email_address = email_address + if sender_email_address is not None: + self.sender_email_address = sender_email_address + if port is not None: + self.port = port + + @property + def mail_server_domain(self): + """Gets the mail_server_domain of this VerifyEmailAddressOptions. # noqa: E501 + + + :return: The mail_server_domain of this VerifyEmailAddressOptions. # noqa: E501 + :rtype: str + """ + return self._mail_server_domain + + @mail_server_domain.setter + def mail_server_domain(self, mail_server_domain): + """Sets the mail_server_domain of this VerifyEmailAddressOptions. + + + :param mail_server_domain: The mail_server_domain of this VerifyEmailAddressOptions. # noqa: E501 + :type: str + """ + + self._mail_server_domain = mail_server_domain + + @property + def email_address(self): + """Gets the email_address of this VerifyEmailAddressOptions. # noqa: E501 + + + :return: The email_address of this VerifyEmailAddressOptions. # noqa: E501 + :rtype: str + """ + return self._email_address + + @email_address.setter + def email_address(self, email_address): + """Sets the email_address of this VerifyEmailAddressOptions. + + + :param email_address: The email_address of this VerifyEmailAddressOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and email_address is None: # noqa: E501 + raise ValueError("Invalid value for `email_address`, must not be `None`") # noqa: E501 + + self._email_address = email_address + + @property + def sender_email_address(self): + """Gets the sender_email_address of this VerifyEmailAddressOptions. # noqa: E501 + + + :return: The sender_email_address of this VerifyEmailAddressOptions. # noqa: E501 + :rtype: str + """ + return self._sender_email_address + + @sender_email_address.setter + def sender_email_address(self, sender_email_address): + """Sets the sender_email_address of this VerifyEmailAddressOptions. + + + :param sender_email_address: The sender_email_address of this VerifyEmailAddressOptions. # noqa: E501 + :type: str + """ + + self._sender_email_address = sender_email_address + + @property + def port(self): + """Gets the port of this VerifyEmailAddressOptions. # noqa: E501 + + + :return: The port of this VerifyEmailAddressOptions. # noqa: E501 + :rtype: int + """ + return self._port + + @port.setter + def port(self, port): + """Sets the port of this VerifyEmailAddressOptions. + + + :param port: The port of this VerifyEmailAddressOptions. # noqa: E501 + :type: int + """ + + self._port = port + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, VerifyEmailAddressOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, VerifyEmailAddressOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/verify_webhook_signature_options.py b/mailslurp_client/models/verify_webhook_signature_options.py new file mode 100644 index 00000000..59e5db20 --- /dev/null +++ b/mailslurp_client/models/verify_webhook_signature_options.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class VerifyWebhookSignatureOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'message_id': 'str', + 'signature': 'str' + } + + attribute_map = { + 'message_id': 'messageId', + 'signature': 'signature' + } + + def __init__(self, message_id=None, signature=None, local_vars_configuration=None): # noqa: E501 + """VerifyWebhookSignatureOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._message_id = None + self._signature = None + self.discriminator = None + + self.message_id = message_id + self.signature = signature + + @property + def message_id(self): + """Gets the message_id of this VerifyWebhookSignatureOptions. # noqa: E501 + + + :return: The message_id of this VerifyWebhookSignatureOptions. # noqa: E501 + :rtype: str + """ + return self._message_id + + @message_id.setter + def message_id(self, message_id): + """Sets the message_id of this VerifyWebhookSignatureOptions. + + + :param message_id: The message_id of this VerifyWebhookSignatureOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message_id is None: # noqa: E501 + raise ValueError("Invalid value for `message_id`, must not be `None`") # noqa: E501 + + self._message_id = message_id + + @property + def signature(self): + """Gets the signature of this VerifyWebhookSignatureOptions. # noqa: E501 + + + :return: The signature of this VerifyWebhookSignatureOptions. # noqa: E501 + :rtype: str + """ + return self._signature + + @signature.setter + def signature(self, signature): + """Sets the signature of this VerifyWebhookSignatureOptions. + + + :param signature: The signature of this VerifyWebhookSignatureOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and signature is None: # noqa: E501 + raise ValueError("Invalid value for `signature`, must not be `None`") # noqa: E501 + + self._signature = signature + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, VerifyWebhookSignatureOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, VerifyWebhookSignatureOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/verify_webhook_signature_results.py b/mailslurp_client/models/verify_webhook_signature_results.py new file mode 100644 index 00000000..ea7b0772 --- /dev/null +++ b/mailslurp_client/models/verify_webhook_signature_results.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class VerifyWebhookSignatureResults(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'is_valid': 'bool' + } + + attribute_map = { + 'is_valid': 'isValid' + } + + def __init__(self, is_valid=None, local_vars_configuration=None): # noqa: E501 + """VerifyWebhookSignatureResults - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._is_valid = None + self.discriminator = None + + self.is_valid = is_valid + + @property + def is_valid(self): + """Gets the is_valid of this VerifyWebhookSignatureResults. # noqa: E501 + + + :return: The is_valid of this VerifyWebhookSignatureResults. # noqa: E501 + :rtype: bool + """ + return self._is_valid + + @is_valid.setter + def is_valid(self, is_valid): + """Sets the is_valid of this VerifyWebhookSignatureResults. + + + :param is_valid: The is_valid of this VerifyWebhookSignatureResults. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and is_valid is None: # noqa: E501 + raise ValueError("Invalid value for `is_valid`, must not be `None`") # noqa: E501 + + self._is_valid = is_valid + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, VerifyWebhookSignatureResults): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, VerifyWebhookSignatureResults): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/wait_for_conditions.py b/mailslurp_client/models/wait_for_conditions.py new file mode 100644 index 00000000..f3f021c3 --- /dev/null +++ b/mailslurp_client/models/wait_for_conditions.py @@ -0,0 +1,389 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class WaitForConditions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'inbox_id': 'str', + 'count': 'int', + 'delay_timeout': 'int', + 'timeout': 'int', + 'unread_only': 'bool', + 'count_type': 'str', + 'matches': 'list[MatchOption]', + 'sort_direction': 'str', + 'since': 'datetime', + 'before': 'datetime' + } + + attribute_map = { + 'inbox_id': 'inboxId', + 'count': 'count', + 'delay_timeout': 'delayTimeout', + 'timeout': 'timeout', + 'unread_only': 'unreadOnly', + 'count_type': 'countType', + 'matches': 'matches', + 'sort_direction': 'sortDirection', + 'since': 'since', + 'before': 'before' + } + + def __init__(self, inbox_id=None, count=None, delay_timeout=None, timeout=None, unread_only=None, count_type=None, matches=None, sort_direction=None, since=None, before=None, local_vars_configuration=None): # noqa: E501 + """WaitForConditions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._inbox_id = None + self._count = None + self._delay_timeout = None + self._timeout = None + self._unread_only = None + self._count_type = None + self._matches = None + self._sort_direction = None + self._since = None + self._before = None + self.discriminator = None + + self.inbox_id = inbox_id + if count is not None: + self.count = count + if delay_timeout is not None: + self.delay_timeout = delay_timeout + self.timeout = timeout + if unread_only is not None: + self.unread_only = unread_only + if count_type is not None: + self.count_type = count_type + if matches is not None: + self.matches = matches + if sort_direction is not None: + self.sort_direction = sort_direction + if since is not None: + self.since = since + if before is not None: + self.before = before + + @property + def inbox_id(self): + """Gets the inbox_id of this WaitForConditions. # noqa: E501 + + ID of inbox to search within and apply conditions to. Essentially filtering the emails found to give a count. # noqa: E501 + + :return: The inbox_id of this WaitForConditions. # noqa: E501 + :rtype: str + """ + return self._inbox_id + + @inbox_id.setter + def inbox_id(self, inbox_id): + """Sets the inbox_id of this WaitForConditions. + + ID of inbox to search within and apply conditions to. Essentially filtering the emails found to give a count. # noqa: E501 + + :param inbox_id: The inbox_id of this WaitForConditions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and inbox_id is None: # noqa: E501 + raise ValueError("Invalid value for `inbox_id`, must not be `None`") # noqa: E501 + + self._inbox_id = inbox_id + + @property + def count(self): + """Gets the count of this WaitForConditions. # noqa: E501 + + Number of results that should match conditions. Either exactly or at least this amount based on the `countType`. If count condition is not met and the timeout has not been reached the `waitFor` method will retry the operation. # noqa: E501 + + :return: The count of this WaitForConditions. # noqa: E501 + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """Sets the count of this WaitForConditions. + + Number of results that should match conditions. Either exactly or at least this amount based on the `countType`. If count condition is not met and the timeout has not been reached the `waitFor` method will retry the operation. # noqa: E501 + + :param count: The count of this WaitForConditions. # noqa: E501 + :type: int + """ + + self._count = count + + @property + def delay_timeout(self): + """Gets the delay_timeout of this WaitForConditions. # noqa: E501 + + Max time in milliseconds to wait between retries if a `timeout` is specified. # noqa: E501 + + :return: The delay_timeout of this WaitForConditions. # noqa: E501 + :rtype: int + """ + return self._delay_timeout + + @delay_timeout.setter + def delay_timeout(self, delay_timeout): + """Sets the delay_timeout of this WaitForConditions. + + Max time in milliseconds to wait between retries if a `timeout` is specified. # noqa: E501 + + :param delay_timeout: The delay_timeout of this WaitForConditions. # noqa: E501 + :type: int + """ + + self._delay_timeout = delay_timeout + + @property + def timeout(self): + """Gets the timeout of this WaitForConditions. # noqa: E501 + + Max time in milliseconds to retry the `waitFor` operation until conditions are met. # noqa: E501 + + :return: The timeout of this WaitForConditions. # noqa: E501 + :rtype: int + """ + return self._timeout + + @timeout.setter + def timeout(self, timeout): + """Sets the timeout of this WaitForConditions. + + Max time in milliseconds to retry the `waitFor` operation until conditions are met. # noqa: E501 + + :param timeout: The timeout of this WaitForConditions. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and timeout is None: # noqa: E501 + raise ValueError("Invalid value for `timeout`, must not be `None`") # noqa: E501 + + self._timeout = timeout + + @property + def unread_only(self): + """Gets the unread_only of this WaitForConditions. # noqa: E501 + + Apply conditions only to **unread** emails. All emails begin with `read=false`. An email is marked `read=true` when an `EmailDto` representation of it has been returned to the user at least once. For example you have called `getEmail` or `waitForLatestEmail` etc., or you have viewed the email in the dashboard. # noqa: E501 + + :return: The unread_only of this WaitForConditions. # noqa: E501 + :rtype: bool + """ + return self._unread_only + + @unread_only.setter + def unread_only(self, unread_only): + """Sets the unread_only of this WaitForConditions. + + Apply conditions only to **unread** emails. All emails begin with `read=false`. An email is marked `read=true` when an `EmailDto` representation of it has been returned to the user at least once. For example you have called `getEmail` or `waitForLatestEmail` etc., or you have viewed the email in the dashboard. # noqa: E501 + + :param unread_only: The unread_only of this WaitForConditions. # noqa: E501 + :type: bool + """ + + self._unread_only = unread_only + + @property + def count_type(self): + """Gets the count_type of this WaitForConditions. # noqa: E501 + + How result size should be compared with the expected size. Exactly or at-least matching result? # noqa: E501 + + :return: The count_type of this WaitForConditions. # noqa: E501 + :rtype: str + """ + return self._count_type + + @count_type.setter + def count_type(self, count_type): + """Sets the count_type of this WaitForConditions. + + How result size should be compared with the expected size. Exactly or at-least matching result? # noqa: E501 + + :param count_type: The count_type of this WaitForConditions. # noqa: E501 + :type: str + """ + allowed_values = ["EXACTLY", "ATLEAST"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and count_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `count_type` ({0}), must be one of {1}" # noqa: E501 + .format(count_type, allowed_values) + ) + + self._count_type = count_type + + @property + def matches(self): + """Gets the matches of this WaitForConditions. # noqa: E501 + + Conditions that should be matched for an email to qualify for results. Each condition will be applied in order to each email within an inbox to filter a result list of matching emails you are waiting for. # noqa: E501 + + :return: The matches of this WaitForConditions. # noqa: E501 + :rtype: list[MatchOption] + """ + return self._matches + + @matches.setter + def matches(self, matches): + """Sets the matches of this WaitForConditions. + + Conditions that should be matched for an email to qualify for results. Each condition will be applied in order to each email within an inbox to filter a result list of matching emails you are waiting for. # noqa: E501 + + :param matches: The matches of this WaitForConditions. # noqa: E501 + :type: list[MatchOption] + """ + + self._matches = matches + + @property + def sort_direction(self): + """Gets the sort_direction of this WaitForConditions. # noqa: E501 + + Direction to sort matching emails by created time # noqa: E501 + + :return: The sort_direction of this WaitForConditions. # noqa: E501 + :rtype: str + """ + return self._sort_direction + + @sort_direction.setter + def sort_direction(self, sort_direction): + """Sets the sort_direction of this WaitForConditions. + + Direction to sort matching emails by created time # noqa: E501 + + :param sort_direction: The sort_direction of this WaitForConditions. # noqa: E501 + :type: str + """ + allowed_values = ["ASC", "DESC"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and sort_direction not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `sort_direction` ({0}), must be one of {1}" # noqa: E501 + .format(sort_direction, allowed_values) + ) + + self._sort_direction = sort_direction + + @property + def since(self): + """Gets the since of this WaitForConditions. # noqa: E501 + + ISO Date Time earliest time of email to consider. Filter for matching emails that were received after this date # noqa: E501 + + :return: The since of this WaitForConditions. # noqa: E501 + :rtype: datetime + """ + return self._since + + @since.setter + def since(self, since): + """Sets the since of this WaitForConditions. + + ISO Date Time earliest time of email to consider. Filter for matching emails that were received after this date # noqa: E501 + + :param since: The since of this WaitForConditions. # noqa: E501 + :type: datetime + """ + + self._since = since + + @property + def before(self): + """Gets the before of this WaitForConditions. # noqa: E501 + + ISO Date Time latest time of email to consider. Filter for matching emails that were received before this date # noqa: E501 + + :return: The before of this WaitForConditions. # noqa: E501 + :rtype: datetime + """ + return self._before + + @before.setter + def before(self, before): + """Sets the before of this WaitForConditions. + + ISO Date Time latest time of email to consider. Filter for matching emails that were received before this date # noqa: E501 + + :param before: The before of this WaitForConditions. # noqa: E501 + :type: datetime + """ + + self._before = before + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WaitForConditions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WaitForConditions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/wait_for_single_sms_options.py b/mailslurp_client/models/wait_for_single_sms_options.py new file mode 100644 index 00000000..099b6c3b --- /dev/null +++ b/mailslurp_client/models/wait_for_single_sms_options.py @@ -0,0 +1,285 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class WaitForSingleSmsOptions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'phone_number_id': 'str', + 'timeout': 'int', + 'unread_only': 'bool', + 'before': 'datetime', + 'since': 'datetime', + 'sort_direction': 'str', + 'delay': 'int' + } + + attribute_map = { + 'phone_number_id': 'phoneNumberId', + 'timeout': 'timeout', + 'unread_only': 'unreadOnly', + 'before': 'before', + 'since': 'since', + 'sort_direction': 'sortDirection', + 'delay': 'delay' + } + + def __init__(self, phone_number_id=None, timeout=None, unread_only=None, before=None, since=None, sort_direction=None, delay=None, local_vars_configuration=None): # noqa: E501 + """WaitForSingleSmsOptions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._phone_number_id = None + self._timeout = None + self._unread_only = None + self._before = None + self._since = None + self._sort_direction = None + self._delay = None + self.discriminator = None + + self.phone_number_id = phone_number_id + self.timeout = timeout + if unread_only is not None: + self.unread_only = unread_only + if before is not None: + self.before = before + if since is not None: + self.since = since + if sort_direction is not None: + self.sort_direction = sort_direction + if delay is not None: + self.delay = delay + + @property + def phone_number_id(self): + """Gets the phone_number_id of this WaitForSingleSmsOptions. # noqa: E501 + + + :return: The phone_number_id of this WaitForSingleSmsOptions. # noqa: E501 + :rtype: str + """ + return self._phone_number_id + + @phone_number_id.setter + def phone_number_id(self, phone_number_id): + """Sets the phone_number_id of this WaitForSingleSmsOptions. + + + :param phone_number_id: The phone_number_id of this WaitForSingleSmsOptions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and phone_number_id is None: # noqa: E501 + raise ValueError("Invalid value for `phone_number_id`, must not be `None`") # noqa: E501 + + self._phone_number_id = phone_number_id + + @property + def timeout(self): + """Gets the timeout of this WaitForSingleSmsOptions. # noqa: E501 + + + :return: The timeout of this WaitForSingleSmsOptions. # noqa: E501 + :rtype: int + """ + return self._timeout + + @timeout.setter + def timeout(self, timeout): + """Sets the timeout of this WaitForSingleSmsOptions. + + + :param timeout: The timeout of this WaitForSingleSmsOptions. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and timeout is None: # noqa: E501 + raise ValueError("Invalid value for `timeout`, must not be `None`") # noqa: E501 + + self._timeout = timeout + + @property + def unread_only(self): + """Gets the unread_only of this WaitForSingleSmsOptions. # noqa: E501 + + + :return: The unread_only of this WaitForSingleSmsOptions. # noqa: E501 + :rtype: bool + """ + return self._unread_only + + @unread_only.setter + def unread_only(self, unread_only): + """Sets the unread_only of this WaitForSingleSmsOptions. + + + :param unread_only: The unread_only of this WaitForSingleSmsOptions. # noqa: E501 + :type: bool + """ + + self._unread_only = unread_only + + @property + def before(self): + """Gets the before of this WaitForSingleSmsOptions. # noqa: E501 + + + :return: The before of this WaitForSingleSmsOptions. # noqa: E501 + :rtype: datetime + """ + return self._before + + @before.setter + def before(self, before): + """Sets the before of this WaitForSingleSmsOptions. + + + :param before: The before of this WaitForSingleSmsOptions. # noqa: E501 + :type: datetime + """ + + self._before = before + + @property + def since(self): + """Gets the since of this WaitForSingleSmsOptions. # noqa: E501 + + + :return: The since of this WaitForSingleSmsOptions. # noqa: E501 + :rtype: datetime + """ + return self._since + + @since.setter + def since(self, since): + """Sets the since of this WaitForSingleSmsOptions. + + + :param since: The since of this WaitForSingleSmsOptions. # noqa: E501 + :type: datetime + """ + + self._since = since + + @property + def sort_direction(self): + """Gets the sort_direction of this WaitForSingleSmsOptions. # noqa: E501 + + + :return: The sort_direction of this WaitForSingleSmsOptions. # noqa: E501 + :rtype: str + """ + return self._sort_direction + + @sort_direction.setter + def sort_direction(self, sort_direction): + """Sets the sort_direction of this WaitForSingleSmsOptions. + + + :param sort_direction: The sort_direction of this WaitForSingleSmsOptions. # noqa: E501 + :type: str + """ + allowed_values = ["ASC", "DESC"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and sort_direction not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `sort_direction` ({0}), must be one of {1}" # noqa: E501 + .format(sort_direction, allowed_values) + ) + + self._sort_direction = sort_direction + + @property + def delay(self): + """Gets the delay of this WaitForSingleSmsOptions. # noqa: E501 + + + :return: The delay of this WaitForSingleSmsOptions. # noqa: E501 + :rtype: int + """ + return self._delay + + @delay.setter + def delay(self, delay): + """Sets the delay of this WaitForSingleSmsOptions. + + + :param delay: The delay of this WaitForSingleSmsOptions. # noqa: E501 + :type: int + """ + + self._delay = delay + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WaitForSingleSmsOptions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WaitForSingleSmsOptions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/wait_for_sms_conditions.py b/mailslurp_client/models/wait_for_sms_conditions.py new file mode 100644 index 00000000..6d05fe2d --- /dev/null +++ b/mailslurp_client/models/wait_for_sms_conditions.py @@ -0,0 +1,418 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class WaitForSmsConditions(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'phone_number_id': 'str', + 'limit': 'int', + 'count': 'int', + 'delay_timeout': 'int', + 'timeout': 'int', + 'unread_only': 'bool', + 'count_type': 'str', + 'matches': 'list[SmsMatchOption]', + 'sort_direction': 'str', + 'since': 'datetime', + 'before': 'datetime' + } + + attribute_map = { + 'phone_number_id': 'phoneNumberId', + 'limit': 'limit', + 'count': 'count', + 'delay_timeout': 'delayTimeout', + 'timeout': 'timeout', + 'unread_only': 'unreadOnly', + 'count_type': 'countType', + 'matches': 'matches', + 'sort_direction': 'sortDirection', + 'since': 'since', + 'before': 'before' + } + + def __init__(self, phone_number_id=None, limit=None, count=None, delay_timeout=None, timeout=None, unread_only=None, count_type=None, matches=None, sort_direction=None, since=None, before=None, local_vars_configuration=None): # noqa: E501 + """WaitForSmsConditions - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._phone_number_id = None + self._limit = None + self._count = None + self._delay_timeout = None + self._timeout = None + self._unread_only = None + self._count_type = None + self._matches = None + self._sort_direction = None + self._since = None + self._before = None + self.discriminator = None + + self.phone_number_id = phone_number_id + if limit is not None: + self.limit = limit + self.count = count + if delay_timeout is not None: + self.delay_timeout = delay_timeout + self.timeout = timeout + if unread_only is not None: + self.unread_only = unread_only + if count_type is not None: + self.count_type = count_type + if matches is not None: + self.matches = matches + if sort_direction is not None: + self.sort_direction = sort_direction + if since is not None: + self.since = since + if before is not None: + self.before = before + + @property + def phone_number_id(self): + """Gets the phone_number_id of this WaitForSmsConditions. # noqa: E501 + + ID of phone number to search within and apply conditions to. Essentially filtering the SMS found to give a count. # noqa: E501 + + :return: The phone_number_id of this WaitForSmsConditions. # noqa: E501 + :rtype: str + """ + return self._phone_number_id + + @phone_number_id.setter + def phone_number_id(self, phone_number_id): + """Sets the phone_number_id of this WaitForSmsConditions. + + ID of phone number to search within and apply conditions to. Essentially filtering the SMS found to give a count. # noqa: E501 + + :param phone_number_id: The phone_number_id of this WaitForSmsConditions. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and phone_number_id is None: # noqa: E501 + raise ValueError("Invalid value for `phone_number_id`, must not be `None`") # noqa: E501 + + self._phone_number_id = phone_number_id + + @property + def limit(self): + """Gets the limit of this WaitForSmsConditions. # noqa: E501 + + Limit results # noqa: E501 + + :return: The limit of this WaitForSmsConditions. # noqa: E501 + :rtype: int + """ + return self._limit + + @limit.setter + def limit(self, limit): + """Sets the limit of this WaitForSmsConditions. + + Limit results # noqa: E501 + + :param limit: The limit of this WaitForSmsConditions. # noqa: E501 + :type: int + """ + + self._limit = limit + + @property + def count(self): + """Gets the count of this WaitForSmsConditions. # noqa: E501 + + Number of results that should match conditions. Either exactly or at least this amount based on the `countType`. If count condition is not met and the timeout has not been reached the `waitFor` method will retry the operation. # noqa: E501 + + :return: The count of this WaitForSmsConditions. # noqa: E501 + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """Sets the count of this WaitForSmsConditions. + + Number of results that should match conditions. Either exactly or at least this amount based on the `countType`. If count condition is not met and the timeout has not been reached the `waitFor` method will retry the operation. # noqa: E501 + + :param count: The count of this WaitForSmsConditions. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and count is None: # noqa: E501 + raise ValueError("Invalid value for `count`, must not be `None`") # noqa: E501 + + self._count = count + + @property + def delay_timeout(self): + """Gets the delay_timeout of this WaitForSmsConditions. # noqa: E501 + + Max time in milliseconds to wait between retries if a `timeout` is specified. # noqa: E501 + + :return: The delay_timeout of this WaitForSmsConditions. # noqa: E501 + :rtype: int + """ + return self._delay_timeout + + @delay_timeout.setter + def delay_timeout(self, delay_timeout): + """Sets the delay_timeout of this WaitForSmsConditions. + + Max time in milliseconds to wait between retries if a `timeout` is specified. # noqa: E501 + + :param delay_timeout: The delay_timeout of this WaitForSmsConditions. # noqa: E501 + :type: int + """ + + self._delay_timeout = delay_timeout + + @property + def timeout(self): + """Gets the timeout of this WaitForSmsConditions. # noqa: E501 + + Max time in milliseconds to retry the `waitFor` operation until conditions are met. # noqa: E501 + + :return: The timeout of this WaitForSmsConditions. # noqa: E501 + :rtype: int + """ + return self._timeout + + @timeout.setter + def timeout(self, timeout): + """Sets the timeout of this WaitForSmsConditions. + + Max time in milliseconds to retry the `waitFor` operation until conditions are met. # noqa: E501 + + :param timeout: The timeout of this WaitForSmsConditions. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and timeout is None: # noqa: E501 + raise ValueError("Invalid value for `timeout`, must not be `None`") # noqa: E501 + + self._timeout = timeout + + @property + def unread_only(self): + """Gets the unread_only of this WaitForSmsConditions. # noqa: E501 + + Apply conditions only to **unread** SMS. All SMS messages begin with `read=false`. An SMS is marked `read=true` when an `SMS` has been returned to the user at least once. For example you have called `getSms` or `waitForSms` etc., or you have viewed the SMS in the dashboard. # noqa: E501 + + :return: The unread_only of this WaitForSmsConditions. # noqa: E501 + :rtype: bool + """ + return self._unread_only + + @unread_only.setter + def unread_only(self, unread_only): + """Sets the unread_only of this WaitForSmsConditions. + + Apply conditions only to **unread** SMS. All SMS messages begin with `read=false`. An SMS is marked `read=true` when an `SMS` has been returned to the user at least once. For example you have called `getSms` or `waitForSms` etc., or you have viewed the SMS in the dashboard. # noqa: E501 + + :param unread_only: The unread_only of this WaitForSmsConditions. # noqa: E501 + :type: bool + """ + + self._unread_only = unread_only + + @property + def count_type(self): + """Gets the count_type of this WaitForSmsConditions. # noqa: E501 + + How result size should be compared with the expected size. Exactly or at-least matching result? # noqa: E501 + + :return: The count_type of this WaitForSmsConditions. # noqa: E501 + :rtype: str + """ + return self._count_type + + @count_type.setter + def count_type(self, count_type): + """Sets the count_type of this WaitForSmsConditions. + + How result size should be compared with the expected size. Exactly or at-least matching result? # noqa: E501 + + :param count_type: The count_type of this WaitForSmsConditions. # noqa: E501 + :type: str + """ + allowed_values = ["EXACTLY", "ATLEAST"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and count_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `count_type` ({0}), must be one of {1}" # noqa: E501 + .format(count_type, allowed_values) + ) + + self._count_type = count_type + + @property + def matches(self): + """Gets the matches of this WaitForSmsConditions. # noqa: E501 + + Conditions that should be matched for an SMS to qualify for results. Each condition will be applied in order to each SMS within a phone number to filter a result list of matching SMSs you are waiting for. # noqa: E501 + + :return: The matches of this WaitForSmsConditions. # noqa: E501 + :rtype: list[SmsMatchOption] + """ + return self._matches + + @matches.setter + def matches(self, matches): + """Sets the matches of this WaitForSmsConditions. + + Conditions that should be matched for an SMS to qualify for results. Each condition will be applied in order to each SMS within a phone number to filter a result list of matching SMSs you are waiting for. # noqa: E501 + + :param matches: The matches of this WaitForSmsConditions. # noqa: E501 + :type: list[SmsMatchOption] + """ + + self._matches = matches + + @property + def sort_direction(self): + """Gets the sort_direction of this WaitForSmsConditions. # noqa: E501 + + Direction to sort matching SMSs by created time # noqa: E501 + + :return: The sort_direction of this WaitForSmsConditions. # noqa: E501 + :rtype: str + """ + return self._sort_direction + + @sort_direction.setter + def sort_direction(self, sort_direction): + """Sets the sort_direction of this WaitForSmsConditions. + + Direction to sort matching SMSs by created time # noqa: E501 + + :param sort_direction: The sort_direction of this WaitForSmsConditions. # noqa: E501 + :type: str + """ + allowed_values = ["ASC", "DESC"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and sort_direction not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `sort_direction` ({0}), must be one of {1}" # noqa: E501 + .format(sort_direction, allowed_values) + ) + + self._sort_direction = sort_direction + + @property + def since(self): + """Gets the since of this WaitForSmsConditions. # noqa: E501 + + ISO Date Time earliest time of SMS to consider. Filter for matching SMSs that were received after this date # noqa: E501 + + :return: The since of this WaitForSmsConditions. # noqa: E501 + :rtype: datetime + """ + return self._since + + @since.setter + def since(self, since): + """Sets the since of this WaitForSmsConditions. + + ISO Date Time earliest time of SMS to consider. Filter for matching SMSs that were received after this date # noqa: E501 + + :param since: The since of this WaitForSmsConditions. # noqa: E501 + :type: datetime + """ + + self._since = since + + @property + def before(self): + """Gets the before of this WaitForSmsConditions. # noqa: E501 + + ISO Date Time latest time of SMS to consider. Filter for matching SMSs that were received before this date # noqa: E501 + + :return: The before of this WaitForSmsConditions. # noqa: E501 + :rtype: datetime + """ + return self._before + + @before.setter + def before(self, before): + """Sets the before of this WaitForSmsConditions. + + ISO Date Time latest time of SMS to consider. Filter for matching SMSs that were received before this date # noqa: E501 + + :param before: The before of this WaitForSmsConditions. # noqa: E501 + :type: datetime + """ + + self._before = before + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WaitForSmsConditions): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WaitForSmsConditions): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/webhook_bounce_payload.py b/mailslurp_client/models/webhook_bounce_payload.py new file mode 100644 index 00000000..2eff6a5e --- /dev/null +++ b/mailslurp_client/models/webhook_bounce_payload.py @@ -0,0 +1,330 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class WebhookBouncePayload(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'message_id': 'str', + 'webhook_id': 'str', + 'event_name': 'str', + 'webhook_name': 'str', + 'bounce_id': 'str', + 'sent_to_recipients': 'list[str]', + 'sender': 'str', + 'bounce_recipients': 'list[str]' + } + + attribute_map = { + 'message_id': 'messageId', + 'webhook_id': 'webhookId', + 'event_name': 'eventName', + 'webhook_name': 'webhookName', + 'bounce_id': 'bounceId', + 'sent_to_recipients': 'sentToRecipients', + 'sender': 'sender', + 'bounce_recipients': 'bounceRecipients' + } + + def __init__(self, message_id=None, webhook_id=None, event_name=None, webhook_name=None, bounce_id=None, sent_to_recipients=None, sender=None, bounce_recipients=None, local_vars_configuration=None): # noqa: E501 + """WebhookBouncePayload - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._message_id = None + self._webhook_id = None + self._event_name = None + self._webhook_name = None + self._bounce_id = None + self._sent_to_recipients = None + self._sender = None + self._bounce_recipients = None + self.discriminator = None + + self.message_id = message_id + self.webhook_id = webhook_id + self.event_name = event_name + if webhook_name is not None: + self.webhook_name = webhook_name + self.bounce_id = bounce_id + if sent_to_recipients is not None: + self.sent_to_recipients = sent_to_recipients + self.sender = sender + if bounce_recipients is not None: + self.bounce_recipients = bounce_recipients + + @property + def message_id(self): + """Gets the message_id of this WebhookBouncePayload. # noqa: E501 + + Idempotent message ID. Store this ID locally or in a database to prevent message duplication. # noqa: E501 + + :return: The message_id of this WebhookBouncePayload. # noqa: E501 + :rtype: str + """ + return self._message_id + + @message_id.setter + def message_id(self, message_id): + """Sets the message_id of this WebhookBouncePayload. + + Idempotent message ID. Store this ID locally or in a database to prevent message duplication. # noqa: E501 + + :param message_id: The message_id of this WebhookBouncePayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message_id is None: # noqa: E501 + raise ValueError("Invalid value for `message_id`, must not be `None`") # noqa: E501 + + self._message_id = message_id + + @property + def webhook_id(self): + """Gets the webhook_id of this WebhookBouncePayload. # noqa: E501 + + ID of webhook entity being triggered # noqa: E501 + + :return: The webhook_id of this WebhookBouncePayload. # noqa: E501 + :rtype: str + """ + return self._webhook_id + + @webhook_id.setter + def webhook_id(self, webhook_id): + """Sets the webhook_id of this WebhookBouncePayload. + + ID of webhook entity being triggered # noqa: E501 + + :param webhook_id: The webhook_id of this WebhookBouncePayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and webhook_id is None: # noqa: E501 + raise ValueError("Invalid value for `webhook_id`, must not be `None`") # noqa: E501 + + self._webhook_id = webhook_id + + @property + def event_name(self): + """Gets the event_name of this WebhookBouncePayload. # noqa: E501 + + Name of the event type webhook is being triggered for. # noqa: E501 + + :return: The event_name of this WebhookBouncePayload. # noqa: E501 + :rtype: str + """ + return self._event_name + + @event_name.setter + def event_name(self, event_name): + """Sets the event_name of this WebhookBouncePayload. + + Name of the event type webhook is being triggered for. # noqa: E501 + + :param event_name: The event_name of this WebhookBouncePayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and event_name is None: # noqa: E501 + raise ValueError("Invalid value for `event_name`, must not be `None`") # noqa: E501 + allowed_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and event_name not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `event_name` ({0}), must be one of {1}" # noqa: E501 + .format(event_name, allowed_values) + ) + + self._event_name = event_name + + @property + def webhook_name(self): + """Gets the webhook_name of this WebhookBouncePayload. # noqa: E501 + + Name of the webhook being triggered # noqa: E501 + + :return: The webhook_name of this WebhookBouncePayload. # noqa: E501 + :rtype: str + """ + return self._webhook_name + + @webhook_name.setter + def webhook_name(self, webhook_name): + """Sets the webhook_name of this WebhookBouncePayload. + + Name of the webhook being triggered # noqa: E501 + + :param webhook_name: The webhook_name of this WebhookBouncePayload. # noqa: E501 + :type: str + """ + + self._webhook_name = webhook_name + + @property + def bounce_id(self): + """Gets the bounce_id of this WebhookBouncePayload. # noqa: E501 + + ID of the bounce email record. Use the ID with the bounce controller to view more information # noqa: E501 + + :return: The bounce_id of this WebhookBouncePayload. # noqa: E501 + :rtype: str + """ + return self._bounce_id + + @bounce_id.setter + def bounce_id(self, bounce_id): + """Sets the bounce_id of this WebhookBouncePayload. + + ID of the bounce email record. Use the ID with the bounce controller to view more information # noqa: E501 + + :param bounce_id: The bounce_id of this WebhookBouncePayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and bounce_id is None: # noqa: E501 + raise ValueError("Invalid value for `bounce_id`, must not be `None`") # noqa: E501 + + self._bounce_id = bounce_id + + @property + def sent_to_recipients(self): + """Gets the sent_to_recipients of this WebhookBouncePayload. # noqa: E501 + + Email sent to recipients # noqa: E501 + + :return: The sent_to_recipients of this WebhookBouncePayload. # noqa: E501 + :rtype: list[str] + """ + return self._sent_to_recipients + + @sent_to_recipients.setter + def sent_to_recipients(self, sent_to_recipients): + """Sets the sent_to_recipients of this WebhookBouncePayload. + + Email sent to recipients # noqa: E501 + + :param sent_to_recipients: The sent_to_recipients of this WebhookBouncePayload. # noqa: E501 + :type: list[str] + """ + + self._sent_to_recipients = sent_to_recipients + + @property + def sender(self): + """Gets the sender of this WebhookBouncePayload. # noqa: E501 + + Sender causing bounce # noqa: E501 + + :return: The sender of this WebhookBouncePayload. # noqa: E501 + :rtype: str + """ + return self._sender + + @sender.setter + def sender(self, sender): + """Sets the sender of this WebhookBouncePayload. + + Sender causing bounce # noqa: E501 + + :param sender: The sender of this WebhookBouncePayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and sender is None: # noqa: E501 + raise ValueError("Invalid value for `sender`, must not be `None`") # noqa: E501 + + self._sender = sender + + @property + def bounce_recipients(self): + """Gets the bounce_recipients of this WebhookBouncePayload. # noqa: E501 + + Email addresses that resulted in a bounce or email being rejected. Please save these recipients and avoid emailing them in the future to maintain your reputation. # noqa: E501 + + :return: The bounce_recipients of this WebhookBouncePayload. # noqa: E501 + :rtype: list[str] + """ + return self._bounce_recipients + + @bounce_recipients.setter + def bounce_recipients(self, bounce_recipients): + """Sets the bounce_recipients of this WebhookBouncePayload. + + Email addresses that resulted in a bounce or email being rejected. Please save these recipients and avoid emailing them in the future to maintain your reputation. # noqa: E501 + + :param bounce_recipients: The bounce_recipients of this WebhookBouncePayload. # noqa: E501 + :type: list[str] + """ + + self._bounce_recipients = bounce_recipients + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WebhookBouncePayload): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebhookBouncePayload): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/webhook_bounce_recipient_payload.py b/mailslurp_client/models/webhook_bounce_recipient_payload.py new file mode 100644 index 00000000..d4218f10 --- /dev/null +++ b/mailslurp_client/models/webhook_bounce_recipient_payload.py @@ -0,0 +1,245 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class WebhookBounceRecipientPayload(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'message_id': 'str', + 'webhook_id': 'str', + 'event_name': 'str', + 'webhook_name': 'str', + 'recipient': 'str' + } + + attribute_map = { + 'message_id': 'messageId', + 'webhook_id': 'webhookId', + 'event_name': 'eventName', + 'webhook_name': 'webhookName', + 'recipient': 'recipient' + } + + def __init__(self, message_id=None, webhook_id=None, event_name=None, webhook_name=None, recipient=None, local_vars_configuration=None): # noqa: E501 + """WebhookBounceRecipientPayload - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._message_id = None + self._webhook_id = None + self._event_name = None + self._webhook_name = None + self._recipient = None + self.discriminator = None + + self.message_id = message_id + self.webhook_id = webhook_id + self.event_name = event_name + if webhook_name is not None: + self.webhook_name = webhook_name + self.recipient = recipient + + @property + def message_id(self): + """Gets the message_id of this WebhookBounceRecipientPayload. # noqa: E501 + + Idempotent message ID. Store this ID locally or in a database to prevent message duplication. # noqa: E501 + + :return: The message_id of this WebhookBounceRecipientPayload. # noqa: E501 + :rtype: str + """ + return self._message_id + + @message_id.setter + def message_id(self, message_id): + """Sets the message_id of this WebhookBounceRecipientPayload. + + Idempotent message ID. Store this ID locally or in a database to prevent message duplication. # noqa: E501 + + :param message_id: The message_id of this WebhookBounceRecipientPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message_id is None: # noqa: E501 + raise ValueError("Invalid value for `message_id`, must not be `None`") # noqa: E501 + + self._message_id = message_id + + @property + def webhook_id(self): + """Gets the webhook_id of this WebhookBounceRecipientPayload. # noqa: E501 + + ID of webhook entity being triggered # noqa: E501 + + :return: The webhook_id of this WebhookBounceRecipientPayload. # noqa: E501 + :rtype: str + """ + return self._webhook_id + + @webhook_id.setter + def webhook_id(self, webhook_id): + """Sets the webhook_id of this WebhookBounceRecipientPayload. + + ID of webhook entity being triggered # noqa: E501 + + :param webhook_id: The webhook_id of this WebhookBounceRecipientPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and webhook_id is None: # noqa: E501 + raise ValueError("Invalid value for `webhook_id`, must not be `None`") # noqa: E501 + + self._webhook_id = webhook_id + + @property + def event_name(self): + """Gets the event_name of this WebhookBounceRecipientPayload. # noqa: E501 + + Name of the event type webhook is being triggered for. # noqa: E501 + + :return: The event_name of this WebhookBounceRecipientPayload. # noqa: E501 + :rtype: str + """ + return self._event_name + + @event_name.setter + def event_name(self, event_name): + """Sets the event_name of this WebhookBounceRecipientPayload. + + Name of the event type webhook is being triggered for. # noqa: E501 + + :param event_name: The event_name of this WebhookBounceRecipientPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and event_name is None: # noqa: E501 + raise ValueError("Invalid value for `event_name`, must not be `None`") # noqa: E501 + allowed_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and event_name not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `event_name` ({0}), must be one of {1}" # noqa: E501 + .format(event_name, allowed_values) + ) + + self._event_name = event_name + + @property + def webhook_name(self): + """Gets the webhook_name of this WebhookBounceRecipientPayload. # noqa: E501 + + Name of the webhook being triggered # noqa: E501 + + :return: The webhook_name of this WebhookBounceRecipientPayload. # noqa: E501 + :rtype: str + """ + return self._webhook_name + + @webhook_name.setter + def webhook_name(self, webhook_name): + """Sets the webhook_name of this WebhookBounceRecipientPayload. + + Name of the webhook being triggered # noqa: E501 + + :param webhook_name: The webhook_name of this WebhookBounceRecipientPayload. # noqa: E501 + :type: str + """ + + self._webhook_name = webhook_name + + @property + def recipient(self): + """Gets the recipient of this WebhookBounceRecipientPayload. # noqa: E501 + + Email address that caused a bounce. Make note of the address and try not to message it again to preserve your reputation. # noqa: E501 + + :return: The recipient of this WebhookBounceRecipientPayload. # noqa: E501 + :rtype: str + """ + return self._recipient + + @recipient.setter + def recipient(self, recipient): + """Sets the recipient of this WebhookBounceRecipientPayload. + + Email address that caused a bounce. Make note of the address and try not to message it again to preserve your reputation. # noqa: E501 + + :param recipient: The recipient of this WebhookBounceRecipientPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and recipient is None: # noqa: E501 + raise ValueError("Invalid value for `recipient`, must not be `None`") # noqa: E501 + + self._recipient = recipient + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WebhookBounceRecipientPayload): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebhookBounceRecipientPayload): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/webhook_delivery_status_payload.py b/mailslurp_client/models/webhook_delivery_status_payload.py new file mode 100644 index 00000000..a2bc40b3 --- /dev/null +++ b/mailslurp_client/models/webhook_delivery_status_payload.py @@ -0,0 +1,544 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class WebhookDeliveryStatusPayload(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'message_id': 'str', + 'webhook_id': 'str', + 'event_name': 'str', + 'webhook_name': 'str', + 'id': 'str', + 'user_id': 'str', + 'sent_id': 'str', + 'remote_mta_ip': 'str', + 'inbox_id': 'str', + 'reporting_mta': 'str', + 'recipients': 'list[str]', + 'smtp_response': 'str', + 'smtp_status_code': 'int', + 'processing_time_millis': 'int', + 'received': 'datetime', + 'subject': 'str' + } + + attribute_map = { + 'message_id': 'messageId', + 'webhook_id': 'webhookId', + 'event_name': 'eventName', + 'webhook_name': 'webhookName', + 'id': 'id', + 'user_id': 'userId', + 'sent_id': 'sentId', + 'remote_mta_ip': 'remoteMtaIp', + 'inbox_id': 'inboxId', + 'reporting_mta': 'reportingMta', + 'recipients': 'recipients', + 'smtp_response': 'smtpResponse', + 'smtp_status_code': 'smtpStatusCode', + 'processing_time_millis': 'processingTimeMillis', + 'received': 'received', + 'subject': 'subject' + } + + def __init__(self, message_id=None, webhook_id=None, event_name=None, webhook_name=None, id=None, user_id=None, sent_id=None, remote_mta_ip=None, inbox_id=None, reporting_mta=None, recipients=None, smtp_response=None, smtp_status_code=None, processing_time_millis=None, received=None, subject=None, local_vars_configuration=None): # noqa: E501 + """WebhookDeliveryStatusPayload - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._message_id = None + self._webhook_id = None + self._event_name = None + self._webhook_name = None + self._id = None + self._user_id = None + self._sent_id = None + self._remote_mta_ip = None + self._inbox_id = None + self._reporting_mta = None + self._recipients = None + self._smtp_response = None + self._smtp_status_code = None + self._processing_time_millis = None + self._received = None + self._subject = None + self.discriminator = None + + self.message_id = message_id + self.webhook_id = webhook_id + self.event_name = event_name + if webhook_name is not None: + self.webhook_name = webhook_name + self.id = id + self.user_id = user_id + self.sent_id = sent_id + self.remote_mta_ip = remote_mta_ip + self.inbox_id = inbox_id + self.reporting_mta = reporting_mta + self.recipients = recipients + self.smtp_response = smtp_response + self.smtp_status_code = smtp_status_code + self.processing_time_millis = processing_time_millis + self.received = received + self.subject = subject + + @property + def message_id(self): + """Gets the message_id of this WebhookDeliveryStatusPayload. # noqa: E501 + + Idempotent message ID. Store this ID locally or in a database to prevent message duplication. # noqa: E501 + + :return: The message_id of this WebhookDeliveryStatusPayload. # noqa: E501 + :rtype: str + """ + return self._message_id + + @message_id.setter + def message_id(self, message_id): + """Sets the message_id of this WebhookDeliveryStatusPayload. + + Idempotent message ID. Store this ID locally or in a database to prevent message duplication. # noqa: E501 + + :param message_id: The message_id of this WebhookDeliveryStatusPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message_id is None: # noqa: E501 + raise ValueError("Invalid value for `message_id`, must not be `None`") # noqa: E501 + + self._message_id = message_id + + @property + def webhook_id(self): + """Gets the webhook_id of this WebhookDeliveryStatusPayload. # noqa: E501 + + ID of webhook entity being triggered # noqa: E501 + + :return: The webhook_id of this WebhookDeliveryStatusPayload. # noqa: E501 + :rtype: str + """ + return self._webhook_id + + @webhook_id.setter + def webhook_id(self, webhook_id): + """Sets the webhook_id of this WebhookDeliveryStatusPayload. + + ID of webhook entity being triggered # noqa: E501 + + :param webhook_id: The webhook_id of this WebhookDeliveryStatusPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and webhook_id is None: # noqa: E501 + raise ValueError("Invalid value for `webhook_id`, must not be `None`") # noqa: E501 + + self._webhook_id = webhook_id + + @property + def event_name(self): + """Gets the event_name of this WebhookDeliveryStatusPayload. # noqa: E501 + + Name of the event type webhook is being triggered for. # noqa: E501 + + :return: The event_name of this WebhookDeliveryStatusPayload. # noqa: E501 + :rtype: str + """ + return self._event_name + + @event_name.setter + def event_name(self, event_name): + """Sets the event_name of this WebhookDeliveryStatusPayload. + + Name of the event type webhook is being triggered for. # noqa: E501 + + :param event_name: The event_name of this WebhookDeliveryStatusPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and event_name is None: # noqa: E501 + raise ValueError("Invalid value for `event_name`, must not be `None`") # noqa: E501 + allowed_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and event_name not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `event_name` ({0}), must be one of {1}" # noqa: E501 + .format(event_name, allowed_values) + ) + + self._event_name = event_name + + @property + def webhook_name(self): + """Gets the webhook_name of this WebhookDeliveryStatusPayload. # noqa: E501 + + Name of the webhook being triggered # noqa: E501 + + :return: The webhook_name of this WebhookDeliveryStatusPayload. # noqa: E501 + :rtype: str + """ + return self._webhook_name + + @webhook_name.setter + def webhook_name(self, webhook_name): + """Sets the webhook_name of this WebhookDeliveryStatusPayload. + + Name of the webhook being triggered # noqa: E501 + + :param webhook_name: The webhook_name of this WebhookDeliveryStatusPayload. # noqa: E501 + :type: str + """ + + self._webhook_name = webhook_name + + @property + def id(self): + """Gets the id of this WebhookDeliveryStatusPayload. # noqa: E501 + + ID of delivery status # noqa: E501 + + :return: The id of this WebhookDeliveryStatusPayload. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this WebhookDeliveryStatusPayload. + + ID of delivery status # noqa: E501 + + :param id: The id of this WebhookDeliveryStatusPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def user_id(self): + """Gets the user_id of this WebhookDeliveryStatusPayload. # noqa: E501 + + User ID of event # noqa: E501 + + :return: The user_id of this WebhookDeliveryStatusPayload. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this WebhookDeliveryStatusPayload. + + User ID of event # noqa: E501 + + :param user_id: The user_id of this WebhookDeliveryStatusPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def sent_id(self): + """Gets the sent_id of this WebhookDeliveryStatusPayload. # noqa: E501 + + ID of sent email # noqa: E501 + + :return: The sent_id of this WebhookDeliveryStatusPayload. # noqa: E501 + :rtype: str + """ + return self._sent_id + + @sent_id.setter + def sent_id(self, sent_id): + """Sets the sent_id of this WebhookDeliveryStatusPayload. + + ID of sent email # noqa: E501 + + :param sent_id: The sent_id of this WebhookDeliveryStatusPayload. # noqa: E501 + :type: str + """ + + self._sent_id = sent_id + + @property + def remote_mta_ip(self): + """Gets the remote_mta_ip of this WebhookDeliveryStatusPayload. # noqa: E501 + + IP address of the remote Mail Transfer Agent # noqa: E501 + + :return: The remote_mta_ip of this WebhookDeliveryStatusPayload. # noqa: E501 + :rtype: str + """ + return self._remote_mta_ip + + @remote_mta_ip.setter + def remote_mta_ip(self, remote_mta_ip): + """Sets the remote_mta_ip of this WebhookDeliveryStatusPayload. + + IP address of the remote Mail Transfer Agent # noqa: E501 + + :param remote_mta_ip: The remote_mta_ip of this WebhookDeliveryStatusPayload. # noqa: E501 + :type: str + """ + + self._remote_mta_ip = remote_mta_ip + + @property + def inbox_id(self): + """Gets the inbox_id of this WebhookDeliveryStatusPayload. # noqa: E501 + + Id of the inbox # noqa: E501 + + :return: The inbox_id of this WebhookDeliveryStatusPayload. # noqa: E501 + :rtype: str + """ + return self._inbox_id + + @inbox_id.setter + def inbox_id(self, inbox_id): + """Sets the inbox_id of this WebhookDeliveryStatusPayload. + + Id of the inbox # noqa: E501 + + :param inbox_id: The inbox_id of this WebhookDeliveryStatusPayload. # noqa: E501 + :type: str + """ + + self._inbox_id = inbox_id + + @property + def reporting_mta(self): + """Gets the reporting_mta of this WebhookDeliveryStatusPayload. # noqa: E501 + + Mail Transfer Agent reporting delivery status # noqa: E501 + + :return: The reporting_mta of this WebhookDeliveryStatusPayload. # noqa: E501 + :rtype: str + """ + return self._reporting_mta + + @reporting_mta.setter + def reporting_mta(self, reporting_mta): + """Sets the reporting_mta of this WebhookDeliveryStatusPayload. + + Mail Transfer Agent reporting delivery status # noqa: E501 + + :param reporting_mta: The reporting_mta of this WebhookDeliveryStatusPayload. # noqa: E501 + :type: str + """ + + self._reporting_mta = reporting_mta + + @property + def recipients(self): + """Gets the recipients of this WebhookDeliveryStatusPayload. # noqa: E501 + + Recipients for delivery # noqa: E501 + + :return: The recipients of this WebhookDeliveryStatusPayload. # noqa: E501 + :rtype: list[str] + """ + return self._recipients + + @recipients.setter + def recipients(self, recipients): + """Sets the recipients of this WebhookDeliveryStatusPayload. + + Recipients for delivery # noqa: E501 + + :param recipients: The recipients of this WebhookDeliveryStatusPayload. # noqa: E501 + :type: list[str] + """ + + self._recipients = recipients + + @property + def smtp_response(self): + """Gets the smtp_response of this WebhookDeliveryStatusPayload. # noqa: E501 + + SMTP server response message # noqa: E501 + + :return: The smtp_response of this WebhookDeliveryStatusPayload. # noqa: E501 + :rtype: str + """ + return self._smtp_response + + @smtp_response.setter + def smtp_response(self, smtp_response): + """Sets the smtp_response of this WebhookDeliveryStatusPayload. + + SMTP server response message # noqa: E501 + + :param smtp_response: The smtp_response of this WebhookDeliveryStatusPayload. # noqa: E501 + :type: str + """ + + self._smtp_response = smtp_response + + @property + def smtp_status_code(self): + """Gets the smtp_status_code of this WebhookDeliveryStatusPayload. # noqa: E501 + + SMTP server status # noqa: E501 + + :return: The smtp_status_code of this WebhookDeliveryStatusPayload. # noqa: E501 + :rtype: int + """ + return self._smtp_status_code + + @smtp_status_code.setter + def smtp_status_code(self, smtp_status_code): + """Sets the smtp_status_code of this WebhookDeliveryStatusPayload. + + SMTP server status # noqa: E501 + + :param smtp_status_code: The smtp_status_code of this WebhookDeliveryStatusPayload. # noqa: E501 + :type: int + """ + + self._smtp_status_code = smtp_status_code + + @property + def processing_time_millis(self): + """Gets the processing_time_millis of this WebhookDeliveryStatusPayload. # noqa: E501 + + Time in milliseconds for delivery processing # noqa: E501 + + :return: The processing_time_millis of this WebhookDeliveryStatusPayload. # noqa: E501 + :rtype: int + """ + return self._processing_time_millis + + @processing_time_millis.setter + def processing_time_millis(self, processing_time_millis): + """Sets the processing_time_millis of this WebhookDeliveryStatusPayload. + + Time in milliseconds for delivery processing # noqa: E501 + + :param processing_time_millis: The processing_time_millis of this WebhookDeliveryStatusPayload. # noqa: E501 + :type: int + """ + + self._processing_time_millis = processing_time_millis + + @property + def received(self): + """Gets the received of this WebhookDeliveryStatusPayload. # noqa: E501 + + Time event was received # noqa: E501 + + :return: The received of this WebhookDeliveryStatusPayload. # noqa: E501 + :rtype: datetime + """ + return self._received + + @received.setter + def received(self, received): + """Sets the received of this WebhookDeliveryStatusPayload. + + Time event was received # noqa: E501 + + :param received: The received of this WebhookDeliveryStatusPayload. # noqa: E501 + :type: datetime + """ + + self._received = received + + @property + def subject(self): + """Gets the subject of this WebhookDeliveryStatusPayload. # noqa: E501 + + Email subject # noqa: E501 + + :return: The subject of this WebhookDeliveryStatusPayload. # noqa: E501 + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this WebhookDeliveryStatusPayload. + + Email subject # noqa: E501 + + :param subject: The subject of this WebhookDeliveryStatusPayload. # noqa: E501 + :type: str + """ + + self._subject = subject + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WebhookDeliveryStatusPayload): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebhookDeliveryStatusPayload): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/webhook_dto.py b/mailslurp_client/models/webhook_dto.py new file mode 100644 index 00000000..e4911639 --- /dev/null +++ b/mailslurp_client/models/webhook_dto.py @@ -0,0 +1,469 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class WebhookDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'user_id': 'str', + 'basic_auth': 'bool', + 'name': 'str', + 'phone_id': 'str', + 'inbox_id': 'str', + 'url': 'str', + 'method': 'str', + 'payload_json_schema': 'str', + 'created_at': 'datetime', + 'updated_at': 'datetime', + 'event_name': 'str', + 'request_headers': 'WebhookHeaders' + } + + attribute_map = { + 'id': 'id', + 'user_id': 'userId', + 'basic_auth': 'basicAuth', + 'name': 'name', + 'phone_id': 'phoneId', + 'inbox_id': 'inboxId', + 'url': 'url', + 'method': 'method', + 'payload_json_schema': 'payloadJsonSchema', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt', + 'event_name': 'eventName', + 'request_headers': 'requestHeaders' + } + + def __init__(self, id=None, user_id=None, basic_auth=None, name=None, phone_id=None, inbox_id=None, url=None, method=None, payload_json_schema=None, created_at=None, updated_at=None, event_name=None, request_headers=None, local_vars_configuration=None): # noqa: E501 + """WebhookDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._user_id = None + self._basic_auth = None + self._name = None + self._phone_id = None + self._inbox_id = None + self._url = None + self._method = None + self._payload_json_schema = None + self._created_at = None + self._updated_at = None + self._event_name = None + self._request_headers = None + self.discriminator = None + + self.id = id + self.user_id = user_id + self.basic_auth = basic_auth + self.name = name + self.phone_id = phone_id + self.inbox_id = inbox_id + self.url = url + self.method = method + self.payload_json_schema = payload_json_schema + self.created_at = created_at + self.updated_at = updated_at + self.event_name = event_name + if request_headers is not None: + self.request_headers = request_headers + + @property + def id(self): + """Gets the id of this WebhookDto. # noqa: E501 + + ID of the Webhook # noqa: E501 + + :return: The id of this WebhookDto. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this WebhookDto. + + ID of the Webhook # noqa: E501 + + :param id: The id of this WebhookDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def user_id(self): + """Gets the user_id of this WebhookDto. # noqa: E501 + + User ID of the Webhook # noqa: E501 + + :return: The user_id of this WebhookDto. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this WebhookDto. + + User ID of the Webhook # noqa: E501 + + :param user_id: The user_id of this WebhookDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def basic_auth(self): + """Gets the basic_auth of this WebhookDto. # noqa: E501 + + Does webhook expect basic authentication? If true it means you created this webhook with a username and password. MailSlurp will use these in the URL to authenticate itself. # noqa: E501 + + :return: The basic_auth of this WebhookDto. # noqa: E501 + :rtype: bool + """ + return self._basic_auth + + @basic_auth.setter + def basic_auth(self, basic_auth): + """Sets the basic_auth of this WebhookDto. + + Does webhook expect basic authentication? If true it means you created this webhook with a username and password. MailSlurp will use these in the URL to authenticate itself. # noqa: E501 + + :param basic_auth: The basic_auth of this WebhookDto. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and basic_auth is None: # noqa: E501 + raise ValueError("Invalid value for `basic_auth`, must not be `None`") # noqa: E501 + + self._basic_auth = basic_auth + + @property + def name(self): + """Gets the name of this WebhookDto. # noqa: E501 + + Name of the webhook # noqa: E501 + + :return: The name of this WebhookDto. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this WebhookDto. + + Name of the webhook # noqa: E501 + + :param name: The name of this WebhookDto. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def phone_id(self): + """Gets the phone_id of this WebhookDto. # noqa: E501 + + The phoneNumberId that the Webhook will be triggered by. If null then webhook triggered at account level or inbox level if inboxId set # noqa: E501 + + :return: The phone_id of this WebhookDto. # noqa: E501 + :rtype: str + """ + return self._phone_id + + @phone_id.setter + def phone_id(self, phone_id): + """Sets the phone_id of this WebhookDto. + + The phoneNumberId that the Webhook will be triggered by. If null then webhook triggered at account level or inbox level if inboxId set # noqa: E501 + + :param phone_id: The phone_id of this WebhookDto. # noqa: E501 + :type: str + """ + + self._phone_id = phone_id + + @property + def inbox_id(self): + """Gets the inbox_id of this WebhookDto. # noqa: E501 + + The inbox that the Webhook will be triggered by. If null then webhook triggered at account level or phone level if phoneId set # noqa: E501 + + :return: The inbox_id of this WebhookDto. # noqa: E501 + :rtype: str + """ + return self._inbox_id + + @inbox_id.setter + def inbox_id(self, inbox_id): + """Sets the inbox_id of this WebhookDto. + + The inbox that the Webhook will be triggered by. If null then webhook triggered at account level or phone level if phoneId set # noqa: E501 + + :param inbox_id: The inbox_id of this WebhookDto. # noqa: E501 + :type: str + """ + + self._inbox_id = inbox_id + + @property + def url(self): + """Gets the url of this WebhookDto. # noqa: E501 + + URL of your server that the webhook will be sent to. The schema of the JSON that is sent is described by the payloadJsonSchema. # noqa: E501 + + :return: The url of this WebhookDto. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this WebhookDto. + + URL of your server that the webhook will be sent to. The schema of the JSON that is sent is described by the payloadJsonSchema. # noqa: E501 + + :param url: The url of this WebhookDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and url is None: # noqa: E501 + raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501 + + self._url = url + + @property + def method(self): + """Gets the method of this WebhookDto. # noqa: E501 + + HTTP method that your server endpoint must listen for # noqa: E501 + + :return: The method of this WebhookDto. # noqa: E501 + :rtype: str + """ + return self._method + + @method.setter + def method(self, method): + """Sets the method of this WebhookDto. + + HTTP method that your server endpoint must listen for # noqa: E501 + + :param method: The method of this WebhookDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and method is None: # noqa: E501 + raise ValueError("Invalid value for `method`, must not be `None`") # noqa: E501 + allowed_values = ["GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "TRACE"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and method not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `method` ({0}), must be one of {1}" # noqa: E501 + .format(method, allowed_values) + ) + + self._method = method + + @property + def payload_json_schema(self): + """Gets the payload_json_schema of this WebhookDto. # noqa: E501 + + Deprecated. Fetch JSON Schema for webhook using the getJsonSchemaForWebhookPayload method # noqa: E501 + + :return: The payload_json_schema of this WebhookDto. # noqa: E501 + :rtype: str + """ + return self._payload_json_schema + + @payload_json_schema.setter + def payload_json_schema(self, payload_json_schema): + """Sets the payload_json_schema of this WebhookDto. + + Deprecated. Fetch JSON Schema for webhook using the getJsonSchemaForWebhookPayload method # noqa: E501 + + :param payload_json_schema: The payload_json_schema of this WebhookDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and payload_json_schema is None: # noqa: E501 + raise ValueError("Invalid value for `payload_json_schema`, must not be `None`") # noqa: E501 + + self._payload_json_schema = payload_json_schema + + @property + def created_at(self): + """Gets the created_at of this WebhookDto. # noqa: E501 + + When the webhook was created # noqa: E501 + + :return: The created_at of this WebhookDto. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this WebhookDto. + + When the webhook was created # noqa: E501 + + :param created_at: The created_at of this WebhookDto. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def updated_at(self): + """Gets the updated_at of this WebhookDto. # noqa: E501 + + + :return: The updated_at of this WebhookDto. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this WebhookDto. + + + :param updated_at: The updated_at of this WebhookDto. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and updated_at is None: # noqa: E501 + raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501 + + self._updated_at = updated_at + + @property + def event_name(self): + """Gets the event_name of this WebhookDto. # noqa: E501 + + Webhook trigger event name # noqa: E501 + + :return: The event_name of this WebhookDto. # noqa: E501 + :rtype: str + """ + return self._event_name + + @event_name.setter + def event_name(self, event_name): + """Sets the event_name of this WebhookDto. + + Webhook trigger event name # noqa: E501 + + :param event_name: The event_name of this WebhookDto. # noqa: E501 + :type: str + """ + allowed_values = [None,"EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and event_name not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `event_name` ({0}), must be one of {1}" # noqa: E501 + .format(event_name, allowed_values) + ) + + self._event_name = event_name + + @property + def request_headers(self): + """Gets the request_headers of this WebhookDto. # noqa: E501 + + + :return: The request_headers of this WebhookDto. # noqa: E501 + :rtype: WebhookHeaders + """ + return self._request_headers + + @request_headers.setter + def request_headers(self, request_headers): + """Sets the request_headers of this WebhookDto. + + + :param request_headers: The request_headers of this WebhookDto. # noqa: E501 + :type: WebhookHeaders + """ + + self._request_headers = request_headers + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WebhookDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebhookDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/webhook_email_opened_payload.py b/mailslurp_client/models/webhook_email_opened_payload.py new file mode 100644 index 00000000..b5235f36 --- /dev/null +++ b/mailslurp_client/models/webhook_email_opened_payload.py @@ -0,0 +1,361 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class WebhookEmailOpenedPayload(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'message_id': 'str', + 'webhook_id': 'str', + 'event_name': 'str', + 'webhook_name': 'str', + 'inbox_id': 'str', + 'pixel_id': 'str', + 'sent_email_id': 'str', + 'recipient': 'str', + 'created_at': 'datetime' + } + + attribute_map = { + 'message_id': 'messageId', + 'webhook_id': 'webhookId', + 'event_name': 'eventName', + 'webhook_name': 'webhookName', + 'inbox_id': 'inboxId', + 'pixel_id': 'pixelId', + 'sent_email_id': 'sentEmailId', + 'recipient': 'recipient', + 'created_at': 'createdAt' + } + + def __init__(self, message_id=None, webhook_id=None, event_name=None, webhook_name=None, inbox_id=None, pixel_id=None, sent_email_id=None, recipient=None, created_at=None, local_vars_configuration=None): # noqa: E501 + """WebhookEmailOpenedPayload - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._message_id = None + self._webhook_id = None + self._event_name = None + self._webhook_name = None + self._inbox_id = None + self._pixel_id = None + self._sent_email_id = None + self._recipient = None + self._created_at = None + self.discriminator = None + + self.message_id = message_id + self.webhook_id = webhook_id + self.event_name = event_name + if webhook_name is not None: + self.webhook_name = webhook_name + self.inbox_id = inbox_id + self.pixel_id = pixel_id + self.sent_email_id = sent_email_id + self.recipient = recipient + self.created_at = created_at + + @property + def message_id(self): + """Gets the message_id of this WebhookEmailOpenedPayload. # noqa: E501 + + Idempotent message ID. Store this ID locally or in a database to prevent message duplication. # noqa: E501 + + :return: The message_id of this WebhookEmailOpenedPayload. # noqa: E501 + :rtype: str + """ + return self._message_id + + @message_id.setter + def message_id(self, message_id): + """Sets the message_id of this WebhookEmailOpenedPayload. + + Idempotent message ID. Store this ID locally or in a database to prevent message duplication. # noqa: E501 + + :param message_id: The message_id of this WebhookEmailOpenedPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message_id is None: # noqa: E501 + raise ValueError("Invalid value for `message_id`, must not be `None`") # noqa: E501 + + self._message_id = message_id + + @property + def webhook_id(self): + """Gets the webhook_id of this WebhookEmailOpenedPayload. # noqa: E501 + + ID of webhook entity being triggered # noqa: E501 + + :return: The webhook_id of this WebhookEmailOpenedPayload. # noqa: E501 + :rtype: str + """ + return self._webhook_id + + @webhook_id.setter + def webhook_id(self, webhook_id): + """Sets the webhook_id of this WebhookEmailOpenedPayload. + + ID of webhook entity being triggered # noqa: E501 + + :param webhook_id: The webhook_id of this WebhookEmailOpenedPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and webhook_id is None: # noqa: E501 + raise ValueError("Invalid value for `webhook_id`, must not be `None`") # noqa: E501 + + self._webhook_id = webhook_id + + @property + def event_name(self): + """Gets the event_name of this WebhookEmailOpenedPayload. # noqa: E501 + + Name of the event type webhook is being triggered for. # noqa: E501 + + :return: The event_name of this WebhookEmailOpenedPayload. # noqa: E501 + :rtype: str + """ + return self._event_name + + @event_name.setter + def event_name(self, event_name): + """Sets the event_name of this WebhookEmailOpenedPayload. + + Name of the event type webhook is being triggered for. # noqa: E501 + + :param event_name: The event_name of this WebhookEmailOpenedPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and event_name is None: # noqa: E501 + raise ValueError("Invalid value for `event_name`, must not be `None`") # noqa: E501 + allowed_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and event_name not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `event_name` ({0}), must be one of {1}" # noqa: E501 + .format(event_name, allowed_values) + ) + + self._event_name = event_name + + @property + def webhook_name(self): + """Gets the webhook_name of this WebhookEmailOpenedPayload. # noqa: E501 + + Name of the webhook being triggered # noqa: E501 + + :return: The webhook_name of this WebhookEmailOpenedPayload. # noqa: E501 + :rtype: str + """ + return self._webhook_name + + @webhook_name.setter + def webhook_name(self, webhook_name): + """Sets the webhook_name of this WebhookEmailOpenedPayload. + + Name of the webhook being triggered # noqa: E501 + + :param webhook_name: The webhook_name of this WebhookEmailOpenedPayload. # noqa: E501 + :type: str + """ + + self._webhook_name = webhook_name + + @property + def inbox_id(self): + """Gets the inbox_id of this WebhookEmailOpenedPayload. # noqa: E501 + + Id of the inbox # noqa: E501 + + :return: The inbox_id of this WebhookEmailOpenedPayload. # noqa: E501 + :rtype: str + """ + return self._inbox_id + + @inbox_id.setter + def inbox_id(self, inbox_id): + """Sets the inbox_id of this WebhookEmailOpenedPayload. + + Id of the inbox # noqa: E501 + + :param inbox_id: The inbox_id of this WebhookEmailOpenedPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and inbox_id is None: # noqa: E501 + raise ValueError("Invalid value for `inbox_id`, must not be `None`") # noqa: E501 + + self._inbox_id = inbox_id + + @property + def pixel_id(self): + """Gets the pixel_id of this WebhookEmailOpenedPayload. # noqa: E501 + + ID of the tracking pixel # noqa: E501 + + :return: The pixel_id of this WebhookEmailOpenedPayload. # noqa: E501 + :rtype: str + """ + return self._pixel_id + + @pixel_id.setter + def pixel_id(self, pixel_id): + """Sets the pixel_id of this WebhookEmailOpenedPayload. + + ID of the tracking pixel # noqa: E501 + + :param pixel_id: The pixel_id of this WebhookEmailOpenedPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and pixel_id is None: # noqa: E501 + raise ValueError("Invalid value for `pixel_id`, must not be `None`") # noqa: E501 + + self._pixel_id = pixel_id + + @property + def sent_email_id(self): + """Gets the sent_email_id of this WebhookEmailOpenedPayload. # noqa: E501 + + ID of sent email # noqa: E501 + + :return: The sent_email_id of this WebhookEmailOpenedPayload. # noqa: E501 + :rtype: str + """ + return self._sent_email_id + + @sent_email_id.setter + def sent_email_id(self, sent_email_id): + """Sets the sent_email_id of this WebhookEmailOpenedPayload. + + ID of sent email # noqa: E501 + + :param sent_email_id: The sent_email_id of this WebhookEmailOpenedPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and sent_email_id is None: # noqa: E501 + raise ValueError("Invalid value for `sent_email_id`, must not be `None`") # noqa: E501 + + self._sent_email_id = sent_email_id + + @property + def recipient(self): + """Gets the recipient of this WebhookEmailOpenedPayload. # noqa: E501 + + Email address for the recipient of the tracking pixel # noqa: E501 + + :return: The recipient of this WebhookEmailOpenedPayload. # noqa: E501 + :rtype: str + """ + return self._recipient + + @recipient.setter + def recipient(self, recipient): + """Sets the recipient of this WebhookEmailOpenedPayload. + + Email address for the recipient of the tracking pixel # noqa: E501 + + :param recipient: The recipient of this WebhookEmailOpenedPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and recipient is None: # noqa: E501 + raise ValueError("Invalid value for `recipient`, must not be `None`") # noqa: E501 + + self._recipient = recipient + + @property + def created_at(self): + """Gets the created_at of this WebhookEmailOpenedPayload. # noqa: E501 + + Date time of event creation # noqa: E501 + + :return: The created_at of this WebhookEmailOpenedPayload. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this WebhookEmailOpenedPayload. + + Date time of event creation # noqa: E501 + + :param created_at: The created_at of this WebhookEmailOpenedPayload. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WebhookEmailOpenedPayload): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebhookEmailOpenedPayload): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/webhook_email_read_payload.py b/mailslurp_client/models/webhook_email_read_payload.py new file mode 100644 index 00000000..a54058d1 --- /dev/null +++ b/mailslurp_client/models/webhook_email_read_payload.py @@ -0,0 +1,332 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class WebhookEmailReadPayload(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'message_id': 'str', + 'webhook_id': 'str', + 'event_name': 'str', + 'webhook_name': 'str', + 'email_id': 'str', + 'inbox_id': 'str', + 'email_is_read': 'bool', + 'created_at': 'datetime' + } + + attribute_map = { + 'message_id': 'messageId', + 'webhook_id': 'webhookId', + 'event_name': 'eventName', + 'webhook_name': 'webhookName', + 'email_id': 'emailId', + 'inbox_id': 'inboxId', + 'email_is_read': 'emailIsRead', + 'created_at': 'createdAt' + } + + def __init__(self, message_id=None, webhook_id=None, event_name=None, webhook_name=None, email_id=None, inbox_id=None, email_is_read=None, created_at=None, local_vars_configuration=None): # noqa: E501 + """WebhookEmailReadPayload - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._message_id = None + self._webhook_id = None + self._event_name = None + self._webhook_name = None + self._email_id = None + self._inbox_id = None + self._email_is_read = None + self._created_at = None + self.discriminator = None + + self.message_id = message_id + self.webhook_id = webhook_id + self.event_name = event_name + if webhook_name is not None: + self.webhook_name = webhook_name + self.email_id = email_id + self.inbox_id = inbox_id + self.email_is_read = email_is_read + self.created_at = created_at + + @property + def message_id(self): + """Gets the message_id of this WebhookEmailReadPayload. # noqa: E501 + + Idempotent message ID. Store this ID locally or in a database to prevent message duplication. # noqa: E501 + + :return: The message_id of this WebhookEmailReadPayload. # noqa: E501 + :rtype: str + """ + return self._message_id + + @message_id.setter + def message_id(self, message_id): + """Sets the message_id of this WebhookEmailReadPayload. + + Idempotent message ID. Store this ID locally or in a database to prevent message duplication. # noqa: E501 + + :param message_id: The message_id of this WebhookEmailReadPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message_id is None: # noqa: E501 + raise ValueError("Invalid value for `message_id`, must not be `None`") # noqa: E501 + + self._message_id = message_id + + @property + def webhook_id(self): + """Gets the webhook_id of this WebhookEmailReadPayload. # noqa: E501 + + ID of webhook entity being triggered # noqa: E501 + + :return: The webhook_id of this WebhookEmailReadPayload. # noqa: E501 + :rtype: str + """ + return self._webhook_id + + @webhook_id.setter + def webhook_id(self, webhook_id): + """Sets the webhook_id of this WebhookEmailReadPayload. + + ID of webhook entity being triggered # noqa: E501 + + :param webhook_id: The webhook_id of this WebhookEmailReadPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and webhook_id is None: # noqa: E501 + raise ValueError("Invalid value for `webhook_id`, must not be `None`") # noqa: E501 + + self._webhook_id = webhook_id + + @property + def event_name(self): + """Gets the event_name of this WebhookEmailReadPayload. # noqa: E501 + + Name of the event type webhook is being triggered for. # noqa: E501 + + :return: The event_name of this WebhookEmailReadPayload. # noqa: E501 + :rtype: str + """ + return self._event_name + + @event_name.setter + def event_name(self, event_name): + """Sets the event_name of this WebhookEmailReadPayload. + + Name of the event type webhook is being triggered for. # noqa: E501 + + :param event_name: The event_name of this WebhookEmailReadPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and event_name is None: # noqa: E501 + raise ValueError("Invalid value for `event_name`, must not be `None`") # noqa: E501 + allowed_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and event_name not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `event_name` ({0}), must be one of {1}" # noqa: E501 + .format(event_name, allowed_values) + ) + + self._event_name = event_name + + @property + def webhook_name(self): + """Gets the webhook_name of this WebhookEmailReadPayload. # noqa: E501 + + Name of the webhook being triggered # noqa: E501 + + :return: The webhook_name of this WebhookEmailReadPayload. # noqa: E501 + :rtype: str + """ + return self._webhook_name + + @webhook_name.setter + def webhook_name(self, webhook_name): + """Sets the webhook_name of this WebhookEmailReadPayload. + + Name of the webhook being triggered # noqa: E501 + + :param webhook_name: The webhook_name of this WebhookEmailReadPayload. # noqa: E501 + :type: str + """ + + self._webhook_name = webhook_name + + @property + def email_id(self): + """Gets the email_id of this WebhookEmailReadPayload. # noqa: E501 + + ID of the email that was received. Use this ID for fetching the email with the `EmailController`. # noqa: E501 + + :return: The email_id of this WebhookEmailReadPayload. # noqa: E501 + :rtype: str + """ + return self._email_id + + @email_id.setter + def email_id(self, email_id): + """Sets the email_id of this WebhookEmailReadPayload. + + ID of the email that was received. Use this ID for fetching the email with the `EmailController`. # noqa: E501 + + :param email_id: The email_id of this WebhookEmailReadPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and email_id is None: # noqa: E501 + raise ValueError("Invalid value for `email_id`, must not be `None`") # noqa: E501 + + self._email_id = email_id + + @property + def inbox_id(self): + """Gets the inbox_id of this WebhookEmailReadPayload. # noqa: E501 + + Id of the inbox # noqa: E501 + + :return: The inbox_id of this WebhookEmailReadPayload. # noqa: E501 + :rtype: str + """ + return self._inbox_id + + @inbox_id.setter + def inbox_id(self, inbox_id): + """Sets the inbox_id of this WebhookEmailReadPayload. + + Id of the inbox # noqa: E501 + + :param inbox_id: The inbox_id of this WebhookEmailReadPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and inbox_id is None: # noqa: E501 + raise ValueError("Invalid value for `inbox_id`, must not be `None`") # noqa: E501 + + self._inbox_id = inbox_id + + @property + def email_is_read(self): + """Gets the email_is_read of this WebhookEmailReadPayload. # noqa: E501 + + Is the email read # noqa: E501 + + :return: The email_is_read of this WebhookEmailReadPayload. # noqa: E501 + :rtype: bool + """ + return self._email_is_read + + @email_is_read.setter + def email_is_read(self, email_is_read): + """Sets the email_is_read of this WebhookEmailReadPayload. + + Is the email read # noqa: E501 + + :param email_is_read: The email_is_read of this WebhookEmailReadPayload. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and email_is_read is None: # noqa: E501 + raise ValueError("Invalid value for `email_is_read`, must not be `None`") # noqa: E501 + + self._email_is_read = email_is_read + + @property + def created_at(self): + """Gets the created_at of this WebhookEmailReadPayload. # noqa: E501 + + Date time of event creation # noqa: E501 + + :return: The created_at of this WebhookEmailReadPayload. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this WebhookEmailReadPayload. + + Date time of event creation # noqa: E501 + + :param created_at: The created_at of this WebhookEmailReadPayload. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WebhookEmailReadPayload): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebhookEmailReadPayload): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/webhook_header_name_value.py b/mailslurp_client/models/webhook_header_name_value.py new file mode 100644 index 00000000..59bcf91f --- /dev/null +++ b/mailslurp_client/models/webhook_header_name_value.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class WebhookHeaderNameValue(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'value': 'str' + } + + attribute_map = { + 'name': 'name', + 'value': 'value' + } + + def __init__(self, name=None, value=None, local_vars_configuration=None): # noqa: E501 + """WebhookHeaderNameValue - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._value = None + self.discriminator = None + + self.name = name + self.value = value + + @property + def name(self): + """Gets the name of this WebhookHeaderNameValue. # noqa: E501 + + Name of header # noqa: E501 + + :return: The name of this WebhookHeaderNameValue. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this WebhookHeaderNameValue. + + Name of header # noqa: E501 + + :param name: The name of this WebhookHeaderNameValue. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def value(self): + """Gets the value of this WebhookHeaderNameValue. # noqa: E501 + + Value of header # noqa: E501 + + :return: The value of this WebhookHeaderNameValue. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this WebhookHeaderNameValue. + + Value of header # noqa: E501 + + :param value: The value of this WebhookHeaderNameValue. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and value is None: # noqa: E501 + raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501 + + self._value = value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WebhookHeaderNameValue): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebhookHeaderNameValue): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/webhook_headers.py b/mailslurp_client/models/webhook_headers.py new file mode 100644 index 00000000..b6a36f83 --- /dev/null +++ b/mailslurp_client/models/webhook_headers.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class WebhookHeaders(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'headers': 'list[WebhookHeaderNameValue]' + } + + attribute_map = { + 'headers': 'headers' + } + + def __init__(self, headers=None, local_vars_configuration=None): # noqa: E501 + """WebhookHeaders - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._headers = None + self.discriminator = None + + self.headers = headers + + @property + def headers(self): + """Gets the headers of this WebhookHeaders. # noqa: E501 + + List of header name value pairs to include with webhook requests # noqa: E501 + + :return: The headers of this WebhookHeaders. # noqa: E501 + :rtype: list[WebhookHeaderNameValue] + """ + return self._headers + + @headers.setter + def headers(self, headers): + """Sets the headers of this WebhookHeaders. + + List of header name value pairs to include with webhook requests # noqa: E501 + + :param headers: The headers of this WebhookHeaders. # noqa: E501 + :type: list[WebhookHeaderNameValue] + """ + if self.local_vars_configuration.client_side_validation and headers is None: # noqa: E501 + raise ValueError("Invalid value for `headers`, must not be `None`") # noqa: E501 + + self._headers = headers + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WebhookHeaders): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebhookHeaders): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/webhook_new_attachment_payload.py b/mailslurp_client/models/webhook_new_attachment_payload.py new file mode 100644 index 00000000..57114fcb --- /dev/null +++ b/mailslurp_client/models/webhook_new_attachment_payload.py @@ -0,0 +1,332 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class WebhookNewAttachmentPayload(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'message_id': 'str', + 'webhook_id': 'str', + 'webhook_name': 'str', + 'event_name': 'str', + 'attachment_id': 'str', + 'name': 'str', + 'content_type': 'str', + 'content_length': 'int' + } + + attribute_map = { + 'message_id': 'messageId', + 'webhook_id': 'webhookId', + 'webhook_name': 'webhookName', + 'event_name': 'eventName', + 'attachment_id': 'attachmentId', + 'name': 'name', + 'content_type': 'contentType', + 'content_length': 'contentLength' + } + + def __init__(self, message_id=None, webhook_id=None, webhook_name=None, event_name=None, attachment_id=None, name=None, content_type=None, content_length=None, local_vars_configuration=None): # noqa: E501 + """WebhookNewAttachmentPayload - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._message_id = None + self._webhook_id = None + self._webhook_name = None + self._event_name = None + self._attachment_id = None + self._name = None + self._content_type = None + self._content_length = None + self.discriminator = None + + self.message_id = message_id + self.webhook_id = webhook_id + if webhook_name is not None: + self.webhook_name = webhook_name + self.event_name = event_name + self.attachment_id = attachment_id + self.name = name + self.content_type = content_type + self.content_length = content_length + + @property + def message_id(self): + """Gets the message_id of this WebhookNewAttachmentPayload. # noqa: E501 + + Idempotent message ID. Store this ID locally or in a database to prevent message duplication. # noqa: E501 + + :return: The message_id of this WebhookNewAttachmentPayload. # noqa: E501 + :rtype: str + """ + return self._message_id + + @message_id.setter + def message_id(self, message_id): + """Sets the message_id of this WebhookNewAttachmentPayload. + + Idempotent message ID. Store this ID locally or in a database to prevent message duplication. # noqa: E501 + + :param message_id: The message_id of this WebhookNewAttachmentPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message_id is None: # noqa: E501 + raise ValueError("Invalid value for `message_id`, must not be `None`") # noqa: E501 + + self._message_id = message_id + + @property + def webhook_id(self): + """Gets the webhook_id of this WebhookNewAttachmentPayload. # noqa: E501 + + ID of webhook entity being triggered # noqa: E501 + + :return: The webhook_id of this WebhookNewAttachmentPayload. # noqa: E501 + :rtype: str + """ + return self._webhook_id + + @webhook_id.setter + def webhook_id(self, webhook_id): + """Sets the webhook_id of this WebhookNewAttachmentPayload. + + ID of webhook entity being triggered # noqa: E501 + + :param webhook_id: The webhook_id of this WebhookNewAttachmentPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and webhook_id is None: # noqa: E501 + raise ValueError("Invalid value for `webhook_id`, must not be `None`") # noqa: E501 + + self._webhook_id = webhook_id + + @property + def webhook_name(self): + """Gets the webhook_name of this WebhookNewAttachmentPayload. # noqa: E501 + + Name of the webhook being triggered # noqa: E501 + + :return: The webhook_name of this WebhookNewAttachmentPayload. # noqa: E501 + :rtype: str + """ + return self._webhook_name + + @webhook_name.setter + def webhook_name(self, webhook_name): + """Sets the webhook_name of this WebhookNewAttachmentPayload. + + Name of the webhook being triggered # noqa: E501 + + :param webhook_name: The webhook_name of this WebhookNewAttachmentPayload. # noqa: E501 + :type: str + """ + + self._webhook_name = webhook_name + + @property + def event_name(self): + """Gets the event_name of this WebhookNewAttachmentPayload. # noqa: E501 + + Name of the event type webhook is being triggered for. # noqa: E501 + + :return: The event_name of this WebhookNewAttachmentPayload. # noqa: E501 + :rtype: str + """ + return self._event_name + + @event_name.setter + def event_name(self, event_name): + """Sets the event_name of this WebhookNewAttachmentPayload. + + Name of the event type webhook is being triggered for. # noqa: E501 + + :param event_name: The event_name of this WebhookNewAttachmentPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and event_name is None: # noqa: E501 + raise ValueError("Invalid value for `event_name`, must not be `None`") # noqa: E501 + allowed_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and event_name not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `event_name` ({0}), must be one of {1}" # noqa: E501 + .format(event_name, allowed_values) + ) + + self._event_name = event_name + + @property + def attachment_id(self): + """Gets the attachment_id of this WebhookNewAttachmentPayload. # noqa: E501 + + ID of attachment. Use the `AttachmentController` to # noqa: E501 + + :return: The attachment_id of this WebhookNewAttachmentPayload. # noqa: E501 + :rtype: str + """ + return self._attachment_id + + @attachment_id.setter + def attachment_id(self, attachment_id): + """Sets the attachment_id of this WebhookNewAttachmentPayload. + + ID of attachment. Use the `AttachmentController` to # noqa: E501 + + :param attachment_id: The attachment_id of this WebhookNewAttachmentPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and attachment_id is None: # noqa: E501 + raise ValueError("Invalid value for `attachment_id`, must not be `None`") # noqa: E501 + + self._attachment_id = attachment_id + + @property + def name(self): + """Gets the name of this WebhookNewAttachmentPayload. # noqa: E501 + + Filename of the attachment if present # noqa: E501 + + :return: The name of this WebhookNewAttachmentPayload. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this WebhookNewAttachmentPayload. + + Filename of the attachment if present # noqa: E501 + + :param name: The name of this WebhookNewAttachmentPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def content_type(self): + """Gets the content_type of this WebhookNewAttachmentPayload. # noqa: E501 + + Content type of attachment such as 'image/png' or 'application/pdf # noqa: E501 + + :return: The content_type of this WebhookNewAttachmentPayload. # noqa: E501 + :rtype: str + """ + return self._content_type + + @content_type.setter + def content_type(self, content_type): + """Sets the content_type of this WebhookNewAttachmentPayload. + + Content type of attachment such as 'image/png' or 'application/pdf # noqa: E501 + + :param content_type: The content_type of this WebhookNewAttachmentPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and content_type is None: # noqa: E501 + raise ValueError("Invalid value for `content_type`, must not be `None`") # noqa: E501 + + self._content_type = content_type + + @property + def content_length(self): + """Gets the content_length of this WebhookNewAttachmentPayload. # noqa: E501 + + Size of attachment in bytes # noqa: E501 + + :return: The content_length of this WebhookNewAttachmentPayload. # noqa: E501 + :rtype: int + """ + return self._content_length + + @content_length.setter + def content_length(self, content_length): + """Sets the content_length of this WebhookNewAttachmentPayload. + + Size of attachment in bytes # noqa: E501 + + :param content_length: The content_length of this WebhookNewAttachmentPayload. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and content_length is None: # noqa: E501 + raise ValueError("Invalid value for `content_length`, must not be `None`") # noqa: E501 + + self._content_length = content_length + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WebhookNewAttachmentPayload): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebhookNewAttachmentPayload): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/webhook_new_contact_payload.py b/mailslurp_client/models/webhook_new_contact_payload.py new file mode 100644 index 00000000..2ce6e815 --- /dev/null +++ b/mailslurp_client/models/webhook_new_contact_payload.py @@ -0,0 +1,522 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class WebhookNewContactPayload(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'message_id': 'str', + 'webhook_id': 'str', + 'webhook_name': 'str', + 'event_name': 'str', + 'contact_id': 'str', + 'group_id': 'str', + 'first_name': 'str', + 'last_name': 'str', + 'company': 'str', + 'primary_email_address': 'str', + 'email_addresses': 'list[str]', + 'tags': 'list[str]', + 'meta_data': 'object', + 'opt_out': 'bool', + 'created_at': 'datetime' + } + + attribute_map = { + 'message_id': 'messageId', + 'webhook_id': 'webhookId', + 'webhook_name': 'webhookName', + 'event_name': 'eventName', + 'contact_id': 'contactId', + 'group_id': 'groupId', + 'first_name': 'firstName', + 'last_name': 'lastName', + 'company': 'company', + 'primary_email_address': 'primaryEmailAddress', + 'email_addresses': 'emailAddresses', + 'tags': 'tags', + 'meta_data': 'metaData', + 'opt_out': 'optOut', + 'created_at': 'createdAt' + } + + def __init__(self, message_id=None, webhook_id=None, webhook_name=None, event_name=None, contact_id=None, group_id=None, first_name=None, last_name=None, company=None, primary_email_address=None, email_addresses=None, tags=None, meta_data=None, opt_out=None, created_at=None, local_vars_configuration=None): # noqa: E501 + """WebhookNewContactPayload - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._message_id = None + self._webhook_id = None + self._webhook_name = None + self._event_name = None + self._contact_id = None + self._group_id = None + self._first_name = None + self._last_name = None + self._company = None + self._primary_email_address = None + self._email_addresses = None + self._tags = None + self._meta_data = None + self._opt_out = None + self._created_at = None + self.discriminator = None + + self.message_id = message_id + self.webhook_id = webhook_id + if webhook_name is not None: + self.webhook_name = webhook_name + self.event_name = event_name + self.contact_id = contact_id + self.group_id = group_id + self.first_name = first_name + self.last_name = last_name + self.company = company + self.primary_email_address = primary_email_address + self.email_addresses = email_addresses + self.tags = tags + if meta_data is not None: + self.meta_data = meta_data + self.opt_out = opt_out + self.created_at = created_at + + @property + def message_id(self): + """Gets the message_id of this WebhookNewContactPayload. # noqa: E501 + + Idempotent message ID. Store this ID locally or in a database to prevent message duplication. # noqa: E501 + + :return: The message_id of this WebhookNewContactPayload. # noqa: E501 + :rtype: str + """ + return self._message_id + + @message_id.setter + def message_id(self, message_id): + """Sets the message_id of this WebhookNewContactPayload. + + Idempotent message ID. Store this ID locally or in a database to prevent message duplication. # noqa: E501 + + :param message_id: The message_id of this WebhookNewContactPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message_id is None: # noqa: E501 + raise ValueError("Invalid value for `message_id`, must not be `None`") # noqa: E501 + + self._message_id = message_id + + @property + def webhook_id(self): + """Gets the webhook_id of this WebhookNewContactPayload. # noqa: E501 + + ID of webhook entity being triggered # noqa: E501 + + :return: The webhook_id of this WebhookNewContactPayload. # noqa: E501 + :rtype: str + """ + return self._webhook_id + + @webhook_id.setter + def webhook_id(self, webhook_id): + """Sets the webhook_id of this WebhookNewContactPayload. + + ID of webhook entity being triggered # noqa: E501 + + :param webhook_id: The webhook_id of this WebhookNewContactPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and webhook_id is None: # noqa: E501 + raise ValueError("Invalid value for `webhook_id`, must not be `None`") # noqa: E501 + + self._webhook_id = webhook_id + + @property + def webhook_name(self): + """Gets the webhook_name of this WebhookNewContactPayload. # noqa: E501 + + Name of the webhook being triggered # noqa: E501 + + :return: The webhook_name of this WebhookNewContactPayload. # noqa: E501 + :rtype: str + """ + return self._webhook_name + + @webhook_name.setter + def webhook_name(self, webhook_name): + """Sets the webhook_name of this WebhookNewContactPayload. + + Name of the webhook being triggered # noqa: E501 + + :param webhook_name: The webhook_name of this WebhookNewContactPayload. # noqa: E501 + :type: str + """ + + self._webhook_name = webhook_name + + @property + def event_name(self): + """Gets the event_name of this WebhookNewContactPayload. # noqa: E501 + + Name of the event type webhook is being triggered for. # noqa: E501 + + :return: The event_name of this WebhookNewContactPayload. # noqa: E501 + :rtype: str + """ + return self._event_name + + @event_name.setter + def event_name(self, event_name): + """Sets the event_name of this WebhookNewContactPayload. + + Name of the event type webhook is being triggered for. # noqa: E501 + + :param event_name: The event_name of this WebhookNewContactPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and event_name is None: # noqa: E501 + raise ValueError("Invalid value for `event_name`, must not be `None`") # noqa: E501 + allowed_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and event_name not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `event_name` ({0}), must be one of {1}" # noqa: E501 + .format(event_name, allowed_values) + ) + + self._event_name = event_name + + @property + def contact_id(self): + """Gets the contact_id of this WebhookNewContactPayload. # noqa: E501 + + Contact ID # noqa: E501 + + :return: The contact_id of this WebhookNewContactPayload. # noqa: E501 + :rtype: str + """ + return self._contact_id + + @contact_id.setter + def contact_id(self, contact_id): + """Sets the contact_id of this WebhookNewContactPayload. + + Contact ID # noqa: E501 + + :param contact_id: The contact_id of this WebhookNewContactPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and contact_id is None: # noqa: E501 + raise ValueError("Invalid value for `contact_id`, must not be `None`") # noqa: E501 + + self._contact_id = contact_id + + @property + def group_id(self): + """Gets the group_id of this WebhookNewContactPayload. # noqa: E501 + + Contact group ID # noqa: E501 + + :return: The group_id of this WebhookNewContactPayload. # noqa: E501 + :rtype: str + """ + return self._group_id + + @group_id.setter + def group_id(self, group_id): + """Sets the group_id of this WebhookNewContactPayload. + + Contact group ID # noqa: E501 + + :param group_id: The group_id of this WebhookNewContactPayload. # noqa: E501 + :type: str + """ + + self._group_id = group_id + + @property + def first_name(self): + """Gets the first_name of this WebhookNewContactPayload. # noqa: E501 + + Contact first name # noqa: E501 + + :return: The first_name of this WebhookNewContactPayload. # noqa: E501 + :rtype: str + """ + return self._first_name + + @first_name.setter + def first_name(self, first_name): + """Sets the first_name of this WebhookNewContactPayload. + + Contact first name # noqa: E501 + + :param first_name: The first_name of this WebhookNewContactPayload. # noqa: E501 + :type: str + """ + + self._first_name = first_name + + @property + def last_name(self): + """Gets the last_name of this WebhookNewContactPayload. # noqa: E501 + + Contact last name # noqa: E501 + + :return: The last_name of this WebhookNewContactPayload. # noqa: E501 + :rtype: str + """ + return self._last_name + + @last_name.setter + def last_name(self, last_name): + """Sets the last_name of this WebhookNewContactPayload. + + Contact last name # noqa: E501 + + :param last_name: The last_name of this WebhookNewContactPayload. # noqa: E501 + :type: str + """ + + self._last_name = last_name + + @property + def company(self): + """Gets the company of this WebhookNewContactPayload. # noqa: E501 + + Contact company name # noqa: E501 + + :return: The company of this WebhookNewContactPayload. # noqa: E501 + :rtype: str + """ + return self._company + + @company.setter + def company(self, company): + """Sets the company of this WebhookNewContactPayload. + + Contact company name # noqa: E501 + + :param company: The company of this WebhookNewContactPayload. # noqa: E501 + :type: str + """ + + self._company = company + + @property + def primary_email_address(self): + """Gets the primary_email_address of this WebhookNewContactPayload. # noqa: E501 + + Primary email address for contact # noqa: E501 + + :return: The primary_email_address of this WebhookNewContactPayload. # noqa: E501 + :rtype: str + """ + return self._primary_email_address + + @primary_email_address.setter + def primary_email_address(self, primary_email_address): + """Sets the primary_email_address of this WebhookNewContactPayload. + + Primary email address for contact # noqa: E501 + + :param primary_email_address: The primary_email_address of this WebhookNewContactPayload. # noqa: E501 + :type: str + """ + + self._primary_email_address = primary_email_address + + @property + def email_addresses(self): + """Gets the email_addresses of this WebhookNewContactPayload. # noqa: E501 + + Email addresses for contact # noqa: E501 + + :return: The email_addresses of this WebhookNewContactPayload. # noqa: E501 + :rtype: list[str] + """ + return self._email_addresses + + @email_addresses.setter + def email_addresses(self, email_addresses): + """Sets the email_addresses of this WebhookNewContactPayload. + + Email addresses for contact # noqa: E501 + + :param email_addresses: The email_addresses of this WebhookNewContactPayload. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and email_addresses is None: # noqa: E501 + raise ValueError("Invalid value for `email_addresses`, must not be `None`") # noqa: E501 + + self._email_addresses = email_addresses + + @property + def tags(self): + """Gets the tags of this WebhookNewContactPayload. # noqa: E501 + + Tags for contact # noqa: E501 + + :return: The tags of this WebhookNewContactPayload. # noqa: E501 + :rtype: list[str] + """ + return self._tags + + @tags.setter + def tags(self, tags): + """Sets the tags of this WebhookNewContactPayload. + + Tags for contact # noqa: E501 + + :param tags: The tags of this WebhookNewContactPayload. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and tags is None: # noqa: E501 + raise ValueError("Invalid value for `tags`, must not be `None`") # noqa: E501 + + self._tags = tags + + @property + def meta_data(self): + """Gets the meta_data of this WebhookNewContactPayload. # noqa: E501 + + + :return: The meta_data of this WebhookNewContactPayload. # noqa: E501 + :rtype: object + """ + return self._meta_data + + @meta_data.setter + def meta_data(self, meta_data): + """Sets the meta_data of this WebhookNewContactPayload. + + + :param meta_data: The meta_data of this WebhookNewContactPayload. # noqa: E501 + :type: object + """ + + self._meta_data = meta_data + + @property + def opt_out(self): + """Gets the opt_out of this WebhookNewContactPayload. # noqa: E501 + + Has contact opted out of emails # noqa: E501 + + :return: The opt_out of this WebhookNewContactPayload. # noqa: E501 + :rtype: bool + """ + return self._opt_out + + @opt_out.setter + def opt_out(self, opt_out): + """Sets the opt_out of this WebhookNewContactPayload. + + Has contact opted out of emails # noqa: E501 + + :param opt_out: The opt_out of this WebhookNewContactPayload. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and opt_out is None: # noqa: E501 + raise ValueError("Invalid value for `opt_out`, must not be `None`") # noqa: E501 + + self._opt_out = opt_out + + @property + def created_at(self): + """Gets the created_at of this WebhookNewContactPayload. # noqa: E501 + + Date time of event creation # noqa: E501 + + :return: The created_at of this WebhookNewContactPayload. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this WebhookNewContactPayload. + + Date time of event creation # noqa: E501 + + :param created_at: The created_at of this WebhookNewContactPayload. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WebhookNewContactPayload): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebhookNewContactPayload): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/webhook_new_email_payload.py b/mailslurp_client/models/webhook_new_email_payload.py new file mode 100644 index 00000000..eabe058e --- /dev/null +++ b/mailslurp_client/models/webhook_new_email_payload.py @@ -0,0 +1,504 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class WebhookNewEmailPayload(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'message_id': 'str', + 'webhook_id': 'str', + 'event_name': 'str', + 'webhook_name': 'str', + 'inbox_id': 'str', + 'domain_id': 'str', + 'email_id': 'str', + 'created_at': 'datetime', + 'to': 'list[str]', + '_from': 'str', + 'cc': 'list[str]', + 'bcc': 'list[str]', + 'subject': 'str', + 'attachment_meta_datas': 'list[AttachmentMetaData]' + } + + attribute_map = { + 'message_id': 'messageId', + 'webhook_id': 'webhookId', + 'event_name': 'eventName', + 'webhook_name': 'webhookName', + 'inbox_id': 'inboxId', + 'domain_id': 'domainId', + 'email_id': 'emailId', + 'created_at': 'createdAt', + 'to': 'to', + '_from': 'from', + 'cc': 'cc', + 'bcc': 'bcc', + 'subject': 'subject', + 'attachment_meta_datas': 'attachmentMetaDatas' + } + + def __init__(self, message_id=None, webhook_id=None, event_name=None, webhook_name=None, inbox_id=None, domain_id=None, email_id=None, created_at=None, to=None, _from=None, cc=None, bcc=None, subject=None, attachment_meta_datas=None, local_vars_configuration=None): # noqa: E501 + """WebhookNewEmailPayload - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._message_id = None + self._webhook_id = None + self._event_name = None + self._webhook_name = None + self._inbox_id = None + self._domain_id = None + self._email_id = None + self._created_at = None + self._to = None + self.__from = None + self._cc = None + self._bcc = None + self._subject = None + self._attachment_meta_datas = None + self.discriminator = None + + self.message_id = message_id + self.webhook_id = webhook_id + self.event_name = event_name + if webhook_name is not None: + self.webhook_name = webhook_name + self.inbox_id = inbox_id + if domain_id is not None: + self.domain_id = domain_id + self.email_id = email_id + self.created_at = created_at + self.to = to + self._from = _from + self.cc = cc + self.bcc = bcc + if subject is not None: + self.subject = subject + self.attachment_meta_datas = attachment_meta_datas + + @property + def message_id(self): + """Gets the message_id of this WebhookNewEmailPayload. # noqa: E501 + + Idempotent message ID. Store this ID locally or in a database to prevent message duplication. # noqa: E501 + + :return: The message_id of this WebhookNewEmailPayload. # noqa: E501 + :rtype: str + """ + return self._message_id + + @message_id.setter + def message_id(self, message_id): + """Sets the message_id of this WebhookNewEmailPayload. + + Idempotent message ID. Store this ID locally or in a database to prevent message duplication. # noqa: E501 + + :param message_id: The message_id of this WebhookNewEmailPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message_id is None: # noqa: E501 + raise ValueError("Invalid value for `message_id`, must not be `None`") # noqa: E501 + + self._message_id = message_id + + @property + def webhook_id(self): + """Gets the webhook_id of this WebhookNewEmailPayload. # noqa: E501 + + ID of webhook entity being triggered # noqa: E501 + + :return: The webhook_id of this WebhookNewEmailPayload. # noqa: E501 + :rtype: str + """ + return self._webhook_id + + @webhook_id.setter + def webhook_id(self, webhook_id): + """Sets the webhook_id of this WebhookNewEmailPayload. + + ID of webhook entity being triggered # noqa: E501 + + :param webhook_id: The webhook_id of this WebhookNewEmailPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and webhook_id is None: # noqa: E501 + raise ValueError("Invalid value for `webhook_id`, must not be `None`") # noqa: E501 + + self._webhook_id = webhook_id + + @property + def event_name(self): + """Gets the event_name of this WebhookNewEmailPayload. # noqa: E501 + + Name of the event type webhook is being triggered for. # noqa: E501 + + :return: The event_name of this WebhookNewEmailPayload. # noqa: E501 + :rtype: str + """ + return self._event_name + + @event_name.setter + def event_name(self, event_name): + """Sets the event_name of this WebhookNewEmailPayload. + + Name of the event type webhook is being triggered for. # noqa: E501 + + :param event_name: The event_name of this WebhookNewEmailPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and event_name is None: # noqa: E501 + raise ValueError("Invalid value for `event_name`, must not be `None`") # noqa: E501 + allowed_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and event_name not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `event_name` ({0}), must be one of {1}" # noqa: E501 + .format(event_name, allowed_values) + ) + + self._event_name = event_name + + @property + def webhook_name(self): + """Gets the webhook_name of this WebhookNewEmailPayload. # noqa: E501 + + Name of the webhook being triggered # noqa: E501 + + :return: The webhook_name of this WebhookNewEmailPayload. # noqa: E501 + :rtype: str + """ + return self._webhook_name + + @webhook_name.setter + def webhook_name(self, webhook_name): + """Sets the webhook_name of this WebhookNewEmailPayload. + + Name of the webhook being triggered # noqa: E501 + + :param webhook_name: The webhook_name of this WebhookNewEmailPayload. # noqa: E501 + :type: str + """ + + self._webhook_name = webhook_name + + @property + def inbox_id(self): + """Gets the inbox_id of this WebhookNewEmailPayload. # noqa: E501 + + Id of the inbox # noqa: E501 + + :return: The inbox_id of this WebhookNewEmailPayload. # noqa: E501 + :rtype: str + """ + return self._inbox_id + + @inbox_id.setter + def inbox_id(self, inbox_id): + """Sets the inbox_id of this WebhookNewEmailPayload. + + Id of the inbox # noqa: E501 + + :param inbox_id: The inbox_id of this WebhookNewEmailPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and inbox_id is None: # noqa: E501 + raise ValueError("Invalid value for `inbox_id`, must not be `None`") # noqa: E501 + + self._inbox_id = inbox_id + + @property + def domain_id(self): + """Gets the domain_id of this WebhookNewEmailPayload. # noqa: E501 + + Id of the domain that received an email # noqa: E501 + + :return: The domain_id of this WebhookNewEmailPayload. # noqa: E501 + :rtype: str + """ + return self._domain_id + + @domain_id.setter + def domain_id(self, domain_id): + """Sets the domain_id of this WebhookNewEmailPayload. + + Id of the domain that received an email # noqa: E501 + + :param domain_id: The domain_id of this WebhookNewEmailPayload. # noqa: E501 + :type: str + """ + + self._domain_id = domain_id + + @property + def email_id(self): + """Gets the email_id of this WebhookNewEmailPayload. # noqa: E501 + + ID of the email that was received. Use this ID for fetching the email with the `EmailController`. # noqa: E501 + + :return: The email_id of this WebhookNewEmailPayload. # noqa: E501 + :rtype: str + """ + return self._email_id + + @email_id.setter + def email_id(self, email_id): + """Sets the email_id of this WebhookNewEmailPayload. + + ID of the email that was received. Use this ID for fetching the email with the `EmailController`. # noqa: E501 + + :param email_id: The email_id of this WebhookNewEmailPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and email_id is None: # noqa: E501 + raise ValueError("Invalid value for `email_id`, must not be `None`") # noqa: E501 + + self._email_id = email_id + + @property + def created_at(self): + """Gets the created_at of this WebhookNewEmailPayload. # noqa: E501 + + Date time of event creation # noqa: E501 + + :return: The created_at of this WebhookNewEmailPayload. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this WebhookNewEmailPayload. + + Date time of event creation # noqa: E501 + + :param created_at: The created_at of this WebhookNewEmailPayload. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + @property + def to(self): + """Gets the to of this WebhookNewEmailPayload. # noqa: E501 + + List of `To` recipient email addresses that the email was addressed to. See recipients object for names. # noqa: E501 + + :return: The to of this WebhookNewEmailPayload. # noqa: E501 + :rtype: list[str] + """ + return self._to + + @to.setter + def to(self, to): + """Sets the to of this WebhookNewEmailPayload. + + List of `To` recipient email addresses that the email was addressed to. See recipients object for names. # noqa: E501 + + :param to: The to of this WebhookNewEmailPayload. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and to is None: # noqa: E501 + raise ValueError("Invalid value for `to`, must not be `None`") # noqa: E501 + + self._to = to + + @property + def _from(self): + """Gets the _from of this WebhookNewEmailPayload. # noqa: E501 + + Who the email was sent from. An email address - see fromName for the sender name. # noqa: E501 + + :return: The _from of this WebhookNewEmailPayload. # noqa: E501 + :rtype: str + """ + return self.__from + + @_from.setter + def _from(self, _from): + """Sets the _from of this WebhookNewEmailPayload. + + Who the email was sent from. An email address - see fromName for the sender name. # noqa: E501 + + :param _from: The _from of this WebhookNewEmailPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and _from is None: # noqa: E501 + raise ValueError("Invalid value for `_from`, must not be `None`") # noqa: E501 + + self.__from = _from + + @property + def cc(self): + """Gets the cc of this WebhookNewEmailPayload. # noqa: E501 + + List of `CC` recipients email addresses that the email was addressed to. See recipients object for names. # noqa: E501 + + :return: The cc of this WebhookNewEmailPayload. # noqa: E501 + :rtype: list[str] + """ + return self._cc + + @cc.setter + def cc(self, cc): + """Sets the cc of this WebhookNewEmailPayload. + + List of `CC` recipients email addresses that the email was addressed to. See recipients object for names. # noqa: E501 + + :param cc: The cc of this WebhookNewEmailPayload. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and cc is None: # noqa: E501 + raise ValueError("Invalid value for `cc`, must not be `None`") # noqa: E501 + + self._cc = cc + + @property + def bcc(self): + """Gets the bcc of this WebhookNewEmailPayload. # noqa: E501 + + List of `BCC` recipients email addresses that the email was addressed to. See recipients object for names. # noqa: E501 + + :return: The bcc of this WebhookNewEmailPayload. # noqa: E501 + :rtype: list[str] + """ + return self._bcc + + @bcc.setter + def bcc(self, bcc): + """Sets the bcc of this WebhookNewEmailPayload. + + List of `BCC` recipients email addresses that the email was addressed to. See recipients object for names. # noqa: E501 + + :param bcc: The bcc of this WebhookNewEmailPayload. # noqa: E501 + :type: list[str] + """ + if self.local_vars_configuration.client_side_validation and bcc is None: # noqa: E501 + raise ValueError("Invalid value for `bcc`, must not be `None`") # noqa: E501 + + self._bcc = bcc + + @property + def subject(self): + """Gets the subject of this WebhookNewEmailPayload. # noqa: E501 + + The subject line of the email message as specified by SMTP subject header # noqa: E501 + + :return: The subject of this WebhookNewEmailPayload. # noqa: E501 + :rtype: str + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this WebhookNewEmailPayload. + + The subject line of the email message as specified by SMTP subject header # noqa: E501 + + :param subject: The subject of this WebhookNewEmailPayload. # noqa: E501 + :type: str + """ + + self._subject = subject + + @property + def attachment_meta_datas(self): + """Gets the attachment_meta_datas of this WebhookNewEmailPayload. # noqa: E501 + + List of attachment meta data objects if attachments present # noqa: E501 + + :return: The attachment_meta_datas of this WebhookNewEmailPayload. # noqa: E501 + :rtype: list[AttachmentMetaData] + """ + return self._attachment_meta_datas + + @attachment_meta_datas.setter + def attachment_meta_datas(self, attachment_meta_datas): + """Sets the attachment_meta_datas of this WebhookNewEmailPayload. + + List of attachment meta data objects if attachments present # noqa: E501 + + :param attachment_meta_datas: The attachment_meta_datas of this WebhookNewEmailPayload. # noqa: E501 + :type: list[AttachmentMetaData] + """ + if self.local_vars_configuration.client_side_validation and attachment_meta_datas is None: # noqa: E501 + raise ValueError("Invalid value for `attachment_meta_datas`, must not be `None`") # noqa: E501 + + self._attachment_meta_datas = attachment_meta_datas + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WebhookNewEmailPayload): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebhookNewEmailPayload): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/webhook_new_sms_payload.py b/mailslurp_client/models/webhook_new_sms_payload.py new file mode 100644 index 00000000..f59a89fa --- /dev/null +++ b/mailslurp_client/models/webhook_new_sms_payload.py @@ -0,0 +1,418 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class WebhookNewSmsPayload(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'message_id': 'str', + 'webhook_id': 'str', + 'event_name': 'str', + 'webhook_name': 'str', + 'sms_id': 'str', + 'user_id': 'str', + 'phone_number': 'str', + 'to_number': 'str', + 'from_number': 'str', + 'body': 'str', + 'read': 'bool' + } + + attribute_map = { + 'message_id': 'messageId', + 'webhook_id': 'webhookId', + 'event_name': 'eventName', + 'webhook_name': 'webhookName', + 'sms_id': 'smsId', + 'user_id': 'userId', + 'phone_number': 'phoneNumber', + 'to_number': 'toNumber', + 'from_number': 'fromNumber', + 'body': 'body', + 'read': 'read' + } + + def __init__(self, message_id=None, webhook_id=None, event_name=None, webhook_name=None, sms_id=None, user_id=None, phone_number=None, to_number=None, from_number=None, body=None, read=None, local_vars_configuration=None): # noqa: E501 + """WebhookNewSmsPayload - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._message_id = None + self._webhook_id = None + self._event_name = None + self._webhook_name = None + self._sms_id = None + self._user_id = None + self._phone_number = None + self._to_number = None + self._from_number = None + self._body = None + self._read = None + self.discriminator = None + + self.message_id = message_id + self.webhook_id = webhook_id + self.event_name = event_name + self.webhook_name = webhook_name + self.sms_id = sms_id + self.user_id = user_id + self.phone_number = phone_number + self.to_number = to_number + self.from_number = from_number + self.body = body + self.read = read + + @property + def message_id(self): + """Gets the message_id of this WebhookNewSmsPayload. # noqa: E501 + + Idempotent message ID. Store this ID locally or in a database to prevent message duplication. # noqa: E501 + + :return: The message_id of this WebhookNewSmsPayload. # noqa: E501 + :rtype: str + """ + return self._message_id + + @message_id.setter + def message_id(self, message_id): + """Sets the message_id of this WebhookNewSmsPayload. + + Idempotent message ID. Store this ID locally or in a database to prevent message duplication. # noqa: E501 + + :param message_id: The message_id of this WebhookNewSmsPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message_id is None: # noqa: E501 + raise ValueError("Invalid value for `message_id`, must not be `None`") # noqa: E501 + + self._message_id = message_id + + @property + def webhook_id(self): + """Gets the webhook_id of this WebhookNewSmsPayload. # noqa: E501 + + ID of webhook entity being triggered # noqa: E501 + + :return: The webhook_id of this WebhookNewSmsPayload. # noqa: E501 + :rtype: str + """ + return self._webhook_id + + @webhook_id.setter + def webhook_id(self, webhook_id): + """Sets the webhook_id of this WebhookNewSmsPayload. + + ID of webhook entity being triggered # noqa: E501 + + :param webhook_id: The webhook_id of this WebhookNewSmsPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and webhook_id is None: # noqa: E501 + raise ValueError("Invalid value for `webhook_id`, must not be `None`") # noqa: E501 + + self._webhook_id = webhook_id + + @property + def event_name(self): + """Gets the event_name of this WebhookNewSmsPayload. # noqa: E501 + + Name of the event type webhook is being triggered for. # noqa: E501 + + :return: The event_name of this WebhookNewSmsPayload. # noqa: E501 + :rtype: str + """ + return self._event_name + + @event_name.setter + def event_name(self, event_name): + """Sets the event_name of this WebhookNewSmsPayload. + + Name of the event type webhook is being triggered for. # noqa: E501 + + :param event_name: The event_name of this WebhookNewSmsPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and event_name is None: # noqa: E501 + raise ValueError("Invalid value for `event_name`, must not be `None`") # noqa: E501 + allowed_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and event_name not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `event_name` ({0}), must be one of {1}" # noqa: E501 + .format(event_name, allowed_values) + ) + + self._event_name = event_name + + @property + def webhook_name(self): + """Gets the webhook_name of this WebhookNewSmsPayload. # noqa: E501 + + Name of the webhook being triggered # noqa: E501 + + :return: The webhook_name of this WebhookNewSmsPayload. # noqa: E501 + :rtype: str + """ + return self._webhook_name + + @webhook_name.setter + def webhook_name(self, webhook_name): + """Sets the webhook_name of this WebhookNewSmsPayload. + + Name of the webhook being triggered # noqa: E501 + + :param webhook_name: The webhook_name of this WebhookNewSmsPayload. # noqa: E501 + :type: str + """ + + self._webhook_name = webhook_name + + @property + def sms_id(self): + """Gets the sms_id of this WebhookNewSmsPayload. # noqa: E501 + + ID of SMS message # noqa: E501 + + :return: The sms_id of this WebhookNewSmsPayload. # noqa: E501 + :rtype: str + """ + return self._sms_id + + @sms_id.setter + def sms_id(self, sms_id): + """Sets the sms_id of this WebhookNewSmsPayload. + + ID of SMS message # noqa: E501 + + :param sms_id: The sms_id of this WebhookNewSmsPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and sms_id is None: # noqa: E501 + raise ValueError("Invalid value for `sms_id`, must not be `None`") # noqa: E501 + + self._sms_id = sms_id + + @property + def user_id(self): + """Gets the user_id of this WebhookNewSmsPayload. # noqa: E501 + + User ID of event # noqa: E501 + + :return: The user_id of this WebhookNewSmsPayload. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this WebhookNewSmsPayload. + + User ID of event # noqa: E501 + + :param user_id: The user_id of this WebhookNewSmsPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def phone_number(self): + """Gets the phone_number of this WebhookNewSmsPayload. # noqa: E501 + + ID of phone number receiving SMS # noqa: E501 + + :return: The phone_number of this WebhookNewSmsPayload. # noqa: E501 + :rtype: str + """ + return self._phone_number + + @phone_number.setter + def phone_number(self, phone_number): + """Sets the phone_number of this WebhookNewSmsPayload. + + ID of phone number receiving SMS # noqa: E501 + + :param phone_number: The phone_number of this WebhookNewSmsPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and phone_number is None: # noqa: E501 + raise ValueError("Invalid value for `phone_number`, must not be `None`") # noqa: E501 + + self._phone_number = phone_number + + @property + def to_number(self): + """Gets the to_number of this WebhookNewSmsPayload. # noqa: E501 + + Recipient phone number # noqa: E501 + + :return: The to_number of this WebhookNewSmsPayload. # noqa: E501 + :rtype: str + """ + return self._to_number + + @to_number.setter + def to_number(self, to_number): + """Sets the to_number of this WebhookNewSmsPayload. + + Recipient phone number # noqa: E501 + + :param to_number: The to_number of this WebhookNewSmsPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and to_number is None: # noqa: E501 + raise ValueError("Invalid value for `to_number`, must not be `None`") # noqa: E501 + + self._to_number = to_number + + @property + def from_number(self): + """Gets the from_number of this WebhookNewSmsPayload. # noqa: E501 + + Sender phone number # noqa: E501 + + :return: The from_number of this WebhookNewSmsPayload. # noqa: E501 + :rtype: str + """ + return self._from_number + + @from_number.setter + def from_number(self, from_number): + """Sets the from_number of this WebhookNewSmsPayload. + + Sender phone number # noqa: E501 + + :param from_number: The from_number of this WebhookNewSmsPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and from_number is None: # noqa: E501 + raise ValueError("Invalid value for `from_number`, must not be `None`") # noqa: E501 + + self._from_number = from_number + + @property + def body(self): + """Gets the body of this WebhookNewSmsPayload. # noqa: E501 + + SMS message body # noqa: E501 + + :return: The body of this WebhookNewSmsPayload. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this WebhookNewSmsPayload. + + SMS message body # noqa: E501 + + :param body: The body of this WebhookNewSmsPayload. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and body is None: # noqa: E501 + raise ValueError("Invalid value for `body`, must not be `None`") # noqa: E501 + + self._body = body + + @property + def read(self): + """Gets the read of this WebhookNewSmsPayload. # noqa: E501 + + SMS has been read # noqa: E501 + + :return: The read of this WebhookNewSmsPayload. # noqa: E501 + :rtype: bool + """ + return self._read + + @read.setter + def read(self, read): + """Sets the read of this WebhookNewSmsPayload. + + SMS has been read # noqa: E501 + + :param read: The read of this WebhookNewSmsPayload. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and read is None: # noqa: E501 + raise ValueError("Invalid value for `read`, must not be `None`") # noqa: E501 + + self._read = read + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WebhookNewSmsPayload): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebhookNewSmsPayload): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/webhook_projection.py b/mailslurp_client/models/webhook_projection.py new file mode 100644 index 00000000..875cd0ec --- /dev/null +++ b/mailslurp_client/models/webhook_projection.py @@ -0,0 +1,313 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class WebhookProjection(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'name': 'str', + 'id': 'str', + 'url': 'str', + 'inbox_id': 'str', + 'event_name': 'str', + 'created_at': 'datetime', + 'phone_number_id': 'str', + 'updated_at': 'datetime' + } + + attribute_map = { + 'name': 'name', + 'id': 'id', + 'url': 'url', + 'inbox_id': 'inboxId', + 'event_name': 'eventName', + 'created_at': 'createdAt', + 'phone_number_id': 'phoneNumberId', + 'updated_at': 'updatedAt' + } + + def __init__(self, name=None, id=None, url=None, inbox_id=None, event_name=None, created_at=None, phone_number_id=None, updated_at=None, local_vars_configuration=None): # noqa: E501 + """WebhookProjection - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._name = None + self._id = None + self._url = None + self._inbox_id = None + self._event_name = None + self._created_at = None + self._phone_number_id = None + self._updated_at = None + self.discriminator = None + + if name is not None: + self.name = name + self.id = id + self.url = url + if inbox_id is not None: + self.inbox_id = inbox_id + if event_name is not None: + self.event_name = event_name + self.created_at = created_at + if phone_number_id is not None: + self.phone_number_id = phone_number_id + self.updated_at = updated_at + + @property + def name(self): + """Gets the name of this WebhookProjection. # noqa: E501 + + + :return: The name of this WebhookProjection. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this WebhookProjection. + + + :param name: The name of this WebhookProjection. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def id(self): + """Gets the id of this WebhookProjection. # noqa: E501 + + + :return: The id of this WebhookProjection. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this WebhookProjection. + + + :param id: The id of this WebhookProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 + raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 + + self._id = id + + @property + def url(self): + """Gets the url of this WebhookProjection. # noqa: E501 + + + :return: The url of this WebhookProjection. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this WebhookProjection. + + + :param url: The url of this WebhookProjection. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and url is None: # noqa: E501 + raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501 + + self._url = url + + @property + def inbox_id(self): + """Gets the inbox_id of this WebhookProjection. # noqa: E501 + + + :return: The inbox_id of this WebhookProjection. # noqa: E501 + :rtype: str + """ + return self._inbox_id + + @inbox_id.setter + def inbox_id(self, inbox_id): + """Sets the inbox_id of this WebhookProjection. + + + :param inbox_id: The inbox_id of this WebhookProjection. # noqa: E501 + :type: str + """ + + self._inbox_id = inbox_id + + @property + def event_name(self): + """Gets the event_name of this WebhookProjection. # noqa: E501 + + + :return: The event_name of this WebhookProjection. # noqa: E501 + :rtype: str + """ + return self._event_name + + @event_name.setter + def event_name(self, event_name): + """Sets the event_name of this WebhookProjection. + + + :param event_name: The event_name of this WebhookProjection. # noqa: E501 + :type: str + """ + allowed_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and event_name not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `event_name` ({0}), must be one of {1}" # noqa: E501 + .format(event_name, allowed_values) + ) + + self._event_name = event_name + + @property + def created_at(self): + """Gets the created_at of this WebhookProjection. # noqa: E501 + + + :return: The created_at of this WebhookProjection. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this WebhookProjection. + + + :param created_at: The created_at of this WebhookProjection. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + @property + def phone_number_id(self): + """Gets the phone_number_id of this WebhookProjection. # noqa: E501 + + + :return: The phone_number_id of this WebhookProjection. # noqa: E501 + :rtype: str + """ + return self._phone_number_id + + @phone_number_id.setter + def phone_number_id(self, phone_number_id): + """Sets the phone_number_id of this WebhookProjection. + + + :param phone_number_id: The phone_number_id of this WebhookProjection. # noqa: E501 + :type: str + """ + + self._phone_number_id = phone_number_id + + @property + def updated_at(self): + """Gets the updated_at of this WebhookProjection. # noqa: E501 + + + :return: The updated_at of this WebhookProjection. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this WebhookProjection. + + + :param updated_at: The updated_at of this WebhookProjection. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and updated_at is None: # noqa: E501 + raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501 + + self._updated_at = updated_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WebhookProjection): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebhookProjection): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/webhook_redrive_result.py b/mailslurp_client/models/webhook_redrive_result.py new file mode 100644 index 00000000..ba4ce8db --- /dev/null +++ b/mailslurp_client/models/webhook_redrive_result.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class WebhookRedriveResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'webhook_result_id': 'str', + 'success': 'bool', + 'message': 'str' + } + + attribute_map = { + 'webhook_result_id': 'webhookResultId', + 'success': 'success', + 'message': 'message' + } + + def __init__(self, webhook_result_id=None, success=None, message=None, local_vars_configuration=None): # noqa: E501 + """WebhookRedriveResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._webhook_result_id = None + self._success = None + self._message = None + self.discriminator = None + + self.webhook_result_id = webhook_result_id + self.success = success + if message is not None: + self.message = message + + @property + def webhook_result_id(self): + """Gets the webhook_result_id of this WebhookRedriveResult. # noqa: E501 + + + :return: The webhook_result_id of this WebhookRedriveResult. # noqa: E501 + :rtype: str + """ + return self._webhook_result_id + + @webhook_result_id.setter + def webhook_result_id(self, webhook_result_id): + """Sets the webhook_result_id of this WebhookRedriveResult. + + + :param webhook_result_id: The webhook_result_id of this WebhookRedriveResult. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and webhook_result_id is None: # noqa: E501 + raise ValueError("Invalid value for `webhook_result_id`, must not be `None`") # noqa: E501 + + self._webhook_result_id = webhook_result_id + + @property + def success(self): + """Gets the success of this WebhookRedriveResult. # noqa: E501 + + + :return: The success of this WebhookRedriveResult. # noqa: E501 + :rtype: bool + """ + return self._success + + @success.setter + def success(self, success): + """Sets the success of this WebhookRedriveResult. + + + :param success: The success of this WebhookRedriveResult. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and success is None: # noqa: E501 + raise ValueError("Invalid value for `success`, must not be `None`") # noqa: E501 + + self._success = success + + @property + def message(self): + """Gets the message of this WebhookRedriveResult. # noqa: E501 + + + :return: The message of this WebhookRedriveResult. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this WebhookRedriveResult. + + + :param message: The message of this WebhookRedriveResult. # noqa: E501 + :type: str + """ + + self._message = message + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WebhookRedriveResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebhookRedriveResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/webhook_result_dto.py b/mailslurp_client/models/webhook_result_dto.py new file mode 100644 index 00000000..c0e3b656 --- /dev/null +++ b/mailslurp_client/models/webhook_result_dto.py @@ -0,0 +1,539 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class WebhookResultDto(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'id': 'str', + 'user_id': 'str', + 'inbox_id': 'str', + 'webhook_id': 'str', + 'webhook_url': 'str', + 'message_id': 'str', + 'redrive_id': 'str', + 'http_method': 'str', + 'webhook_event': 'str', + 'response_status': 'int', + 'response_time_millis': 'int', + 'response_body_extract': 'str', + 'result_type': 'str', + 'created_at': 'datetime', + 'updated_at': 'datetime', + 'seen': 'bool' + } + + attribute_map = { + 'id': 'id', + 'user_id': 'userId', + 'inbox_id': 'inboxId', + 'webhook_id': 'webhookId', + 'webhook_url': 'webhookUrl', + 'message_id': 'messageId', + 'redrive_id': 'redriveId', + 'http_method': 'httpMethod', + 'webhook_event': 'webhookEvent', + 'response_status': 'responseStatus', + 'response_time_millis': 'responseTimeMillis', + 'response_body_extract': 'responseBodyExtract', + 'result_type': 'resultType', + 'created_at': 'createdAt', + 'updated_at': 'updatedAt', + 'seen': 'seen' + } + + def __init__(self, id=None, user_id=None, inbox_id=None, webhook_id=None, webhook_url=None, message_id=None, redrive_id=None, http_method=None, webhook_event=None, response_status=None, response_time_millis=None, response_body_extract=None, result_type=None, created_at=None, updated_at=None, seen=None, local_vars_configuration=None): # noqa: E501 + """WebhookResultDto - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._id = None + self._user_id = None + self._inbox_id = None + self._webhook_id = None + self._webhook_url = None + self._message_id = None + self._redrive_id = None + self._http_method = None + self._webhook_event = None + self._response_status = None + self._response_time_millis = None + self._response_body_extract = None + self._result_type = None + self._created_at = None + self._updated_at = None + self._seen = None + self.discriminator = None + + if id is not None: + self.id = id + self.user_id = user_id + if inbox_id is not None: + self.inbox_id = inbox_id + self.webhook_id = webhook_id + self.webhook_url = webhook_url + self.message_id = message_id + if redrive_id is not None: + self.redrive_id = redrive_id + self.http_method = http_method + self.webhook_event = webhook_event + if response_status is not None: + self.response_status = response_status + self.response_time_millis = response_time_millis + if response_body_extract is not None: + self.response_body_extract = response_body_extract + if result_type is not None: + self.result_type = result_type + self.created_at = created_at + self.updated_at = updated_at + self.seen = seen + + @property + def id(self): + """Gets the id of this WebhookResultDto. # noqa: E501 + + + :return: The id of this WebhookResultDto. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this WebhookResultDto. + + + :param id: The id of this WebhookResultDto. # noqa: E501 + :type: str + """ + + self._id = id + + @property + def user_id(self): + """Gets the user_id of this WebhookResultDto. # noqa: E501 + + + :return: The user_id of this WebhookResultDto. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this WebhookResultDto. + + + :param user_id: The user_id of this WebhookResultDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and user_id is None: # noqa: E501 + raise ValueError("Invalid value for `user_id`, must not be `None`") # noqa: E501 + + self._user_id = user_id + + @property + def inbox_id(self): + """Gets the inbox_id of this WebhookResultDto. # noqa: E501 + + + :return: The inbox_id of this WebhookResultDto. # noqa: E501 + :rtype: str + """ + return self._inbox_id + + @inbox_id.setter + def inbox_id(self, inbox_id): + """Sets the inbox_id of this WebhookResultDto. + + + :param inbox_id: The inbox_id of this WebhookResultDto. # noqa: E501 + :type: str + """ + + self._inbox_id = inbox_id + + @property + def webhook_id(self): + """Gets the webhook_id of this WebhookResultDto. # noqa: E501 + + + :return: The webhook_id of this WebhookResultDto. # noqa: E501 + :rtype: str + """ + return self._webhook_id + + @webhook_id.setter + def webhook_id(self, webhook_id): + """Sets the webhook_id of this WebhookResultDto. + + + :param webhook_id: The webhook_id of this WebhookResultDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and webhook_id is None: # noqa: E501 + raise ValueError("Invalid value for `webhook_id`, must not be `None`") # noqa: E501 + + self._webhook_id = webhook_id + + @property + def webhook_url(self): + """Gets the webhook_url of this WebhookResultDto. # noqa: E501 + + + :return: The webhook_url of this WebhookResultDto. # noqa: E501 + :rtype: str + """ + return self._webhook_url + + @webhook_url.setter + def webhook_url(self, webhook_url): + """Sets the webhook_url of this WebhookResultDto. + + + :param webhook_url: The webhook_url of this WebhookResultDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and webhook_url is None: # noqa: E501 + raise ValueError("Invalid value for `webhook_url`, must not be `None`") # noqa: E501 + + self._webhook_url = webhook_url + + @property + def message_id(self): + """Gets the message_id of this WebhookResultDto. # noqa: E501 + + + :return: The message_id of this WebhookResultDto. # noqa: E501 + :rtype: str + """ + return self._message_id + + @message_id.setter + def message_id(self, message_id): + """Sets the message_id of this WebhookResultDto. + + + :param message_id: The message_id of this WebhookResultDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and message_id is None: # noqa: E501 + raise ValueError("Invalid value for `message_id`, must not be `None`") # noqa: E501 + + self._message_id = message_id + + @property + def redrive_id(self): + """Gets the redrive_id of this WebhookResultDto. # noqa: E501 + + + :return: The redrive_id of this WebhookResultDto. # noqa: E501 + :rtype: str + """ + return self._redrive_id + + @redrive_id.setter + def redrive_id(self, redrive_id): + """Sets the redrive_id of this WebhookResultDto. + + + :param redrive_id: The redrive_id of this WebhookResultDto. # noqa: E501 + :type: str + """ + + self._redrive_id = redrive_id + + @property + def http_method(self): + """Gets the http_method of this WebhookResultDto. # noqa: E501 + + + :return: The http_method of this WebhookResultDto. # noqa: E501 + :rtype: str + """ + return self._http_method + + @http_method.setter + def http_method(self, http_method): + """Sets the http_method of this WebhookResultDto. + + + :param http_method: The http_method of this WebhookResultDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and http_method is None: # noqa: E501 + raise ValueError("Invalid value for `http_method`, must not be `None`") # noqa: E501 + allowed_values = ["GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "TRACE"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and http_method not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `http_method` ({0}), must be one of {1}" # noqa: E501 + .format(http_method, allowed_values) + ) + + self._http_method = http_method + + @property + def webhook_event(self): + """Gets the webhook_event of this WebhookResultDto. # noqa: E501 + + + :return: The webhook_event of this WebhookResultDto. # noqa: E501 + :rtype: str + """ + return self._webhook_event + + @webhook_event.setter + def webhook_event(self, webhook_event): + """Sets the webhook_event of this WebhookResultDto. + + + :param webhook_event: The webhook_event of this WebhookResultDto. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and webhook_event is None: # noqa: E501 + raise ValueError("Invalid value for `webhook_event`, must not be `None`") # noqa: E501 + allowed_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and webhook_event not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `webhook_event` ({0}), must be one of {1}" # noqa: E501 + .format(webhook_event, allowed_values) + ) + + self._webhook_event = webhook_event + + @property + def response_status(self): + """Gets the response_status of this WebhookResultDto. # noqa: E501 + + + :return: The response_status of this WebhookResultDto. # noqa: E501 + :rtype: int + """ + return self._response_status + + @response_status.setter + def response_status(self, response_status): + """Sets the response_status of this WebhookResultDto. + + + :param response_status: The response_status of this WebhookResultDto. # noqa: E501 + :type: int + """ + + self._response_status = response_status + + @property + def response_time_millis(self): + """Gets the response_time_millis of this WebhookResultDto. # noqa: E501 + + + :return: The response_time_millis of this WebhookResultDto. # noqa: E501 + :rtype: int + """ + return self._response_time_millis + + @response_time_millis.setter + def response_time_millis(self, response_time_millis): + """Sets the response_time_millis of this WebhookResultDto. + + + :param response_time_millis: The response_time_millis of this WebhookResultDto. # noqa: E501 + :type: int + """ + if self.local_vars_configuration.client_side_validation and response_time_millis is None: # noqa: E501 + raise ValueError("Invalid value for `response_time_millis`, must not be `None`") # noqa: E501 + + self._response_time_millis = response_time_millis + + @property + def response_body_extract(self): + """Gets the response_body_extract of this WebhookResultDto. # noqa: E501 + + + :return: The response_body_extract of this WebhookResultDto. # noqa: E501 + :rtype: str + """ + return self._response_body_extract + + @response_body_extract.setter + def response_body_extract(self, response_body_extract): + """Sets the response_body_extract of this WebhookResultDto. + + + :param response_body_extract: The response_body_extract of this WebhookResultDto. # noqa: E501 + :type: str + """ + + self._response_body_extract = response_body_extract + + @property + def result_type(self): + """Gets the result_type of this WebhookResultDto. # noqa: E501 + + + :return: The result_type of this WebhookResultDto. # noqa: E501 + :rtype: str + """ + return self._result_type + + @result_type.setter + def result_type(self, result_type): + """Sets the result_type of this WebhookResultDto. + + + :param result_type: The result_type of this WebhookResultDto. # noqa: E501 + :type: str + """ + allowed_values = ["BAD_RESPONSE", "EXCEPTION", "SUCCESS"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and result_type not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `result_type` ({0}), must be one of {1}" # noqa: E501 + .format(result_type, allowed_values) + ) + + self._result_type = result_type + + @property + def created_at(self): + """Gets the created_at of this WebhookResultDto. # noqa: E501 + + + :return: The created_at of this WebhookResultDto. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this WebhookResultDto. + + + :param created_at: The created_at of this WebhookResultDto. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and created_at is None: # noqa: E501 + raise ValueError("Invalid value for `created_at`, must not be `None`") # noqa: E501 + + self._created_at = created_at + + @property + def updated_at(self): + """Gets the updated_at of this WebhookResultDto. # noqa: E501 + + + :return: The updated_at of this WebhookResultDto. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this WebhookResultDto. + + + :param updated_at: The updated_at of this WebhookResultDto. # noqa: E501 + :type: datetime + """ + if self.local_vars_configuration.client_side_validation and updated_at is None: # noqa: E501 + raise ValueError("Invalid value for `updated_at`, must not be `None`") # noqa: E501 + + self._updated_at = updated_at + + @property + def seen(self): + """Gets the seen of this WebhookResultDto. # noqa: E501 + + + :return: The seen of this WebhookResultDto. # noqa: E501 + :rtype: bool + """ + return self._seen + + @seen.setter + def seen(self, seen): + """Sets the seen of this WebhookResultDto. + + + :param seen: The seen of this WebhookResultDto. # noqa: E501 + :type: bool + """ + if self.local_vars_configuration.client_side_validation and seen is None: # noqa: E501 + raise ValueError("Invalid value for `seen`, must not be `None`") # noqa: E501 + + self._seen = seen + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WebhookResultDto): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebhookResultDto): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/webhook_test_request.py b/mailslurp_client/models/webhook_test_request.py new file mode 100644 index 00000000..5ede3b54 --- /dev/null +++ b/mailslurp_client/models/webhook_test_request.py @@ -0,0 +1,208 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class WebhookTestRequest(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'url': 'str', + 'method': 'str', + 'headers': 'dict(str, str)', + 'payload': 'str' + } + + attribute_map = { + 'url': 'url', + 'method': 'method', + 'headers': 'headers', + 'payload': 'payload' + } + + def __init__(self, url=None, method=None, headers=None, payload=None, local_vars_configuration=None): # noqa: E501 + """WebhookTestRequest - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._url = None + self._method = None + self._headers = None + self._payload = None + self.discriminator = None + + self.url = url + self.method = method + self.headers = headers + if payload is not None: + self.payload = payload + + @property + def url(self): + """Gets the url of this WebhookTestRequest. # noqa: E501 + + + :return: The url of this WebhookTestRequest. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this WebhookTestRequest. + + + :param url: The url of this WebhookTestRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and url is None: # noqa: E501 + raise ValueError("Invalid value for `url`, must not be `None`") # noqa: E501 + + self._url = url + + @property + def method(self): + """Gets the method of this WebhookTestRequest. # noqa: E501 + + + :return: The method of this WebhookTestRequest. # noqa: E501 + :rtype: str + """ + return self._method + + @method.setter + def method(self, method): + """Sets the method of this WebhookTestRequest. + + + :param method: The method of this WebhookTestRequest. # noqa: E501 + :type: str + """ + if self.local_vars_configuration.client_side_validation and method is None: # noqa: E501 + raise ValueError("Invalid value for `method`, must not be `None`") # noqa: E501 + allowed_values = ["GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "TRACE"] # noqa: E501 + if self.local_vars_configuration.client_side_validation and method not in allowed_values: # noqa: E501 + raise ValueError( + "Invalid value for `method` ({0}), must be one of {1}" # noqa: E501 + .format(method, allowed_values) + ) + + self._method = method + + @property + def headers(self): + """Gets the headers of this WebhookTestRequest. # noqa: E501 + + + :return: The headers of this WebhookTestRequest. # noqa: E501 + :rtype: dict(str, str) + """ + return self._headers + + @headers.setter + def headers(self, headers): + """Sets the headers of this WebhookTestRequest. + + + :param headers: The headers of this WebhookTestRequest. # noqa: E501 + :type: dict(str, str) + """ + if self.local_vars_configuration.client_side_validation and headers is None: # noqa: E501 + raise ValueError("Invalid value for `headers`, must not be `None`") # noqa: E501 + + self._headers = headers + + @property + def payload(self): + """Gets the payload of this WebhookTestRequest. # noqa: E501 + + + :return: The payload of this WebhookTestRequest. # noqa: E501 + :rtype: str + """ + return self._payload + + @payload.setter + def payload(self, payload): + """Sets the payload of this WebhookTestRequest. + + + :param payload: The payload of this WebhookTestRequest. # noqa: E501 + :type: str + """ + + self._payload = payload + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WebhookTestRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebhookTestRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/webhook_test_response.py b/mailslurp_client/models/webhook_test_response.py new file mode 100644 index 00000000..a4383701 --- /dev/null +++ b/mailslurp_client/models/webhook_test_response.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class WebhookTestResponse(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'status_code': 'int', + 'message': 'str' + } + + attribute_map = { + 'status_code': 'statusCode', + 'message': 'message' + } + + def __init__(self, status_code=None, message=None, local_vars_configuration=None): # noqa: E501 + """WebhookTestResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._status_code = None + self._message = None + self.discriminator = None + + if status_code is not None: + self.status_code = status_code + if message is not None: + self.message = message + + @property + def status_code(self): + """Gets the status_code of this WebhookTestResponse. # noqa: E501 + + + :return: The status_code of this WebhookTestResponse. # noqa: E501 + :rtype: int + """ + return self._status_code + + @status_code.setter + def status_code(self, status_code): + """Sets the status_code of this WebhookTestResponse. + + + :param status_code: The status_code of this WebhookTestResponse. # noqa: E501 + :type: int + """ + + self._status_code = status_code + + @property + def message(self): + """Gets the message of this WebhookTestResponse. # noqa: E501 + + + :return: The message of this WebhookTestResponse. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this WebhookTestResponse. + + + :param message: The message of this WebhookTestResponse. # noqa: E501 + :type: str + """ + + self._message = message + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WebhookTestResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebhookTestResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/models/webhook_test_result.py b/mailslurp_client/models/webhook_test_result.py new file mode 100644 index 00000000..ba499568 --- /dev/null +++ b/mailslurp_client/models/webhook_test_result.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +import pprint +import re # noqa: F401 + +import six + +from mailslurp_client.configuration import Configuration + + +class WebhookTestResult(object): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + 'message': 'str', + 'response': 'WebhookTestResponse', + 'request': 'WebhookTestRequest' + } + + attribute_map = { + 'message': 'message', + 'response': 'response', + 'request': 'request' + } + + def __init__(self, message=None, response=None, request=None, local_vars_configuration=None): # noqa: E501 + """WebhookTestResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration + + self._message = None + self._response = None + self._request = None + self.discriminator = None + + if message is not None: + self.message = message + self.response = response + self.request = request + + @property + def message(self): + """Gets the message of this WebhookTestResult. # noqa: E501 + + + :return: The message of this WebhookTestResult. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this WebhookTestResult. + + + :param message: The message of this WebhookTestResult. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def response(self): + """Gets the response of this WebhookTestResult. # noqa: E501 + + + :return: The response of this WebhookTestResult. # noqa: E501 + :rtype: WebhookTestResponse + """ + return self._response + + @response.setter + def response(self, response): + """Sets the response of this WebhookTestResult. + + + :param response: The response of this WebhookTestResult. # noqa: E501 + :type: WebhookTestResponse + """ + if self.local_vars_configuration.client_side_validation and response is None: # noqa: E501 + raise ValueError("Invalid value for `response`, must not be `None`") # noqa: E501 + + self._response = response + + @property + def request(self): + """Gets the request of this WebhookTestResult. # noqa: E501 + + + :return: The request of this WebhookTestResult. # noqa: E501 + :rtype: WebhookTestRequest + """ + return self._request + + @request.setter + def request(self, request): + """Sets the request of this WebhookTestResult. + + + :param request: The request of this WebhookTestResult. # noqa: E501 + :type: WebhookTestRequest + """ + if self.local_vars_configuration.client_side_validation and request is None: # noqa: E501 + raise ValueError("Invalid value for `request`, must not be `None`") # noqa: E501 + + self._request = request + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, WebhookTestResult): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, WebhookTestResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/mailslurp_client/rest.py b/mailslurp_client/rest.py new file mode 100644 index 00000000..de0f5383 --- /dev/null +++ b/mailslurp_client/rest.py @@ -0,0 +1,292 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import io +import json +import logging +import re +import ssl + +import certifi +# python 2 and python 3 compatibility library +import six +from six.moves.urllib.parse import urlencode +import urllib3 + +from mailslurp_client.exceptions import ApiException, ApiValueError + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.getheaders() + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.getheader(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + # ca_certs + if configuration.ssl_ca_cert: + ca_certs = configuration.ssl_ca_cert + else: + # if not set certificate file, use Mozilla's root certificates. + ca_certs = certifi.where() + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) + + if 'Content-Type' not in headers: + headers['Content-Type'] = 'application/json' + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + if query_params: + url += '?' + urlencode(query_params) + if re.search('json', headers['Content-Type'], re.IGNORECASE): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields=query_params, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # log response body + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + raise ApiException(http_resp=r) + + return r + + def GET(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def HEAD(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def OPTIONS(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def DELETE(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def POST(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PUT(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PATCH(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..eb358efd --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ +certifi >= 14.05.14 +future; python_version<="2.7" +six >= 1.10 +python_dateutil >= 2.5.3 +setuptools >= 21.0.0 +urllib3 >= 1.15.1 diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..11433ee8 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +max-line-length=99 diff --git a/setup.py b/setup.py new file mode 100644 index 00000000..4260484b --- /dev/null +++ b/setup.py @@ -0,0 +1,273 @@ +from setuptools import setup, find_packages + +setup( + name="mailslurp-client", + version="15.13.26", + description="Official MailSlurp Python SDK Email API", + author="MailSlurp", + author_email="support@mailslurp.zendesk.com", + url="https://www.mailslurp.com/python", + keywords=["MailSlurp", "Email", "SMTP", "Mailer", "MailSlurp API", "Test"], + install_requires=["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"], + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + long_description=""" +# MailSlurp Python Client + +> Create real email addresses on demand. Send and receive emails and attachments from code and tests using Python. + +MailSlurp is an email API service that lets you create real email addresses in code. You can then send and receive emails and attachments in Python applications and tests. + +## Quick links + +- [Method Documentation](https://docs.mailslurp.com/python/docs/) +- [PyPI Package](https://pypi.org/project/mailslurp-client/) +- [Github Source](https://github.com/mailslurp/mailslurp-client-python) +- [Send email using SMTP in Python](https://www.mailslurp.com/smtp/python-send-email-smtp/) +- [SMTP access details](https://www.mailslurp.com/guides/smtp-imap/) + +## Get started + +This section describes how to get up and running with the Python client. + +See the [examples page](https://www.mailslurp.com/examples/) for more examples and use with common frameworks such as Django, Flask and Pytest. + +See the method documentation for a [list of all functions](https://docs.mailslurp.com/ruby/docs/) + +### Create API Key + +First you'll need an API Key. [Create a free account](https://app.mailslurp.com) and copy the key from your dashboard. + +### Install package + +MailSlurp has an official PyPI package called `mailslurp-client`. It supports Python version 2 and 3. + +```bash +pip install mailslurp-client +``` + +On some systems you may need to install `distutils`. + +### Configure + +Once installed you can import `mailslurp_client` and create a configuration with your [API Key](https://app.mailslurp.com). + +```python +import mailslurp_client + +configuration = mailslurp_client.Configuration() +configuration.api_key['x-api-key'] = "your-api-key-here" +``` + +## Common usage + +MailSlurp can be used to create email addresses than can send and receive real emails and attachments in Python. + +### Create an email address + +Use `with` statements to create controllers for each endpoint of the MailSlurp API. + +```python +def create_inbox_example(): + with mailslurp_client.ApiClient(configuration) as api_client: + + # create an inbox using the inbox controller + api_instance = mailslurp_client.InboxControllerApi(api_client) + inbox = api_instance.create_inbox() + + # check the id and email_address of the inbox + assert len(inbox.id) > 0 + assert "mailslurp.com" in inbox.email_address +``` + +#### Inbox types + +Inboxes can be either `SMTP` or `HTTP` type. Set the inbox type using the `inboxType` property. SMTP inboxes are handled by a custom mailserver and support a wide range of clients while HTTP inboxes use Amazon SES and don't support some older clients like Outlook. SMTP inboxes are recommended for public facing email addresses while HTTP inboxes are best for application testing. Please see the guide on [types of inboxes](https://www.mailslurp.com/guides/smtp-vs-http-email-inboxes/) for more information. + +### List inboxes + +```python +def test_can_list_inboxes(self): + # use the with keyword to create an api client + with mailslurp_client.ApiClient(configuration) as api_client: + # create an inbox using the inbox controller + inbox_controller = mailslurp_client.InboxControllerApi(api_client) + inboxes = inbox_controller.get_all_inboxes(page=0) + + # pagination properties + assert inboxes.total_pages > 0 + assert inboxes.total_elements > 0 + + # view contents + assert len(inboxes.content[0].id) > 0 +``` + +### Send emails + +```python +def send_email_example(): + with mailslurp_client.ApiClient(configuration) as api_client: + # first create an inbox + api_instance = mailslurp_client.InboxControllerApi(api_client) + inbox = api_instance.create_inbox() + + # send email from the inbox + send_email_options = mailslurp_client.SendEmailOptions() + send_email_options.to = [inbox.email_address] + send_email_options.subject = "Hello" + send_email_options.body = "Your message" + send_email_options.is_html = True + api_instance.send_email(inbox.id, send_email_options=send_email_options) +``` + +### Send email using SMTP +To use SMTP clients first create an SMTP type inbox and use the inbox controller `get_imap_smtp_access` method to obtain the username, password, port and host. + +```python +import os +import mailslurp_client +from smtplib import SMTP +from mailslurp_client import CreateInboxDto + +api_key = os.environ.get('API_KEY') +assert api_key is not None + +# create a mailslurp configuration +configuration = mailslurp_client.Configuration() +configuration.api_key['x-api-key'] = api_key + + +class Test_MailSlurp_SDK: + # Can send email with SMTP + def test_can_send_with_smtp(self): + with mailslurp_client.ApiClient(configuration) as api_client: + # create an SMTP inbox + inbox_controller = mailslurp_client.InboxControllerApi(api_client) + inbox1 = inbox_controller.create_inbox_with_options(CreateInboxDto(inbox_type="SMTP_INBOX")) + inbox2 = inbox_controller.create_inbox() + assert "@mailslurp.mx" in inbox1.email_address + + # get smtp imap access + smtp_access = inbox_controller.get_imap_smtp_access(inbox_id=inbox1.id) + msg = "Subject: Test subject\r\n\r\nThis is the body" + + # configure smtp client using access details + with SMTP(host=smtp_access.smtp_server_host, port=smtp_access.smtp_server_port) as smtp: + smtp.login(user=smtp_access.smtp_username, password=smtp_access.smtp_password) + smtp.sendmail(from_addr=inbox1.email_address, to_addrs=[inbox2.email_address], msg=msg) + smtp.quit() + + # test that email is sent + wait_for_controller = mailslurp_client.WaitForControllerApi(api_client) + email = wait_for_controller.wait_for_latest_email(inbox_id=inbox2.id) + assert "Test subject" in email.subject +``` + +### Use attachments + +To send attachments first use the `AttachmentControllerApi` to upload a file or byte stream. Then use the attachment ID returned with subsequent send calls. + +```python +@staticmethod +def upload_attachment(): + with mailslurp_client.ApiClient(configuration) as api_client: + import base64 + + file_bytes = "Your file's bytes".encode("utf-8") + encoded_contents = base64.b64encode(file_bytes) + attachment_controller = mailslurp_client.AttachmentControllerApi(api_client) + + upload_options = mailslurp_client.UploadAttachmentOptions( + content_type="text/plain", + filename="test.txt", + base64_contents=str(encoded_contents, 'utf-8') + ) + print("upload_options = {}".format(upload_options)) + return attachment_controller.upload_attachment(upload_options) +``` + +### Receive emails and extract content + +```python +def receive_email_and_extract_content_example(): + with mailslurp_client.ApiClient(configuration) as api_client: + # create two inboxes for testing + inbox_controller = mailslurp_client.InboxControllerApi(api_client) + inbox_1 = inbox_controller.create_inbox() + inbox_2 = inbox_controller.create_inbox() + + # send email from inbox 1 to inbox 2 + send_email_options = mailslurp_client.SendEmailOptions() + send_email_options.to = [inbox_2.email_address] + send_email_options.subject = "Hello inbox 2" + send_email_options.body = "Your code is: 123" + send_email_options.attachments = self.upload_attachment() # see previous section + + inbox_controller.send_email(inbox_1.id, send_email_options=send_email_options) + + # receive email for inbox 2 + waitfor_controller = mailslurp_client.WaitForControllerApi(api_client) + email = waitfor_controller.wait_for_latest_email(inbox_id=inbox_2.id, timeout=30000, unread_only=True) + + assert email.subject == "Hello inbox 2" + + # extract content from body + import re + pattern = re.compile('Your code is: ([0-9]{3})') + matches = pattern.match(email.body) + code = matches.group(1) + + assert code == "123" +``` + +### Download attachments + +```python + +def receive_email_and_extract_content_example(): + with mailslurp_client.ApiClient(configuration) as api_client: + # wait for email to be received by inbox 2 + email = wait_controller.wait_for_latest_email(inbox_id=inbox_2.id, timeout=30000, unread_only=True) + + # assert that the message was received + assert email.inbox_id == inbox_2.id + assert email.subject == "Hello" + + # attachment ids pressent + assert len(email.attachments) == 1 + + # download attachment content + email_controller = mailslurp_client.EmailControllerApi(api_client) + downloaded_bytes = email_controller.download_attachment(email.attachments[0], email.id) + assert len(downloaded_bytes) > 0 + + # alternatively download as base64 string with more meta data + email_controller = mailslurp_client.EmailControllerApi(api_client) + downloaded_attachment = email_controller.download_attachment_base64(email.attachments[0], email.id) + assert downloaded_attachment.content_type == "text/plain" + base64_contents = downloaded_attachment.base64_file_contents + import base64 + attachment_bytes = base64.b64decode(base64_contents) + assert len(attachment_bytes) > 0 +``` + +### Verify email address + +You can verify email addresses with MailSlurp. This will perform SMTP queries for the email address on your behalf. + +```python +def test_validate_email(self): + with mailslurp_client.ApiClient(configuration) as api_client: + mailserver_controller = mailslurp_client.MailServerControllerApi(api_client) + verify_options = mailslurp_client.VerifyEmailAddressOptions(email_address="test@gmail.com") + result = mailserver_controller.verify_email_address(verify_options=verify_options) + assert result.error is None + assert result.is_valid is True +``` + +## SDK Documentation + +See the [guides page](https://www.mailslurp.com/guides/) or [the examples](https://www.github.com/mailslurp/examples) or the [Method Documentation](https://docs.mailslurp.com/ruby/docs/) for full usage. + """, + long_description_content_type="text/markdown" +) diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 00000000..4ed3991c --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,3 @@ +pytest~=4.6.7 # needed for python 2.7+3.4 +pytest-cov>=2.8.1 +pytest-randomly==1.2.3 # needed for python 2.7+3.4 diff --git a/test/__init__.py b/test/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/test/test_abstract_webhook_payload.py b/test/test_abstract_webhook_payload.py new file mode 100644 index 00000000..a97f0701 --- /dev/null +++ b/test/test_abstract_webhook_payload.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.abstract_webhook_payload import AbstractWebhookPayload # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestAbstractWebhookPayload(unittest.TestCase): + """AbstractWebhookPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test AbstractWebhookPayload + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.abstract_webhook_payload.AbstractWebhookPayload() # noqa: E501 + if include_optional : + return AbstractWebhookPayload( + event_name = 'EMAIL_RECEIVED', + message_id = '0', + webhook_id = '0', + webhook_name = '0' + ) + else : + return AbstractWebhookPayload( + event_name = 'EMAIL_RECEIVED', + message_id = '0', + webhook_id = '0', + ) + + def testAbstractWebhookPayload(self): + """Test AbstractWebhookPayload""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_alias_controller_api.py b/test/test_alias_controller_api.py new file mode 100644 index 00000000..1a3e4086 --- /dev/null +++ b/test/test_alias_controller_api.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import mailslurp_client +from mailslurp_client.api.alias_controller_api import AliasControllerApi # noqa: E501 +from mailslurp_client.rest import ApiException + + +class TestAliasControllerApi(unittest.TestCase): + """AliasControllerApi unit test stubs""" + + def setUp(self): + self.api = mailslurp_client.api.alias_controller_api.AliasControllerApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_alias(self): + """Test case for create_alias + + Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active. # noqa: E501 + """ + pass + + def test_delete_alias(self): + """Test case for delete_alias + + Delete an email alias # noqa: E501 + """ + pass + + def test_get_alias(self): + """Test case for get_alias + + Get an email alias # noqa: E501 + """ + pass + + def test_get_alias_emails(self): + """Test case for get_alias_emails + + Get emails for an alias # noqa: E501 + """ + pass + + def test_get_alias_threads(self): + """Test case for get_alias_threads + + Get threads created for an alias # noqa: E501 + """ + pass + + def test_get_aliases(self): + """Test case for get_aliases + + Get all email aliases you have created # noqa: E501 + """ + pass + + def test_reply_to_alias_email(self): + """Test case for reply_to_alias_email + + Reply to an email # noqa: E501 + """ + pass + + def test_send_alias_email(self): + """Test case for send_alias_email + + Send an email from an alias inbox # noqa: E501 + """ + pass + + def test_update_alias(self): + """Test case for update_alias + + Update an email alias # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_alias_dto.py b/test/test_alias_dto.py new file mode 100644 index 00000000..0651a033 --- /dev/null +++ b/test/test_alias_dto.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.alias_dto import AliasDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestAliasDto(unittest.TestCase): + """AliasDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test AliasDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.alias_dto.AliasDto() # noqa: E501 + if include_optional : + return AliasDto( + id = '0', + email_address = '0', + masked_email_address = '0', + user_id = '0', + inbox_id = '0', + name = '0', + use_threads = True, + is_verified = True, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return AliasDto( + id = '0', + email_address = '0', + user_id = '0', + inbox_id = '0', + is_verified = True, + ) + + def testAliasDto(self): + """Test AliasDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_alias_projection.py b/test/test_alias_projection.py new file mode 100644 index 00000000..af241b37 --- /dev/null +++ b/test/test_alias_projection.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.alias_projection import AliasProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestAliasProjection(unittest.TestCase): + """AliasProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test AliasProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.alias_projection.AliasProjection() # noqa: E501 + if include_optional : + return AliasProjection( + name = '0', + id = '0', + inbox_id = '0', + user_id = '0', + email_address = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + use_threads = True, + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return AliasProjection( + id = '0', + inbox_id = '0', + user_id = '0', + email_address = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testAliasProjection(self): + """Test AliasProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_api_user_controller_api.py b/test/test_api_user_controller_api.py new file mode 100644 index 00000000..7aa606d9 --- /dev/null +++ b/test/test_api_user_controller_api.py @@ -0,0 +1,46 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import mailslurp_client +from mailslurp_client.api.api_user_controller_api import ApiUserControllerApi # noqa: E501 +from mailslurp_client.rest import ApiException + + +class TestApiUserControllerApi(unittest.TestCase): + """ApiUserControllerApi unit test stubs""" + + def setUp(self): + self.api = mailslurp_client.api.api_user_controller_api.ApiUserControllerApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_json_property_as_string(self): + """Test case for get_json_property_as_string + + """ + pass + + def test_get_user_info(self): + """Test case for get_user_info + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_attachment_controller_api.py b/test/test_attachment_controller_api.py new file mode 100644 index 00000000..bc4635ea --- /dev/null +++ b/test/test_attachment_controller_api.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import mailslurp_client +from mailslurp_client.api.attachment_controller_api import AttachmentControllerApi # noqa: E501 +from mailslurp_client.rest import ApiException + + +class TestAttachmentControllerApi(unittest.TestCase): + """AttachmentControllerApi unit test stubs""" + + def setUp(self): + self.api = mailslurp_client.api.attachment_controller_api.AttachmentControllerApi() # noqa: E501 + + def tearDown(self): + pass + + def test_delete_all_attachments(self): + """Test case for delete_all_attachments + + Delete all attachments # noqa: E501 + """ + pass + + def test_delete_attachment(self): + """Test case for delete_attachment + + Delete an attachment # noqa: E501 + """ + pass + + def test_download_attachment_as_base64_encoded(self): + """Test case for download_attachment_as_base64_encoded + + Get email attachment as base64 encoded string as alternative to binary responses. To read the content decode the Base64 encoded contents. # noqa: E501 + """ + pass + + def test_download_attachment_as_bytes(self): + """Test case for download_attachment_as_bytes + + Download attachments. Get email attachment bytes. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints. # noqa: E501 + """ + pass + + def test_get_attachment(self): + """Test case for get_attachment + + Get an attachment entity # noqa: E501 + """ + pass + + def test_get_attachment_info(self): + """Test case for get_attachment_info + + Get email attachment metadata information # noqa: E501 + """ + pass + + def test_get_attachments(self): + """Test case for get_attachments + + Get email attachments # noqa: E501 + """ + pass + + def test_upload_attachment(self): + """Test case for upload_attachment + + Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment. # noqa: E501 + """ + pass + + def test_upload_attachment_bytes(self): + """Test case for upload_attachment_bytes + + Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment. # noqa: E501 + """ + pass + + def test_upload_multipart_form(self): + """Test case for upload_multipart_form + + Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment. # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_attachment_entity.py b/test/test_attachment_entity.py new file mode 100644 index 00000000..27f0a6d9 --- /dev/null +++ b/test/test_attachment_entity.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.attachment_entity import AttachmentEntity # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestAttachmentEntity(unittest.TestCase): + """AttachmentEntity unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test AttachmentEntity + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.attachment_entity.AttachmentEntity() # noqa: E501 + if include_optional : + return AttachmentEntity( + id = '0', + attachment_id = '0', + bucket = '0', + user_id = '0', + content_type = '0', + content_length = 56, + name = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return AttachmentEntity( + attachment_id = '0', + user_id = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testAttachmentEntity(self): + """Test AttachmentEntity""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_attachment_meta_data.py b/test/test_attachment_meta_data.py new file mode 100644 index 00000000..7cd99f32 --- /dev/null +++ b/test/test_attachment_meta_data.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.attachment_meta_data import AttachmentMetaData # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestAttachmentMetaData(unittest.TestCase): + """AttachmentMetaData unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test AttachmentMetaData + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.attachment_meta_data.AttachmentMetaData() # noqa: E501 + if include_optional : + return AttachmentMetaData( + name = '0', + content_type = '0', + content_length = 56, + id = '0' + ) + else : + return AttachmentMetaData( + name = '0', + content_type = '0', + content_length = 56, + id = '0', + ) + + def testAttachmentMetaData(self): + """Test AttachmentMetaData""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_attachment_projection.py b/test/test_attachment_projection.py new file mode 100644 index 00000000..f7c7a8ff --- /dev/null +++ b/test/test_attachment_projection.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.attachment_projection import AttachmentProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestAttachmentProjection(unittest.TestCase): + """AttachmentProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test AttachmentProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.attachment_projection.AttachmentProjection() # noqa: E501 + if include_optional : + return AttachmentProjection( + name = '0', + content_length = 56, + content_type = 'image/png', + user_id = '0', + attachment_id = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return AttachmentProjection( + user_id = '0', + attachment_id = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testAttachmentProjection(self): + """Test AttachmentProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_basic_auth_options.py b/test/test_basic_auth_options.py new file mode 100644 index 00000000..bb014925 --- /dev/null +++ b/test/test_basic_auth_options.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.basic_auth_options import BasicAuthOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestBasicAuthOptions(unittest.TestCase): + """BasicAuthOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test BasicAuthOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.basic_auth_options.BasicAuthOptions() # noqa: E501 + if include_optional : + return BasicAuthOptions( + username = '0', + password = '0' + ) + else : + return BasicAuthOptions( + username = '0', + password = '0', + ) + + def testBasicAuthOptions(self): + """Test BasicAuthOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_bounce_controller_api.py b/test/test_bounce_controller_api.py new file mode 100644 index 00000000..05b87fc0 --- /dev/null +++ b/test/test_bounce_controller_api.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import mailslurp_client +from mailslurp_client.api.bounce_controller_api import BounceControllerApi # noqa: E501 +from mailslurp_client.rest import ApiException + + +class TestBounceControllerApi(unittest.TestCase): + """BounceControllerApi unit test stubs""" + + def setUp(self): + self.api = mailslurp_client.api.bounce_controller_api.BounceControllerApi() # noqa: E501 + + def tearDown(self): + pass + + def test_filter_bounced_recipient(self): + """Test case for filter_bounced_recipient + + Filter a list of email recipients and remove those who have bounced # noqa: E501 + """ + pass + + def test_get_bounced_email(self): + """Test case for get_bounced_email + + Get a bounced email. # noqa: E501 + """ + pass + + def test_get_bounced_emails(self): + """Test case for get_bounced_emails + + Get paginated list of bounced emails. # noqa: E501 + """ + pass + + def test_get_bounced_recipient(self): + """Test case for get_bounced_recipient + + Get a bounced email. # noqa: E501 + """ + pass + + def test_get_bounced_recipients(self): + """Test case for get_bounced_recipients + + Get paginated list of bounced recipients. # noqa: E501 + """ + pass + + def test_get_complaints(self): + """Test case for get_complaints + + Get paginated list of complaints. # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_bounce_projection.py b/test/test_bounce_projection.py new file mode 100644 index 00000000..0ec38c2f --- /dev/null +++ b/test/test_bounce_projection.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.bounce_projection import BounceProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestBounceProjection(unittest.TestCase): + """BounceProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test BounceProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.bounce_projection.BounceProjection() # noqa: E501 + if include_optional : + return BounceProjection( + id = '0', + sender = '0', + subject = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + bounce_mta = '0', + bounce_type = '0' + ) + else : + return BounceProjection( + sender = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testBounceProjection(self): + """Test BounceProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_bounce_recipient_projection.py b/test/test_bounce_recipient_projection.py new file mode 100644 index 00000000..e89fd096 --- /dev/null +++ b/test/test_bounce_recipient_projection.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.bounce_recipient_projection import BounceRecipientProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestBounceRecipientProjection(unittest.TestCase): + """BounceRecipientProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test BounceRecipientProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.bounce_recipient_projection.BounceRecipientProjection() # noqa: E501 + if include_optional : + return BounceRecipientProjection( + id = '0', + action = '0', + status = '0', + sent_email_id = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + recipient = '0' + ) + else : + return BounceRecipientProjection( + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + recipient = '0', + ) + + def testBounceRecipientProjection(self): + """Test BounceRecipientProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_bounced_email_dto.py b/test/test_bounced_email_dto.py new file mode 100644 index 00000000..fffcf518 --- /dev/null +++ b/test/test_bounced_email_dto.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.bounced_email_dto import BouncedEmailDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestBouncedEmailDto(unittest.TestCase): + """BouncedEmailDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test BouncedEmailDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.bounced_email_dto.BouncedEmailDto() # noqa: E501 + if include_optional : + return BouncedEmailDto( + id = '0', + user_id = '0', + notification_type = '0', + sent_to_recipients = [ + '0' + ], + sender = '0', + bounce_mta = '0', + bounce_type = '0', + bounce_recipients = [ + '0' + ], + bounce_sub_type = '0', + sent_email_id = '0', + subject = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return BouncedEmailDto( + user_id = '0', + notification_type = '0', + sender = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testBouncedEmailDto(self): + """Test BouncedEmailDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_bounced_recipient_dto.py b/test/test_bounced_recipient_dto.py new file mode 100644 index 00000000..32ca30b3 --- /dev/null +++ b/test/test_bounced_recipient_dto.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.bounced_recipient_dto import BouncedRecipientDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestBouncedRecipientDto(unittest.TestCase): + """BouncedRecipientDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test BouncedRecipientDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.bounced_recipient_dto.BouncedRecipientDto() # noqa: E501 + if include_optional : + return BouncedRecipientDto( + id = '0', + user_id = '0', + sent_email_id = '0', + recipient = '0', + diagnostic_code = '0', + action = '0', + status = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return BouncedRecipientDto( + recipient = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testBouncedRecipientDto(self): + """Test BouncedRecipientDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_bulk_actions_controller_api.py b/test/test_bulk_actions_controller_api.py new file mode 100644 index 00000000..0eb83687 --- /dev/null +++ b/test/test_bulk_actions_controller_api.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import mailslurp_client +from mailslurp_client.api.bulk_actions_controller_api import BulkActionsControllerApi # noqa: E501 +from mailslurp_client.rest import ApiException + + +class TestBulkActionsControllerApi(unittest.TestCase): + """BulkActionsControllerApi unit test stubs""" + + def setUp(self): + self.api = mailslurp_client.api.bulk_actions_controller_api.BulkActionsControllerApi() # noqa: E501 + + def tearDown(self): + pass + + def test_bulk_create_inboxes(self): + """Test case for bulk_create_inboxes + + Bulk create Inboxes (email addresses) # noqa: E501 + """ + pass + + def test_bulk_delete_inboxes(self): + """Test case for bulk_delete_inboxes + + Bulk Delete Inboxes # noqa: E501 + """ + pass + + def test_bulk_send_emails(self): + """Test case for bulk_send_emails + + Bulk Send Emails # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_bulk_send_email_options.py b/test/test_bulk_send_email_options.py new file mode 100644 index 00000000..83a8a94f --- /dev/null +++ b/test/test_bulk_send_email_options.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.bulk_send_email_options import BulkSendEmailOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestBulkSendEmailOptions(unittest.TestCase): + """BulkSendEmailOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test BulkSendEmailOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.bulk_send_email_options.BulkSendEmailOptions() # noqa: E501 + if include_optional : + return BulkSendEmailOptions( + inbox_ids = [ + '0' + ], + send_email_options = mailslurp_client.models.send_email_options.SendEmailOptions( + to_contacts = [ + '0' + ], + to_group = '0', + to = [ + '0' + ], + from = '0', + cc = [ + '0' + ], + bcc = [ + '0' + ], + subject = '0', + reply_to = '0', + body = '0', + html = True, + is_html = True, + charset = '0', + attachments = [ + '0' + ], + template_variables = { + 'key' : None + }, + template = '0', + send_strategy = 'SINGLE_MESSAGE', + use_inbox_name = True, + add_tracking_pixel = True, + filter_bounced_recipients = True, + validate_email_addresses = 'VALIDATE_FILTER_REMOVE_INVALID', ) + ) + else : + return BulkSendEmailOptions( + inbox_ids = [ + '0' + ], + send_email_options = mailslurp_client.models.send_email_options.SendEmailOptions( + to_contacts = [ + '0' + ], + to_group = '0', + to = [ + '0' + ], + from = '0', + cc = [ + '0' + ], + bcc = [ + '0' + ], + subject = '0', + reply_to = '0', + body = '0', + html = True, + is_html = True, + charset = '0', + attachments = [ + '0' + ], + template_variables = { + 'key' : None + }, + template = '0', + send_strategy = 'SINGLE_MESSAGE', + use_inbox_name = True, + add_tracking_pixel = True, + filter_bounced_recipients = True, + validate_email_addresses = 'VALIDATE_FILTER_REMOVE_INVALID', ), + ) + + def testBulkSendEmailOptions(self): + """Test BulkSendEmailOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_common_actions_controller_api.py b/test/test_common_actions_controller_api.py new file mode 100644 index 00000000..0ed96e0f --- /dev/null +++ b/test/test_common_actions_controller_api.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import mailslurp_client +from mailslurp_client.api.common_actions_controller_api import CommonActionsControllerApi # noqa: E501 +from mailslurp_client.rest import ApiException + + +class TestCommonActionsControllerApi(unittest.TestCase): + """CommonActionsControllerApi unit test stubs""" + + def setUp(self): + self.api = mailslurp_client.api.common_actions_controller_api.CommonActionsControllerApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_new_email_address(self): + """Test case for create_new_email_address + + Create new random inbox # noqa: E501 + """ + pass + + def test_create_random_inbox(self): + """Test case for create_random_inbox + + Create new random inbox # noqa: E501 + """ + pass + + def test_delete_email_address(self): + """Test case for delete_email_address + + Delete inbox email address by inbox id # noqa: E501 + """ + pass + + def test_empty_inbox(self): + """Test case for empty_inbox + + Delete all emails in an inbox # noqa: E501 + """ + pass + + def test_send_email_simple(self): + """Test case for send_email_simple + + Send an email # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_complaint.py b/test/test_complaint.py new file mode 100644 index 00000000..b316bd3b --- /dev/null +++ b/test/test_complaint.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.complaint import Complaint # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestComplaint(unittest.TestCase): + """Complaint unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test Complaint + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.complaint.Complaint() # noqa: E501 + if include_optional : + return Complaint( + id = '0', + user_id = '0', + event_type = '0', + mail_source = '0', + mail_message_id = '0', + complaint_recipient = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return Complaint( + id = '0', + complaint_recipient = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testComplaint(self): + """Test Complaint""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_condition_option.py b/test/test_condition_option.py new file mode 100644 index 00000000..a8c6bb7b --- /dev/null +++ b/test/test_condition_option.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.condition_option import ConditionOption # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestConditionOption(unittest.TestCase): + """ConditionOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ConditionOption + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.condition_option.ConditionOption() # noqa: E501 + if include_optional : + return ConditionOption( + condition = 'HAS_ATTACHMENTS', + value = 'TRUE' + ) + else : + return ConditionOption( + condition = 'HAS_ATTACHMENTS', + value = 'TRUE', + ) + + def testConditionOption(self): + """Test ConditionOption""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_contact_controller_api.py b/test/test_contact_controller_api.py new file mode 100644 index 00000000..8174f3ca --- /dev/null +++ b/test/test_contact_controller_api.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import mailslurp_client +from mailslurp_client.api.contact_controller_api import ContactControllerApi # noqa: E501 +from mailslurp_client.rest import ApiException + + +class TestContactControllerApi(unittest.TestCase): + """ContactControllerApi unit test stubs""" + + def setUp(self): + self.api = mailslurp_client.api.contact_controller_api.ContactControllerApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_contact(self): + """Test case for create_contact + + Create a contact # noqa: E501 + """ + pass + + def test_delete_contact(self): + """Test case for delete_contact + + Delete contact # noqa: E501 + """ + pass + + def test_get_all_contacts(self): + """Test case for get_all_contacts + + Get all contacts # noqa: E501 + """ + pass + + def test_get_contact(self): + """Test case for get_contact + + Get contact # noqa: E501 + """ + pass + + def test_get_contact_v_card(self): + """Test case for get_contact_v_card + + Get contact vCard vcf file # noqa: E501 + """ + pass + + def test_get_contacts(self): + """Test case for get_contacts + + Get all contacts # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_contact_dto.py b/test/test_contact_dto.py new file mode 100644 index 00000000..34687de5 --- /dev/null +++ b/test/test_contact_dto.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.contact_dto import ContactDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestContactDto(unittest.TestCase): + """ContactDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ContactDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.contact_dto.ContactDto() # noqa: E501 + if include_optional : + return ContactDto( + id = '0', + group_id = '0', + first_name = '0', + last_name = '0', + company = '0', + email_addresses = [ + '0' + ], + primary_email_address = '0', + tags = [ + '0' + ], + meta_data = None, + opt_out = True, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return ContactDto( + id = '0', + email_addresses = [ + '0' + ], + tags = [ + '0' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testContactDto(self): + """Test ContactDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_contact_projection.py b/test/test_contact_projection.py new file mode 100644 index 00000000..a614fe03 --- /dev/null +++ b/test/test_contact_projection.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.contact_projection import ContactProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestContactProjection(unittest.TestCase): + """ContactProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ContactProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.contact_projection.ContactProjection() # noqa: E501 + if include_optional : + return ContactProjection( + id = '0', + group_id = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + first_name = '0', + last_name = '0', + company = '0', + email_addresses = [ + '0' + ], + opt_out = True + ) + else : + return ContactProjection( + id = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + opt_out = True, + ) + + def testContactProjection(self): + """Test ContactProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_content_match_options.py b/test/test_content_match_options.py new file mode 100644 index 00000000..5eaa83fe --- /dev/null +++ b/test/test_content_match_options.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.content_match_options import ContentMatchOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestContentMatchOptions(unittest.TestCase): + """ContentMatchOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ContentMatchOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.content_match_options.ContentMatchOptions() # noqa: E501 + if include_optional : + return ContentMatchOptions( + pattern = '0' + ) + else : + return ContentMatchOptions( + pattern = '0', + ) + + def testContentMatchOptions(self): + """Test ContentMatchOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_count_dto.py b/test/test_count_dto.py new file mode 100644 index 00000000..e828cb17 --- /dev/null +++ b/test/test_count_dto.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.count_dto import CountDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestCountDto(unittest.TestCase): + """CountDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test CountDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.count_dto.CountDto() # noqa: E501 + if include_optional : + return CountDto( + total_elements = 56 + ) + else : + return CountDto( + total_elements = 56, + ) + + def testCountDto(self): + """Test CountDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_alias_options.py b/test/test_create_alias_options.py new file mode 100644 index 00000000..c0747ec0 --- /dev/null +++ b/test/test_create_alias_options.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.create_alias_options import CreateAliasOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestCreateAliasOptions(unittest.TestCase): + """CreateAliasOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test CreateAliasOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.create_alias_options.CreateAliasOptions() # noqa: E501 + if include_optional : + return CreateAliasOptions( + email_address = '0', + inbox_id = '0', + name = '0', + use_threads = True + ) + else : + return CreateAliasOptions( + email_address = '0', + use_threads = True, + ) + + def testCreateAliasOptions(self): + """Test CreateAliasOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_contact_options.py b/test/test_create_contact_options.py new file mode 100644 index 00000000..3c09f8e9 --- /dev/null +++ b/test/test_create_contact_options.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.create_contact_options import CreateContactOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestCreateContactOptions(unittest.TestCase): + """CreateContactOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test CreateContactOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.create_contact_options.CreateContactOptions() # noqa: E501 + if include_optional : + return CreateContactOptions( + first_name = '0', + last_name = '0', + company = '0', + email_addresses = [ + '0' + ], + tags = [ + '0' + ], + meta_data = mailslurp_client.models.meta_data.metaData(), + opt_out = True, + group_id = '0' + ) + else : + return CreateContactOptions( + ) + + def testCreateContactOptions(self): + """Test CreateContactOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_domain_options.py b/test/test_create_domain_options.py new file mode 100644 index 00000000..9e78c4ac --- /dev/null +++ b/test/test_create_domain_options.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.create_domain_options import CreateDomainOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestCreateDomainOptions(unittest.TestCase): + """CreateDomainOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test CreateDomainOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.create_domain_options.CreateDomainOptions() # noqa: E501 + if include_optional : + return CreateDomainOptions( + domain = '0', + description = '0', + created_catch_all_inbox = True, + domain_type = 'HTTP_INBOX' + ) + else : + return CreateDomainOptions( + domain = '0', + ) + + def testCreateDomainOptions(self): + """Test CreateDomainOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_emergency_address_options.py b/test/test_create_emergency_address_options.py new file mode 100644 index 00000000..c326048b --- /dev/null +++ b/test/test_create_emergency_address_options.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.create_emergency_address_options import CreateEmergencyAddressOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestCreateEmergencyAddressOptions(unittest.TestCase): + """CreateEmergencyAddressOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test CreateEmergencyAddressOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.create_emergency_address_options.CreateEmergencyAddressOptions() # noqa: E501 + if include_optional : + return CreateEmergencyAddressOptions( + customer_name = '0', + address1 = '0', + city = '0', + region = '0', + postal_code = '0', + iso_country_code = 'US', + display_name = '0' + ) + else : + return CreateEmergencyAddressOptions( + customer_name = '0', + address1 = '0', + city = '0', + region = '0', + postal_code = '0', + iso_country_code = 'US', + ) + + def testCreateEmergencyAddressOptions(self): + """Test CreateEmergencyAddressOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_group_options.py b/test/test_create_group_options.py new file mode 100644 index 00000000..8370755f --- /dev/null +++ b/test/test_create_group_options.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.create_group_options import CreateGroupOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestCreateGroupOptions(unittest.TestCase): + """CreateGroupOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test CreateGroupOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.create_group_options.CreateGroupOptions() # noqa: E501 + if include_optional : + return CreateGroupOptions( + name = '0', + description = '0' + ) + else : + return CreateGroupOptions( + name = '0', + ) + + def testCreateGroupOptions(self): + """Test CreateGroupOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_inbox_dto.py b/test/test_create_inbox_dto.py new file mode 100644 index 00000000..af7dba81 --- /dev/null +++ b/test/test_create_inbox_dto.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.create_inbox_dto import CreateInboxDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestCreateInboxDto(unittest.TestCase): + """CreateInboxDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test CreateInboxDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.create_inbox_dto.CreateInboxDto() # noqa: E501 + if include_optional : + return CreateInboxDto( + email_address = '0', + name = '0', + description = '0', + use_domain_pool = True, + tags = [ + '0' + ], + expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + favourite = True, + expires_in = 56, + allow_team_access = True, + inbox_type = 'HTTP_INBOX', + virtual_inbox = True + ) + else : + return CreateInboxDto( + ) + + def testCreateInboxDto(self): + """Test CreateInboxDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_inbox_forwarder_options.py b/test/test_create_inbox_forwarder_options.py new file mode 100644 index 00000000..97d4fc5c --- /dev/null +++ b/test/test_create_inbox_forwarder_options.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.create_inbox_forwarder_options import CreateInboxForwarderOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestCreateInboxForwarderOptions(unittest.TestCase): + """CreateInboxForwarderOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test CreateInboxForwarderOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.create_inbox_forwarder_options.CreateInboxForwarderOptions() # noqa: E501 + if include_optional : + return CreateInboxForwarderOptions( + field = 'RECIPIENTS', + match = '0', + forward_to_recipients = [ + '0' + ] + ) + else : + return CreateInboxForwarderOptions( + field = 'RECIPIENTS', + match = '0', + forward_to_recipients = [ + '0' + ], + ) + + def testCreateInboxForwarderOptions(self): + """Test CreateInboxForwarderOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_inbox_ruleset_options.py b/test/test_create_inbox_ruleset_options.py new file mode 100644 index 00000000..4d14c4e2 --- /dev/null +++ b/test/test_create_inbox_ruleset_options.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.create_inbox_ruleset_options import CreateInboxRulesetOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestCreateInboxRulesetOptions(unittest.TestCase): + """CreateInboxRulesetOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test CreateInboxRulesetOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.create_inbox_ruleset_options.CreateInboxRulesetOptions() # noqa: E501 + if include_optional : + return CreateInboxRulesetOptions( + scope = 'RECEIVING_EMAILS', + action = 'BLOCK', + target = '0' + ) + else : + return CreateInboxRulesetOptions( + scope = 'RECEIVING_EMAILS', + action = 'BLOCK', + target = '0', + ) + + def testCreateInboxRulesetOptions(self): + """Test CreateInboxRulesetOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_template_options.py b/test/test_create_template_options.py new file mode 100644 index 00000000..0e342b1d --- /dev/null +++ b/test/test_create_template_options.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.create_template_options import CreateTemplateOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestCreateTemplateOptions(unittest.TestCase): + """CreateTemplateOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test CreateTemplateOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.create_template_options.CreateTemplateOptions() # noqa: E501 + if include_optional : + return CreateTemplateOptions( + name = '0', + content = '0' + ) + else : + return CreateTemplateOptions( + name = '0', + content = '0', + ) + + def testCreateTemplateOptions(self): + """Test CreateTemplateOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_tracking_pixel_options.py b/test/test_create_tracking_pixel_options.py new file mode 100644 index 00000000..53bee27d --- /dev/null +++ b/test/test_create_tracking_pixel_options.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.create_tracking_pixel_options import CreateTrackingPixelOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestCreateTrackingPixelOptions(unittest.TestCase): + """CreateTrackingPixelOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test CreateTrackingPixelOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.create_tracking_pixel_options.CreateTrackingPixelOptions() # noqa: E501 + if include_optional : + return CreateTrackingPixelOptions( + name = '0', + recipient = '0' + ) + else : + return CreateTrackingPixelOptions( + ) + + def testCreateTrackingPixelOptions(self): + """Test CreateTrackingPixelOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_webhook_options.py b/test/test_create_webhook_options.py new file mode 100644 index 00000000..8809b4b4 --- /dev/null +++ b/test/test_create_webhook_options.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.create_webhook_options import CreateWebhookOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestCreateWebhookOptions(unittest.TestCase): + """CreateWebhookOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test CreateWebhookOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.create_webhook_options.CreateWebhookOptions() # noqa: E501 + if include_optional : + return CreateWebhookOptions( + url = '0', + basic_auth = mailslurp_client.models.basic_auth_options.BasicAuthOptions( + username = '0', + password = '0', ), + name = '0', + event_name = 'EMAIL_RECEIVED', + include_headers = mailslurp_client.models.webhook_headers.WebhookHeaders( + headers = [ + mailslurp_client.models.webhook_header_name_value.WebhookHeaderNameValue( + name = '0', + value = '0', ) + ], ) + ) + else : + return CreateWebhookOptions( + url = '0', + ) + + def testCreateWebhookOptions(self): + """Test CreateWebhookOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_delivery_status_dto.py b/test/test_delivery_status_dto.py new file mode 100644 index 00000000..a630f8c1 --- /dev/null +++ b/test/test_delivery_status_dto.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.delivery_status_dto import DeliveryStatusDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestDeliveryStatusDto(unittest.TestCase): + """DeliveryStatusDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test DeliveryStatusDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.delivery_status_dto.DeliveryStatusDto() # noqa: E501 + if include_optional : + return DeliveryStatusDto( + id = '0', + user_id = '0', + sent_id = '0', + remote_mta_ip = '0', + inbox_id = '0', + reporting_mta = '0', + recipients = [ + '0' + ], + smtp_response = '0', + smtp_status_code = 56, + processing_time_millis = 56, + received = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + subject = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return DeliveryStatusDto( + id = '0', + user_id = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testDeliveryStatusDto(self): + """Test DeliveryStatusDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_describe_domain_options.py b/test/test_describe_domain_options.py new file mode 100644 index 00000000..393a3249 --- /dev/null +++ b/test/test_describe_domain_options.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.describe_domain_options import DescribeDomainOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestDescribeDomainOptions(unittest.TestCase): + """DescribeDomainOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test DescribeDomainOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.describe_domain_options.DescribeDomainOptions() # noqa: E501 + if include_optional : + return DescribeDomainOptions( + domain = '0' + ) + else : + return DescribeDomainOptions( + domain = '0', + ) + + def testDescribeDomainOptions(self): + """Test DescribeDomainOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_describe_mail_server_domain_result.py b/test/test_describe_mail_server_domain_result.py new file mode 100644 index 00000000..53e5ae54 --- /dev/null +++ b/test/test_describe_mail_server_domain_result.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.describe_mail_server_domain_result import DescribeMailServerDomainResult # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestDescribeMailServerDomainResult(unittest.TestCase): + """DescribeMailServerDomainResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test DescribeMailServerDomainResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.describe_mail_server_domain_result.DescribeMailServerDomainResult() # noqa: E501 + if include_optional : + return DescribeMailServerDomainResult( + mx_records = [ + mailslurp_client.models.name_server_record.NameServerRecord( + raw = '0', + record_type = '0', + priority = '0', + value = '0', ) + ], + domain = '0', + message = '0' + ) + else : + return DescribeMailServerDomainResult( + mx_records = [ + mailslurp_client.models.name_server_record.NameServerRecord( + raw = '0', + record_type = '0', + priority = '0', + value = '0', ) + ], + domain = '0', + ) + + def testDescribeMailServerDomainResult(self): + """Test DescribeMailServerDomainResult""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dns_lookup_options.py b/test/test_dns_lookup_options.py new file mode 100644 index 00000000..77287656 --- /dev/null +++ b/test/test_dns_lookup_options.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.dns_lookup_options import DNSLookupOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestDNSLookupOptions(unittest.TestCase): + """DNSLookupOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test DNSLookupOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.dns_lookup_options.DNSLookupOptions() # noqa: E501 + if include_optional : + return DNSLookupOptions( + hostname = '0', + record_types = [ + 'A' + ], + omit_final_dns_dot = True + ) + else : + return DNSLookupOptions( + hostname = '0', + record_types = [ + 'A' + ], + omit_final_dns_dot = True, + ) + + def testDNSLookupOptions(self): + """Test DNSLookupOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dns_lookup_result.py b/test/test_dns_lookup_result.py new file mode 100644 index 00000000..f766ca6f --- /dev/null +++ b/test/test_dns_lookup_result.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.dns_lookup_result import DNSLookupResult # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestDNSLookupResult(unittest.TestCase): + """DNSLookupResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test DNSLookupResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.dns_lookup_result.DNSLookupResult() # noqa: E501 + if include_optional : + return DNSLookupResult( + record_type = 'A', + ttl = 56, + record_entries = [ + '0' + ], + name = '0' + ) + else : + return DNSLookupResult( + record_type = 'A', + ttl = 56, + record_entries = [ + '0' + ], + name = '0', + ) + + def testDNSLookupResult(self): + """Test DNSLookupResult""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dns_lookup_results.py b/test/test_dns_lookup_results.py new file mode 100644 index 00000000..7e899f75 --- /dev/null +++ b/test/test_dns_lookup_results.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.dns_lookup_results import DNSLookupResults # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestDNSLookupResults(unittest.TestCase): + """DNSLookupResults unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test DNSLookupResults + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.dns_lookup_results.DNSLookupResults() # noqa: E501 + if include_optional : + return DNSLookupResults( + results = [ + mailslurp_client.models.dns_lookup_result.DNSLookupResult( + record_type = 'A', + ttl = 56, + record_entries = [ + '0' + ], + name = '0', ) + ] + ) + else : + return DNSLookupResults( + results = [ + mailslurp_client.models.dns_lookup_result.DNSLookupResult( + record_type = 'A', + ttl = 56, + record_entries = [ + '0' + ], + name = '0', ) + ], + ) + + def testDNSLookupResults(self): + """Test DNSLookupResults""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_controller_api.py b/test/test_domain_controller_api.py new file mode 100644 index 00000000..21075467 --- /dev/null +++ b/test/test_domain_controller_api.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import mailslurp_client +from mailslurp_client.api.domain_controller_api import DomainControllerApi # noqa: E501 +from mailslurp_client.rest import ApiException + + +class TestDomainControllerApi(unittest.TestCase): + """DomainControllerApi unit test stubs""" + + def setUp(self): + self.api = mailslurp_client.api.domain_controller_api.DomainControllerApi() # noqa: E501 + + def tearDown(self): + pass + + def test_add_domain_wildcard_catch_all(self): + """Test case for add_domain_wildcard_catch_all + + Add catch all wild card inbox to domain # noqa: E501 + """ + pass + + def test_create_domain(self): + """Test case for create_domain + + Create Domain # noqa: E501 + """ + pass + + def test_delete_domain(self): + """Test case for delete_domain + + Delete a domain # noqa: E501 + """ + pass + + def test_get_domain(self): + """Test case for get_domain + + Get a domain # noqa: E501 + """ + pass + + def test_get_domains(self): + """Test case for get_domains + + Get domains # noqa: E501 + """ + pass + + def test_update_domain(self): + """Test case for update_domain + + Update a domain # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_dto.py b/test/test_domain_dto.py new file mode 100644 index 00000000..f689ef5b --- /dev/null +++ b/test/test_domain_dto.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.domain_dto import DomainDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestDomainDto(unittest.TestCase): + """DomainDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test DomainDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.domain_dto.DomainDto() # noqa: E501 + if include_optional : + return DomainDto( + id = '0', + user_id = '0', + domain = '0', + verification_token = '0', + dkim_tokens = [ + '0' + ], + is_verified = True, + domain_name_records = [ + mailslurp_client.models.domain_name_record.DomainNameRecord( + record_type = 'A', + name = '0', + record_entries = [ + '0' + ], + ttl = 56, ) + ], + catch_all_inbox_id = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + domain_type = 'HTTP_INBOX' + ) + else : + return DomainDto( + id = '0', + user_id = '0', + domain = '0', + verification_token = '0', + dkim_tokens = [ + '0' + ], + is_verified = True, + domain_name_records = [ + mailslurp_client.models.domain_name_record.DomainNameRecord( + record_type = 'A', + name = '0', + record_entries = [ + '0' + ], + ttl = 56, ) + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + domain_type = 'HTTP_INBOX', + ) + + def testDomainDto(self): + """Test DomainDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_name_record.py b/test/test_domain_name_record.py new file mode 100644 index 00000000..a1b7af82 --- /dev/null +++ b/test/test_domain_name_record.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.domain_name_record import DomainNameRecord # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestDomainNameRecord(unittest.TestCase): + """DomainNameRecord unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test DomainNameRecord + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.domain_name_record.DomainNameRecord() # noqa: E501 + if include_optional : + return DomainNameRecord( + record_type = 'A', + name = '0', + record_entries = [ + '0' + ], + ttl = 56 + ) + else : + return DomainNameRecord( + record_type = 'A', + name = '0', + record_entries = [ + '0' + ], + ttl = 56, + ) + + def testDomainNameRecord(self): + """Test DomainNameRecord""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_preview.py b/test/test_domain_preview.py new file mode 100644 index 00000000..317aac84 --- /dev/null +++ b/test/test_domain_preview.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.domain_preview import DomainPreview # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestDomainPreview(unittest.TestCase): + """DomainPreview unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test DomainPreview + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.domain_preview.DomainPreview() # noqa: E501 + if include_optional : + return DomainPreview( + id = '0', + domain = '0', + catch_all_inbox_id = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + domain_type = 'HTTP_INBOX', + is_verified = True + ) + else : + return DomainPreview( + id = '0', + domain = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + domain_type = 'HTTP_INBOX', + is_verified = True, + ) + + def testDomainPreview(self): + """Test DomainPreview""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_download_attachment_dto.py b/test/test_download_attachment_dto.py new file mode 100644 index 00000000..64f37054 --- /dev/null +++ b/test/test_download_attachment_dto.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.download_attachment_dto import DownloadAttachmentDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestDownloadAttachmentDto(unittest.TestCase): + """DownloadAttachmentDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test DownloadAttachmentDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.download_attachment_dto.DownloadAttachmentDto() # noqa: E501 + if include_optional : + return DownloadAttachmentDto( + base64_file_contents = '0', + content_type = '0', + size_bytes = 56 + ) + else : + return DownloadAttachmentDto( + base64_file_contents = '0', + content_type = '0', + size_bytes = 56, + ) + + def testDownloadAttachmentDto(self): + """Test DownloadAttachmentDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_email.py b/test/test_email.py new file mode 100644 index 00000000..42dbb9d5 --- /dev/null +++ b/test/test_email.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.email import Email # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestEmail(unittest.TestCase): + """Email unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test Email + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.email.Email() # noqa: E501 + if include_optional : + return Email( + id = '0', + user_id = '0', + inbox_id = '0', + domain_id = '0', + to = [ + '0' + ], + _from = '0', + sender = mailslurp_client.models.sender.Sender( + raw_value = '0', + email_address = '0', + name = '0', ), + recipients = mailslurp_client.models.email_recipients.EmailRecipients( + to = [ + mailslurp_client.models.recipient.Recipient( + raw_value = '0', + email_address = '0', + name = '0', ) + ], + cc = [ + mailslurp_client.models.recipient.Recipient( + raw_value = '0', + email_address = '0', + name = '0', ) + ], + bcc = [ + mailslurp_client.models.recipient.Recipient( + raw_value = '0', + email_address = '0', + name = '0', ) + ], ), + reply_to = '0', + cc = [ + '0' + ], + bcc = [ + '0' + ], + headers = { + 'key' : '0' + }, + attachments = [ + '0' + ], + subject = '0', + body = '0', + body_excerpt = '0', + body_md5_hash = '0', + is_html = True, + charset = '0', + analysis = mailslurp_client.models.email_analysis.EmailAnalysis( + spam_verdict = '0', + virus_verdict = '0', + spf_verdict = '0', + dkim_verdict = '0', + dmarc_verdict = '0', ), + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + read = True, + team_access = True, + html = True + ) + else : + return Email( + id = '0', + user_id = '0', + inbox_id = '0', + to = [ + '0' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + read = True, + team_access = True, + ) + + def testEmail(self): + """Test Email""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_email_analysis.py b/test/test_email_analysis.py new file mode 100644 index 00000000..a6ce05e2 --- /dev/null +++ b/test/test_email_analysis.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.email_analysis import EmailAnalysis # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestEmailAnalysis(unittest.TestCase): + """EmailAnalysis unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test EmailAnalysis + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.email_analysis.EmailAnalysis() # noqa: E501 + if include_optional : + return EmailAnalysis( + spam_verdict = '0', + virus_verdict = '0', + spf_verdict = '0', + dkim_verdict = '0', + dmarc_verdict = '0' + ) + else : + return EmailAnalysis( + ) + + def testEmailAnalysis(self): + """Test EmailAnalysis""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_email_content_match_result.py b/test/test_email_content_match_result.py new file mode 100644 index 00000000..39b372a2 --- /dev/null +++ b/test/test_email_content_match_result.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.email_content_match_result import EmailContentMatchResult # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestEmailContentMatchResult(unittest.TestCase): + """EmailContentMatchResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test EmailContentMatchResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.email_content_match_result.EmailContentMatchResult() # noqa: E501 + if include_optional : + return EmailContentMatchResult( + pattern = '0', + matches = [ + '0' + ] + ) + else : + return EmailContentMatchResult( + pattern = '0', + matches = [ + '0' + ], + ) + + def testEmailContentMatchResult(self): + """Test EmailContentMatchResult""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_email_controller_api.py b/test/test_email_controller_api.py new file mode 100644 index 00000000..ea2038e9 --- /dev/null +++ b/test/test_email_controller_api.py @@ -0,0 +1,250 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import mailslurp_client +from mailslurp_client.api.email_controller_api import EmailControllerApi # noqa: E501 +from mailslurp_client.rest import ApiException + + +class TestEmailControllerApi(unittest.TestCase): + """EmailControllerApi unit test stubs""" + + def setUp(self): + self.api = mailslurp_client.api.email_controller_api.EmailControllerApi() # noqa: E501 + + def tearDown(self): + pass + + def test_apply_imap_flag_operation(self): + """Test case for apply_imap_flag_operation + + Set IMAP flags associated with a message. Only supports '\\Seen' flag. # noqa: E501 + """ + pass + + def test_delete_all_emails(self): + """Test case for delete_all_emails + + Delete all emails in all inboxes. # noqa: E501 + """ + pass + + def test_delete_email(self): + """Test case for delete_email + + Delete an email # noqa: E501 + """ + pass + + def test_download_attachment(self): + """Test case for download_attachment + + Get email attachment bytes. Returned as `octet-stream` with content type header. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints and convert the base 64 encoded content to a file or string. # noqa: E501 + """ + pass + + def test_download_attachment_base64(self): + """Test case for download_attachment_base64 + + Get email attachment as base64 encoded string as an alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`. # noqa: E501 + """ + pass + + def test_download_body(self): + """Test case for download_body + + Get email body as string. Returned as `plain/text` with content type header. # noqa: E501 + """ + pass + + def test_download_body_bytes(self): + """Test case for download_body_bytes + + Get email body in bytes. Returned as `octet-stream` with content type header. # noqa: E501 + """ + pass + + def test_forward_email(self): + """Test case for forward_email + + Forward email to recipients # noqa: E501 + """ + pass + + def test_get_attachment_meta_data(self): + """Test case for get_attachment_meta_data + + Get email attachment metadata. This is the `contentType` and `contentLength` of an attachment. To get the individual attachments use the `downloadAttachment` methods. # noqa: E501 + """ + pass + + def test_get_email(self): + """Test case for get_email + + Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController. # noqa: E501 + """ + pass + + def test_get_email_attachments(self): + """Test case for get_email_attachments + + Get all email attachment metadata. Metadata includes name and size of attachments. # noqa: E501 + """ + pass + + def test_get_email_content_match(self): + """Test case for get_email_content_match + + Get email content regex pattern match results. Runs regex against email body and returns match groups. # noqa: E501 + """ + pass + + def test_get_email_count(self): + """Test case for get_email_count + + Get email count # noqa: E501 + """ + pass + + def test_get_email_html(self): + """Test case for get_email_html + + Get email content as HTML. For displaying emails in browser context. # noqa: E501 + """ + pass + + def test_get_email_html_json(self): + """Test case for get_email_html_json + + Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content # noqa: E501 + """ + pass + + def test_get_email_html_query(self): + """Test case for get_email_html_query + + Parse and return text from an email, stripping HTML and decoding encoded characters # noqa: E501 + """ + pass + + def test_get_email_links(self): + """Test case for get_email_links + + Parse and return list of links found in an email (only works for HTML content) # noqa: E501 + """ + pass + + def test_get_email_preview_ur_ls(self): + """Test case for get_email_preview_ur_ls + + Get email URLs for viewing in browser or downloading # noqa: E501 + """ + pass + + def test_get_email_text_lines(self): + """Test case for get_email_text_lines + + Parse and return text from an email, stripping HTML and decoding encoded characters # noqa: E501 + """ + pass + + def test_get_emails_paginated(self): + """Test case for get_emails_paginated + + Get all emails in all inboxes in paginated form. Email API list all. # noqa: E501 + """ + pass + + def test_get_gravatar_url_for_email_address(self): + """Test case for get_gravatar_url_for_email_address + + """ + pass + + def test_get_latest_email(self): + """Test case for get_latest_email + + Get latest email in all inboxes. Most recently received. # noqa: E501 + """ + pass + + def test_get_latest_email_in_inbox1(self): + """Test case for get_latest_email_in_inbox1 + + Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. # noqa: E501 + """ + pass + + def test_get_organization_emails_paginated(self): + """Test case for get_organization_emails_paginated + + Get all organization emails. List team or shared test email accounts # noqa: E501 + """ + pass + + def test_get_raw_email_contents(self): + """Test case for get_raw_email_contents + + Get raw email string. Returns unparsed raw SMTP message with headers and body. # noqa: E501 + """ + pass + + def test_get_raw_email_json(self): + """Test case for get_raw_email_json + + Get raw email in JSON. Unparsed SMTP message in JSON wrapper format. # noqa: E501 + """ + pass + + def test_get_unread_email_count(self): + """Test case for get_unread_email_count + + Get unread email count # noqa: E501 + """ + pass + + def test_mark_as_read(self): + """Test case for mark_as_read + + Mark an email as read on unread # noqa: E501 + """ + pass + + def test_reply_to_email(self): + """Test case for reply_to_email + + Reply to an email # noqa: E501 + """ + pass + + def test_send_email_source_optional(self): + """Test case for send_email_source_optional + + Send email # noqa: E501 + """ + pass + + def test_validate_email(self): + """Test case for validate_email + + Validate email HTML contents # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_email_html_dto.py b/test/test_email_html_dto.py new file mode 100644 index 00000000..92e5827b --- /dev/null +++ b/test/test_email_html_dto.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.email_html_dto import EmailHtmlDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestEmailHtmlDto(unittest.TestCase): + """EmailHtmlDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test EmailHtmlDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.email_html_dto.EmailHtmlDto() # noqa: E501 + if include_optional : + return EmailHtmlDto( + subject = '0', + body = '0' + ) + else : + return EmailHtmlDto( + ) + + def testEmailHtmlDto(self): + """Test EmailHtmlDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_email_links_result.py b/test/test_email_links_result.py new file mode 100644 index 00000000..d1a7efe3 --- /dev/null +++ b/test/test_email_links_result.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.email_links_result import EmailLinksResult # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestEmailLinksResult(unittest.TestCase): + """EmailLinksResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test EmailLinksResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.email_links_result.EmailLinksResult() # noqa: E501 + if include_optional : + return EmailLinksResult( + links = [ + '0' + ], + body = '0' + ) + else : + return EmailLinksResult( + links = [ + '0' + ], + body = '0', + ) + + def testEmailLinksResult(self): + """Test EmailLinksResult""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_email_preview.py b/test/test_email_preview.py new file mode 100644 index 00000000..6280ec8d --- /dev/null +++ b/test/test_email_preview.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.email_preview import EmailPreview # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestEmailPreview(unittest.TestCase): + """EmailPreview unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test EmailPreview + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.email_preview.EmailPreview() # noqa: E501 + if include_optional : + return EmailPreview( + id = '0', + domain_id = '0', + subject = '0', + to = [ + '0' + ], + _from = '0', + bcc = [ + '0' + ], + cc = [ + '0' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + read = True, + attachments = [ + '0' + ] + ) + else : + return EmailPreview( + id = '0', + to = [ + '0' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + read = True, + ) + + def testEmailPreview(self): + """Test EmailPreview""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_email_preview_urls.py b/test/test_email_preview_urls.py new file mode 100644 index 00000000..fc6ab949 --- /dev/null +++ b/test/test_email_preview_urls.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.email_preview_urls import EmailPreviewUrls # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestEmailPreviewUrls(unittest.TestCase): + """EmailPreviewUrls unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test EmailPreviewUrls + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.email_preview_urls.EmailPreviewUrls() # noqa: E501 + if include_optional : + return EmailPreviewUrls( + raw_smtp_message_url = '0', + plain_html_body_url = '0' + ) + else : + return EmailPreviewUrls( + raw_smtp_message_url = '0', + plain_html_body_url = '0', + ) + + def testEmailPreviewUrls(self): + """Test EmailPreviewUrls""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_email_projection.py b/test/test_email_projection.py new file mode 100644 index 00000000..2b0d40f3 --- /dev/null +++ b/test/test_email_projection.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.email_projection import EmailProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestEmailProjection(unittest.TestCase): + """EmailProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test EmailProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.email_projection.EmailProjection() # noqa: E501 + if include_optional : + return EmailProjection( + id = '0', + _from = '0', + subject = '0', + inbox_id = '0', + attachments = [ + '0' + ], + to = [ + '0' + ], + bcc = [ + '0' + ], + cc = [ + '0' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + domain_id = '0', + read = True, + team_access = True, + body_md5_hash = '0', + body_excerpt = '0' + ) + else : + return EmailProjection( + id = '0', + inbox_id = '0', + to = [ + '0' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + read = True, + team_access = True, + ) + + def testEmailProjection(self): + """Test EmailProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_email_recipients.py b/test/test_email_recipients.py new file mode 100644 index 00000000..f62bdb07 --- /dev/null +++ b/test/test_email_recipients.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.email_recipients import EmailRecipients # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestEmailRecipients(unittest.TestCase): + """EmailRecipients unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test EmailRecipients + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.email_recipients.EmailRecipients() # noqa: E501 + if include_optional : + return EmailRecipients( + to = [ + mailslurp_client.models.recipient.Recipient( + raw_value = '0', + email_address = '0', + name = '0', ) + ], + cc = [ + mailslurp_client.models.recipient.Recipient( + raw_value = '0', + email_address = '0', + name = '0', ) + ], + bcc = [ + mailslurp_client.models.recipient.Recipient( + raw_value = '0', + email_address = '0', + name = '0', ) + ] + ) + else : + return EmailRecipients( + ) + + def testEmailRecipients(self): + """Test EmailRecipients""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_email_text_lines_result.py b/test/test_email_text_lines_result.py new file mode 100644 index 00000000..f373ac6d --- /dev/null +++ b/test/test_email_text_lines_result.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.email_text_lines_result import EmailTextLinesResult # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestEmailTextLinesResult(unittest.TestCase): + """EmailTextLinesResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test EmailTextLinesResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.email_text_lines_result.EmailTextLinesResult() # noqa: E501 + if include_optional : + return EmailTextLinesResult( + lines = [ + '0' + ], + body = '0' + ) + else : + return EmailTextLinesResult( + lines = [ + '0' + ], + body = '0', + ) + + def testEmailTextLinesResult(self): + """Test EmailTextLinesResult""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_email_validation_request.py b/test/test_email_validation_request.py new file mode 100644 index 00000000..fc2b7184 --- /dev/null +++ b/test/test_email_validation_request.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.email_validation_request import EmailValidationRequest # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestEmailValidationRequest(unittest.TestCase): + """EmailValidationRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test EmailValidationRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.email_validation_request.EmailValidationRequest() # noqa: E501 + if include_optional : + return EmailValidationRequest( + id = '0', + user_id = '0', + email_address = '0', + is_valid = True, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return EmailValidationRequest( + user_id = '0', + email_address = '0', + is_valid = True, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testEmailValidationRequest(self): + """Test EmailValidationRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_email_verification_controller_api.py b/test/test_email_verification_controller_api.py new file mode 100644 index 00000000..3ab63710 --- /dev/null +++ b/test/test_email_verification_controller_api.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import mailslurp_client +from mailslurp_client.api.email_verification_controller_api import EmailVerificationControllerApi # noqa: E501 +from mailslurp_client.rest import ApiException + + +class TestEmailVerificationControllerApi(unittest.TestCase): + """EmailVerificationControllerApi unit test stubs""" + + def setUp(self): + self.api = mailslurp_client.api.email_verification_controller_api.EmailVerificationControllerApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_validation_requests(self): + """Test case for get_validation_requests + + Validate a list of email addresses. Per unit billing. See your plan for pricing. # noqa: E501 + """ + pass + + def test_validate_email_address_list(self): + """Test case for validate_email_address_list + + Validate a list of email addresses. Per unit billing. See your plan for pricing. # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_email_verification_result.py b/test/test_email_verification_result.py new file mode 100644 index 00000000..28e24d90 --- /dev/null +++ b/test/test_email_verification_result.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.email_verification_result import EmailVerificationResult # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestEmailVerificationResult(unittest.TestCase): + """EmailVerificationResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test EmailVerificationResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.email_verification_result.EmailVerificationResult() # noqa: E501 + if include_optional : + return EmailVerificationResult( + domain_name = '0', + port = 56, + email_address = '0', + is_valid = True, + error = '0' + ) + else : + return EmailVerificationResult( + domain_name = '0', + port = 56, + email_address = '0', + is_valid = True, + ) + + def testEmailVerificationResult(self): + """Test EmailVerificationResult""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_emergency_address.py b/test/test_emergency_address.py new file mode 100644 index 00000000..ad793a29 --- /dev/null +++ b/test/test_emergency_address.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.emergency_address import EmergencyAddress # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestEmergencyAddress(unittest.TestCase): + """EmergencyAddress unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test EmergencyAddress + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.emergency_address.EmergencyAddress() # noqa: E501 + if include_optional : + return EmergencyAddress( + id = '0', + sid = '0', + user_id = '0', + display_name = '0', + customer_name = '0', + address1 = '0', + city = '0', + region = '0', + postal_code = '0', + phone_country = 'US', + account_sid = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return EmergencyAddress( + sid = '0', + user_id = '0', + display_name = '0', + customer_name = '0', + address1 = '0', + city = '0', + region = '0', + postal_code = '0', + phone_country = 'US', + account_sid = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testEmergencyAddress(self): + """Test EmergencyAddress""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_emergency_address_dto.py b/test/test_emergency_address_dto.py new file mode 100644 index 00000000..5afb78e2 --- /dev/null +++ b/test/test_emergency_address_dto.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.emergency_address_dto import EmergencyAddressDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestEmergencyAddressDto(unittest.TestCase): + """EmergencyAddressDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test EmergencyAddressDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.emergency_address_dto.EmergencyAddressDto() # noqa: E501 + if include_optional : + return EmergencyAddressDto( + id = '0', + address1 = '0', + phone_country = 'US' + ) + else : + return EmergencyAddressDto( + id = '0', + address1 = '0', + phone_country = 'US', + ) + + def testEmergencyAddressDto(self): + """Test EmergencyAddressDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_empty_response_dto.py b/test/test_empty_response_dto.py new file mode 100644 index 00000000..d5fab89b --- /dev/null +++ b/test/test_empty_response_dto.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.empty_response_dto import EmptyResponseDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestEmptyResponseDto(unittest.TestCase): + """EmptyResponseDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test EmptyResponseDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.empty_response_dto.EmptyResponseDto() # noqa: E501 + if include_optional : + return EmptyResponseDto( + message = '0' + ) + else : + return EmptyResponseDto( + ) + + def testEmptyResponseDto(self): + """Test EmptyResponseDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_expiration_defaults.py b/test/test_expiration_defaults.py new file mode 100644 index 00000000..bb368b96 --- /dev/null +++ b/test/test_expiration_defaults.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.expiration_defaults import ExpirationDefaults # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestExpirationDefaults(unittest.TestCase): + """ExpirationDefaults unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ExpirationDefaults + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.expiration_defaults.ExpirationDefaults() # noqa: E501 + if include_optional : + return ExpirationDefaults( + default_expiration_millis = 56, + max_expiration_millis = 56, + default_expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + can_permanent_inbox = True, + next_inbox_allows_permanent = True + ) + else : + return ExpirationDefaults( + can_permanent_inbox = True, + next_inbox_allows_permanent = True, + ) + + def testExpirationDefaults(self): + """Test ExpirationDefaults""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_expired_controller_api.py b/test/test_expired_controller_api.py new file mode 100644 index 00000000..dd27df8e --- /dev/null +++ b/test/test_expired_controller_api.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import mailslurp_client +from mailslurp_client.api.expired_controller_api import ExpiredControllerApi # noqa: E501 +from mailslurp_client.rest import ApiException + + +class TestExpiredControllerApi(unittest.TestCase): + """ExpiredControllerApi unit test stubs""" + + def setUp(self): + self.api = mailslurp_client.api.expired_controller_api.ExpiredControllerApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_expiration_defaults(self): + """Test case for get_expiration_defaults + + Get default expiration settings # noqa: E501 + """ + pass + + def test_get_expired_inbox_by_inbox_id(self): + """Test case for get_expired_inbox_by_inbox_id + + Get expired inbox record for a previously existing inbox # noqa: E501 + """ + pass + + def test_get_expired_inbox_record(self): + """Test case for get_expired_inbox_record + + Get an expired inbox record # noqa: E501 + """ + pass + + def test_get_expired_inboxes(self): + """Test case for get_expired_inboxes + + List records of expired inboxes # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_expired_inbox_dto.py b/test/test_expired_inbox_dto.py new file mode 100644 index 00000000..d578b950 --- /dev/null +++ b/test/test_expired_inbox_dto.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.expired_inbox_dto import ExpiredInboxDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestExpiredInboxDto(unittest.TestCase): + """ExpiredInboxDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ExpiredInboxDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.expired_inbox_dto.ExpiredInboxDto() # noqa: E501 + if include_optional : + return ExpiredInboxDto( + id = '0', + inbox_id = '0', + email_address = '0' + ) + else : + return ExpiredInboxDto( + id = '0', + inbox_id = '0', + email_address = '0', + ) + + def testExpiredInboxDto(self): + """Test ExpiredInboxDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_expired_inbox_record_projection.py b/test/test_expired_inbox_record_projection.py new file mode 100644 index 00000000..02e35528 --- /dev/null +++ b/test/test_expired_inbox_record_projection.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.expired_inbox_record_projection import ExpiredInboxRecordProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestExpiredInboxRecordProjection(unittest.TestCase): + """ExpiredInboxRecordProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ExpiredInboxRecordProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.expired_inbox_record_projection.ExpiredInboxRecordProjection() # noqa: E501 + if include_optional : + return ExpiredInboxRecordProjection( + id = '0', + user_id = '0', + email_address = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return ExpiredInboxRecordProjection( + id = '0', + user_id = '0', + email_address = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testExpiredInboxRecordProjection(self): + """Test ExpiredInboxRecordProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_export_controller_api.py b/test/test_export_controller_api.py new file mode 100644 index 00000000..7987da5e --- /dev/null +++ b/test/test_export_controller_api.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import mailslurp_client +from mailslurp_client.api.export_controller_api import ExportControllerApi # noqa: E501 +from mailslurp_client.rest import ApiException + + +class TestExportControllerApi(unittest.TestCase): + """ExportControllerApi unit test stubs""" + + def setUp(self): + self.api = mailslurp_client.api.export_controller_api.ExportControllerApi() # noqa: E501 + + def tearDown(self): + pass + + def test_export_entities(self): + """Test case for export_entities + + Export inboxes link callable via browser # noqa: E501 + """ + pass + + def test_get_export_link(self): + """Test case for get_export_link + + Get export link # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_export_link.py b/test/test_export_link.py new file mode 100644 index 00000000..ac47a10d --- /dev/null +++ b/test/test_export_link.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.export_link import ExportLink # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestExportLink(unittest.TestCase): + """ExportLink unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ExportLink + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.export_link.ExportLink() # noqa: E501 + if include_optional : + return ExportLink( + download_link = '0' + ) + else : + return ExportLink( + download_link = '0', + ) + + def testExportLink(self): + """Test ExportLink""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_export_options.py b/test/test_export_options.py new file mode 100644 index 00000000..6c238a1d --- /dev/null +++ b/test/test_export_options.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.export_options import ExportOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestExportOptions(unittest.TestCase): + """ExportOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ExportOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.export_options.ExportOptions() # noqa: E501 + if include_optional : + return ExportOptions( + output_format = 'CSV_DEFAULT', + exclude_previously_exported = True, + created_earliest_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + created_oldest_time = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + filter = '0', + list_separator_token = '0' + ) + else : + return ExportOptions( + output_format = 'CSV_DEFAULT', + ) + + def testExportOptions(self): + """Test ExportOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_filter_bounced_recipients_options.py b/test/test_filter_bounced_recipients_options.py new file mode 100644 index 00000000..0415a500 --- /dev/null +++ b/test/test_filter_bounced_recipients_options.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.filter_bounced_recipients_options import FilterBouncedRecipientsOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestFilterBouncedRecipientsOptions(unittest.TestCase): + """FilterBouncedRecipientsOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test FilterBouncedRecipientsOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.filter_bounced_recipients_options.FilterBouncedRecipientsOptions() # noqa: E501 + if include_optional : + return FilterBouncedRecipientsOptions( + email_recipients = [ + '0' + ] + ) + else : + return FilterBouncedRecipientsOptions( + email_recipients = [ + '0' + ], + ) + + def testFilterBouncedRecipientsOptions(self): + """Test FilterBouncedRecipientsOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_filter_bounced_recipients_result.py b/test/test_filter_bounced_recipients_result.py new file mode 100644 index 00000000..4cfc235b --- /dev/null +++ b/test/test_filter_bounced_recipients_result.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.filter_bounced_recipients_result import FilterBouncedRecipientsResult # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestFilterBouncedRecipientsResult(unittest.TestCase): + """FilterBouncedRecipientsResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test FilterBouncedRecipientsResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.filter_bounced_recipients_result.FilterBouncedRecipientsResult() # noqa: E501 + if include_optional : + return FilterBouncedRecipientsResult( + filtered_recipients = [ + '0' + ] + ) + else : + return FilterBouncedRecipientsResult( + filtered_recipients = [ + '0' + ], + ) + + def testFilterBouncedRecipientsResult(self): + """Test FilterBouncedRecipientsResult""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_flush_expired_inboxes_result.py b/test/test_flush_expired_inboxes_result.py new file mode 100644 index 00000000..a31e98b2 --- /dev/null +++ b/test/test_flush_expired_inboxes_result.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.flush_expired_inboxes_result import FlushExpiredInboxesResult # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestFlushExpiredInboxesResult(unittest.TestCase): + """FlushExpiredInboxesResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test FlushExpiredInboxesResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.flush_expired_inboxes_result.FlushExpiredInboxesResult() # noqa: E501 + if include_optional : + return FlushExpiredInboxesResult( + inbox_ids = [ + '0' + ], + expire_before = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return FlushExpiredInboxesResult( + inbox_ids = [ + '0' + ], + expire_before = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testFlushExpiredInboxesResult(self): + """Test FlushExpiredInboxesResult""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_form_controller_api.py b/test/test_form_controller_api.py new file mode 100644 index 00000000..97c169f8 --- /dev/null +++ b/test/test_form_controller_api.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import mailslurp_client +from mailslurp_client.api.form_controller_api import FormControllerApi # noqa: E501 +from mailslurp_client.rest import ApiException + + +class TestFormControllerApi(unittest.TestCase): + """FormControllerApi unit test stubs""" + + def setUp(self): + self.api = mailslurp_client.api.form_controller_api.FormControllerApi() # noqa: E501 + + def tearDown(self): + pass + + def test_submit_form(self): + """Test case for submit_form + + Submit a form to be parsed and sent as an email to an address determined by the form fields # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_forward_email_options.py b/test/test_forward_email_options.py new file mode 100644 index 00000000..9908b981 --- /dev/null +++ b/test/test_forward_email_options.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.forward_email_options import ForwardEmailOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestForwardEmailOptions(unittest.TestCase): + """ForwardEmailOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ForwardEmailOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.forward_email_options.ForwardEmailOptions() # noqa: E501 + if include_optional : + return ForwardEmailOptions( + to = [ + '0' + ], + subject = '0', + cc = [ + '0' + ], + bcc = [ + '0' + ], + _from = '0', + use_inbox_name = True + ) + else : + return ForwardEmailOptions( + to = [ + '0' + ], + ) + + def testForwardEmailOptions(self): + """Test ForwardEmailOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_gravatar_url.py b/test/test_gravatar_url.py new file mode 100644 index 00000000..8b617286 --- /dev/null +++ b/test/test_gravatar_url.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.gravatar_url import GravatarUrl # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestGravatarUrl(unittest.TestCase): + """GravatarUrl unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test GravatarUrl + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.gravatar_url.GravatarUrl() # noqa: E501 + if include_optional : + return GravatarUrl( + url = '0', + hash = '0' + ) + else : + return GravatarUrl( + url = '0', + hash = '0', + ) + + def testGravatarUrl(self): + """Test GravatarUrl""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_contacts_dto.py b/test/test_group_contacts_dto.py new file mode 100644 index 00000000..70d27086 --- /dev/null +++ b/test/test_group_contacts_dto.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.group_contacts_dto import GroupContactsDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestGroupContactsDto(unittest.TestCase): + """GroupContactsDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test GroupContactsDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.group_contacts_dto.GroupContactsDto() # noqa: E501 + if include_optional : + return GroupContactsDto( + group = mailslurp_client.models.group_dto.GroupDto( + id = '0', + name = '0', + description = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), + contacts = [ + mailslurp_client.models.contact_dto.ContactDto( + id = '0', + group_id = '0', + first_name = '0', + last_name = '0', + company = '0', + email_addresses = [ + '0' + ], + primary_email_address = '0', + tags = [ + '0' + ], + meta_data = mailslurp_client.models.meta_data.metaData(), + opt_out = True, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ] + ) + else : + return GroupContactsDto( + group = mailslurp_client.models.group_dto.GroupDto( + id = '0', + name = '0', + description = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ), + contacts = [ + mailslurp_client.models.contact_dto.ContactDto( + id = '0', + group_id = '0', + first_name = '0', + last_name = '0', + company = '0', + email_addresses = [ + '0' + ], + primary_email_address = '0', + tags = [ + '0' + ], + meta_data = mailslurp_client.models.meta_data.metaData(), + opt_out = True, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + ) + + def testGroupContactsDto(self): + """Test GroupContactsDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_controller_api.py b/test/test_group_controller_api.py new file mode 100644 index 00000000..b55c7cbf --- /dev/null +++ b/test/test_group_controller_api.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import mailslurp_client +from mailslurp_client.api.group_controller_api import GroupControllerApi # noqa: E501 +from mailslurp_client.rest import ApiException + + +class TestGroupControllerApi(unittest.TestCase): + """GroupControllerApi unit test stubs""" + + def setUp(self): + self.api = mailslurp_client.api.group_controller_api.GroupControllerApi() # noqa: E501 + + def tearDown(self): + pass + + def test_add_contacts_to_group(self): + """Test case for add_contacts_to_group + + Add contacts to a group # noqa: E501 + """ + pass + + def test_create_group(self): + """Test case for create_group + + Create a group # noqa: E501 + """ + pass + + def test_delete_group(self): + """Test case for delete_group + + Delete group # noqa: E501 + """ + pass + + def test_get_all_groups(self): + """Test case for get_all_groups + + Get all Contact Groups in paginated format # noqa: E501 + """ + pass + + def test_get_group(self): + """Test case for get_group + + Get group # noqa: E501 + """ + pass + + def test_get_group_with_contacts(self): + """Test case for get_group_with_contacts + + Get group and contacts belonging to it # noqa: E501 + """ + pass + + def test_get_group_with_contacts_paginated(self): + """Test case for get_group_with_contacts_paginated + + """ + pass + + def test_get_groups(self): + """Test case for get_groups + + Get all groups # noqa: E501 + """ + pass + + def test_remove_contacts_from_group(self): + """Test case for remove_contacts_from_group + + Remove contacts from a group # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_dto.py b/test/test_group_dto.py new file mode 100644 index 00000000..2b03f5ce --- /dev/null +++ b/test/test_group_dto.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.group_dto import GroupDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestGroupDto(unittest.TestCase): + """GroupDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test GroupDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.group_dto.GroupDto() # noqa: E501 + if include_optional : + return GroupDto( + id = '0', + name = '0', + description = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return GroupDto( + id = '0', + name = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testGroupDto(self): + """Test GroupDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_group_projection.py b/test/test_group_projection.py new file mode 100644 index 00000000..52ef7a4e --- /dev/null +++ b/test/test_group_projection.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.group_projection import GroupProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestGroupProjection(unittest.TestCase): + """GroupProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test GroupProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.group_projection.GroupProjection() # noqa: E501 + if include_optional : + return GroupProjection( + name = '0', + id = '0', + description = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return GroupProjection( + name = '0', + id = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testGroupProjection(self): + """Test GroupProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_html_validation_result.py b/test/test_html_validation_result.py new file mode 100644 index 00000000..6427c17f --- /dev/null +++ b/test/test_html_validation_result.py @@ -0,0 +1,74 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.html_validation_result import HTMLValidationResult # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestHTMLValidationResult(unittest.TestCase): + """HTMLValidationResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test HTMLValidationResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.html_validation_result.HTMLValidationResult() # noqa: E501 + if include_optional : + return HTMLValidationResult( + is_valid = True, + errors = [ + mailslurp_client.models.validation_message.ValidationMessage( + line_number = 56, + message = '0', ) + ], + warnings = [ + mailslurp_client.models.validation_message.ValidationMessage( + line_number = 56, + message = '0', ) + ] + ) + else : + return HTMLValidationResult( + is_valid = True, + errors = [ + mailslurp_client.models.validation_message.ValidationMessage( + line_number = 56, + message = '0', ) + ], + warnings = [ + mailslurp_client.models.validation_message.ValidationMessage( + line_number = 56, + message = '0', ) + ], + ) + + def testHTMLValidationResult(self): + """Test HTMLValidationResult""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_imap_flag_operation_options.py b/test/test_imap_flag_operation_options.py new file mode 100644 index 00000000..ab9f9df3 --- /dev/null +++ b/test/test_imap_flag_operation_options.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.imap_flag_operation_options import ImapFlagOperationOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestImapFlagOperationOptions(unittest.TestCase): + """ImapFlagOperationOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ImapFlagOperationOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.imap_flag_operation_options.ImapFlagOperationOptions() # noqa: E501 + if include_optional : + return ImapFlagOperationOptions( + flag_operation = 'SET_FLAGS', + flags = [ + '0' + ] + ) + else : + return ImapFlagOperationOptions( + flag_operation = 'SET_FLAGS', + flags = [ + '0' + ], + ) + + def testImapFlagOperationOptions(self): + """Test ImapFlagOperationOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_imap_smtp_access_details.py b/test/test_imap_smtp_access_details.py new file mode 100644 index 00000000..d9643848 --- /dev/null +++ b/test/test_imap_smtp_access_details.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.imap_smtp_access_details import ImapSmtpAccessDetails # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestImapSmtpAccessDetails(unittest.TestCase): + """ImapSmtpAccessDetails unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ImapSmtpAccessDetails + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.imap_smtp_access_details.ImapSmtpAccessDetails() # noqa: E501 + if include_optional : + return ImapSmtpAccessDetails( + smtp_server_host = '0', + smtp_server_port = 56, + smtp_username = '0', + smtp_password = '0', + imap_server_host = '0', + imap_server_port = 56, + imap_username = '0', + imap_password = '0' + ) + else : + return ImapSmtpAccessDetails( + smtp_server_host = '0', + smtp_server_port = 56, + smtp_username = '0', + smtp_password = '0', + imap_server_host = '0', + imap_server_port = 56, + imap_username = '0', + imap_password = '0', + ) + + def testImapSmtpAccessDetails(self): + """Test ImapSmtpAccessDetails""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inbox_by_email_address_result.py b/test/test_inbox_by_email_address_result.py new file mode 100644 index 00000000..d55397a0 --- /dev/null +++ b/test/test_inbox_by_email_address_result.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.inbox_by_email_address_result import InboxByEmailAddressResult # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestInboxByEmailAddressResult(unittest.TestCase): + """InboxByEmailAddressResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test InboxByEmailAddressResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.inbox_by_email_address_result.InboxByEmailAddressResult() # noqa: E501 + if include_optional : + return InboxByEmailAddressResult( + inbox_id = '0', + exists = True + ) + else : + return InboxByEmailAddressResult( + exists = True, + ) + + def testInboxByEmailAddressResult(self): + """Test InboxByEmailAddressResult""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inbox_by_name_result.py b/test/test_inbox_by_name_result.py new file mode 100644 index 00000000..d699996b --- /dev/null +++ b/test/test_inbox_by_name_result.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.inbox_by_name_result import InboxByNameResult # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestInboxByNameResult(unittest.TestCase): + """InboxByNameResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test InboxByNameResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.inbox_by_name_result.InboxByNameResult() # noqa: E501 + if include_optional : + return InboxByNameResult( + inbox_id = '0', + exists = True + ) + else : + return InboxByNameResult( + exists = True, + ) + + def testInboxByNameResult(self): + """Test InboxByNameResult""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inbox_controller_api.py b/test/test_inbox_controller_api.py new file mode 100644 index 00000000..594609d3 --- /dev/null +++ b/test/test_inbox_controller_api.py @@ -0,0 +1,270 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import mailslurp_client +from mailslurp_client.api.inbox_controller_api import InboxControllerApi # noqa: E501 +from mailslurp_client.rest import ApiException + + +class TestInboxControllerApi(unittest.TestCase): + """InboxControllerApi unit test stubs""" + + def setUp(self): + self.api = mailslurp_client.api.inbox_controller_api.InboxControllerApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_inbox(self): + """Test case for create_inbox + + Create an inbox email address. An inbox has a real email address and can send and receive emails. Inboxes can be either `SMTP` or `HTTP` inboxes. # noqa: E501 + """ + pass + + def test_create_inbox_ruleset(self): + """Test case for create_inbox_ruleset + + Create an inbox ruleset # noqa: E501 + """ + pass + + def test_create_inbox_with_defaults(self): + """Test case for create_inbox_with_defaults + + Create an inbox with default options. Uses MailSlurp domain pool address and is private. # noqa: E501 + """ + pass + + def test_create_inbox_with_options(self): + """Test case for create_inbox_with_options + + Create an inbox with options. Extended options for inbox creation. # noqa: E501 + """ + pass + + def test_delete_all_inbox_emails(self): + """Test case for delete_all_inbox_emails + + Delete all emails in a given inboxes. # noqa: E501 + """ + pass + + def test_delete_all_inboxes(self): + """Test case for delete_all_inboxes + + Delete all inboxes # noqa: E501 + """ + pass + + def test_delete_inbox(self): + """Test case for delete_inbox + + Delete inbox # noqa: E501 + """ + pass + + def test_does_inbox_exist(self): + """Test case for does_inbox_exist + + Does inbox exist # noqa: E501 + """ + pass + + def test_flush_expired(self): + """Test case for flush_expired + + Remove expired inboxes # noqa: E501 + """ + pass + + def test_get_all_inboxes(self): + """Test case for get_all_inboxes + + List All Inboxes Paginated # noqa: E501 + """ + pass + + def test_get_delivery_statuses_by_inbox_id(self): + """Test case for get_delivery_statuses_by_inbox_id + + """ + pass + + def test_get_emails(self): + """Test case for get_emails + + Get emails in an Inbox. This method is not idempotent as it allows retries and waits if you want certain conditions to be met before returning. For simple listing and sorting of known emails use the email controller instead. # noqa: E501 + """ + pass + + def test_get_imap_smtp_access(self): + """Test case for get_imap_smtp_access + + """ + pass + + def test_get_inbox(self): + """Test case for get_inbox + + Get Inbox. Returns properties of an inbox. # noqa: E501 + """ + pass + + def test_get_inbox_by_email_address(self): + """Test case for get_inbox_by_email_address + + Search for an inbox with the provided email address # noqa: E501 + """ + pass + + def test_get_inbox_by_name(self): + """Test case for get_inbox_by_name + + Search for an inbox with the given name # noqa: E501 + """ + pass + + def test_get_inbox_count(self): + """Test case for get_inbox_count + + Get total inbox count # noqa: E501 + """ + pass + + def test_get_inbox_email_count(self): + """Test case for get_inbox_email_count + + Get email count in inbox # noqa: E501 + """ + pass + + def test_get_inbox_emails_paginated(self): + """Test case for get_inbox_emails_paginated + + Get inbox emails paginated # noqa: E501 + """ + pass + + def test_get_inbox_ids(self): + """Test case for get_inbox_ids + + Get all inbox IDs # noqa: E501 + """ + pass + + def test_get_inbox_sent_emails(self): + """Test case for get_inbox_sent_emails + + Get Inbox Sent Emails # noqa: E501 + """ + pass + + def test_get_inbox_tags(self): + """Test case for get_inbox_tags + + Get inbox tags # noqa: E501 + """ + pass + + def test_get_inboxes(self): + """Test case for get_inboxes + + List Inboxes and email addresses # noqa: E501 + """ + pass + + def test_get_latest_email_in_inbox(self): + """Test case for get_latest_email_in_inbox + + Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet. # noqa: E501 + """ + pass + + def test_get_organization_inboxes(self): + """Test case for get_organization_inboxes + + List Organization Inboxes Paginated # noqa: E501 + """ + pass + + def test_list_inbox_rulesets(self): + """Test case for list_inbox_rulesets + + List inbox rulesets # noqa: E501 + """ + pass + + def test_list_inbox_tracking_pixels(self): + """Test case for list_inbox_tracking_pixels + + List inbox tracking pixels # noqa: E501 + """ + pass + + def test_send_email(self): + """Test case for send_email + + Send Email # noqa: E501 + """ + pass + + def test_send_email_and_confirm(self): + """Test case for send_email_and_confirm + + Send email and return sent confirmation # noqa: E501 + """ + pass + + def test_send_email_with_queue(self): + """Test case for send_email_with_queue + + Send email with queue # noqa: E501 + """ + pass + + def test_send_smtp_envelope(self): + """Test case for send_smtp_envelope + + Send email using an SMTP mail envelope and message body and return sent confirmation # noqa: E501 + """ + pass + + def test_send_test_email(self): + """Test case for send_test_email + + Send a test email to inbox # noqa: E501 + """ + pass + + def test_set_inbox_favourited(self): + """Test case for set_inbox_favourited + + Set inbox favourited state # noqa: E501 + """ + pass + + def test_update_inbox(self): + """Test case for update_inbox + + Update Inbox. Change name and description. Email address is not editable. # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inbox_dto.py b/test/test_inbox_dto.py new file mode 100644 index 00000000..be0c2625 --- /dev/null +++ b/test/test_inbox_dto.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.inbox_dto import InboxDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestInboxDto(unittest.TestCase): + """InboxDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test InboxDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.inbox_dto.InboxDto() # noqa: E501 + if include_optional : + return InboxDto( + id = '0', + user_id = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + name = '0', + domain_id = '0', + description = '0', + email_address = '0', + expires_at = '0', + favourite = True, + tags = [ + '0' + ], + inbox_type = 'HTTP_INBOX', + read_only = True, + virtual_inbox = True + ) + else : + return InboxDto( + id = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + email_address = '0', + favourite = True, + read_only = True, + virtual_inbox = True, + ) + + def testInboxDto(self): + """Test InboxDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inbox_exists_dto.py b/test/test_inbox_exists_dto.py new file mode 100644 index 00000000..244f5ad4 --- /dev/null +++ b/test/test_inbox_exists_dto.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.inbox_exists_dto import InboxExistsDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestInboxExistsDto(unittest.TestCase): + """InboxExistsDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test InboxExistsDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.inbox_exists_dto.InboxExistsDto() # noqa: E501 + if include_optional : + return InboxExistsDto( + exists = True + ) + else : + return InboxExistsDto( + exists = True, + ) + + def testInboxExistsDto(self): + """Test InboxExistsDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inbox_forwarder_controller_api.py b/test/test_inbox_forwarder_controller_api.py new file mode 100644 index 00000000..7cc6f19e --- /dev/null +++ b/test/test_inbox_forwarder_controller_api.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import mailslurp_client +from mailslurp_client.api.inbox_forwarder_controller_api import InboxForwarderControllerApi # noqa: E501 +from mailslurp_client.rest import ApiException + + +class TestInboxForwarderControllerApi(unittest.TestCase): + """InboxForwarderControllerApi unit test stubs""" + + def setUp(self): + self.api = mailslurp_client.api.inbox_forwarder_controller_api.InboxForwarderControllerApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_new_inbox_forwarder(self): + """Test case for create_new_inbox_forwarder + + Create an inbox forwarder # noqa: E501 + """ + pass + + def test_delete_inbox_forwarder(self): + """Test case for delete_inbox_forwarder + + Delete an inbox forwarder # noqa: E501 + """ + pass + + def test_delete_inbox_forwarders(self): + """Test case for delete_inbox_forwarders + + Delete inbox forwarders # noqa: E501 + """ + pass + + def test_get_inbox_forwarder(self): + """Test case for get_inbox_forwarder + + Get an inbox forwarder # noqa: E501 + """ + pass + + def test_get_inbox_forwarders(self): + """Test case for get_inbox_forwarders + + List inbox forwarders # noqa: E501 + """ + pass + + def test_test_inbox_forwarder(self): + """Test case for test_inbox_forwarder + + Test an inbox forwarder # noqa: E501 + """ + pass + + def test_test_inbox_forwarders_for_inbox(self): + """Test case for test_inbox_forwarders_for_inbox + + Test inbox forwarders for inbox # noqa: E501 + """ + pass + + def test_test_new_inbox_forwarder(self): + """Test case for test_new_inbox_forwarder + + Test new inbox forwarder # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inbox_forwarder_dto.py b/test/test_inbox_forwarder_dto.py new file mode 100644 index 00000000..031a9ca3 --- /dev/null +++ b/test/test_inbox_forwarder_dto.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.inbox_forwarder_dto import InboxForwarderDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestInboxForwarderDto(unittest.TestCase): + """InboxForwarderDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test InboxForwarderDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.inbox_forwarder_dto.InboxForwarderDto() # noqa: E501 + if include_optional : + return InboxForwarderDto( + id = '0', + inbox_id = '0', + field = 'RECIPIENTS', + match = '0', + forward_to_recipients = [ + '0' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return InboxForwarderDto( + id = '0', + inbox_id = '0', + field = 'RECIPIENTS', + match = '0', + forward_to_recipients = [ + '0' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testInboxForwarderDto(self): + """Test InboxForwarderDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inbox_forwarder_test_options.py b/test/test_inbox_forwarder_test_options.py new file mode 100644 index 00000000..19f5f9eb --- /dev/null +++ b/test/test_inbox_forwarder_test_options.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.inbox_forwarder_test_options import InboxForwarderTestOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestInboxForwarderTestOptions(unittest.TestCase): + """InboxForwarderTestOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test InboxForwarderTestOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.inbox_forwarder_test_options.InboxForwarderTestOptions() # noqa: E501 + if include_optional : + return InboxForwarderTestOptions( + test_value = '0' + ) + else : + return InboxForwarderTestOptions( + test_value = '0', + ) + + def testInboxForwarderTestOptions(self): + """Test InboxForwarderTestOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inbox_forwarder_test_result.py b/test/test_inbox_forwarder_test_result.py new file mode 100644 index 00000000..7b652d32 --- /dev/null +++ b/test/test_inbox_forwarder_test_result.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.inbox_forwarder_test_result import InboxForwarderTestResult # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestInboxForwarderTestResult(unittest.TestCase): + """InboxForwarderTestResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test InboxForwarderTestResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.inbox_forwarder_test_result.InboxForwarderTestResult() # noqa: E501 + if include_optional : + return InboxForwarderTestResult( + matches = { + 'key' : True + }, + does_match = True + ) + else : + return InboxForwarderTestResult( + matches = { + 'key' : True + }, + does_match = True, + ) + + def testInboxForwarderTestResult(self): + """Test InboxForwarderTestResult""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inbox_id_item.py b/test/test_inbox_id_item.py new file mode 100644 index 00000000..75d7bb3a --- /dev/null +++ b/test/test_inbox_id_item.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.inbox_id_item import InboxIdItem # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestInboxIdItem(unittest.TestCase): + """InboxIdItem unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test InboxIdItem + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.inbox_id_item.InboxIdItem() # noqa: E501 + if include_optional : + return InboxIdItem( + id = '0', + email_address = '0' + ) + else : + return InboxIdItem( + id = '0', + email_address = '0', + ) + + def testInboxIdItem(self): + """Test InboxIdItem""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inbox_ids_result.py b/test/test_inbox_ids_result.py new file mode 100644 index 00000000..de1d2e04 --- /dev/null +++ b/test/test_inbox_ids_result.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.inbox_ids_result import InboxIdsResult # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestInboxIdsResult(unittest.TestCase): + """InboxIdsResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test InboxIdsResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.inbox_ids_result.InboxIdsResult() # noqa: E501 + if include_optional : + return InboxIdsResult( + inbox_ids = [ + mailslurp_client.models.inbox_id_item.InboxIdItem( + id = '0', + email_address = '0', ) + ] + ) + else : + return InboxIdsResult( + inbox_ids = [ + mailslurp_client.models.inbox_id_item.InboxIdItem( + id = '0', + email_address = '0', ) + ], + ) + + def testInboxIdsResult(self): + """Test InboxIdsResult""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inbox_preview.py b/test/test_inbox_preview.py new file mode 100644 index 00000000..b25b87ff --- /dev/null +++ b/test/test_inbox_preview.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.inbox_preview import InboxPreview # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestInboxPreview(unittest.TestCase): + """InboxPreview unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test InboxPreview + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.inbox_preview.InboxPreview() # noqa: E501 + if include_optional : + return InboxPreview( + id = '0', + domain_id = '0', + email_address = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + favourite = True, + name = '0', + tags = [ + '0' + ], + team_access = True, + inbox_type = 'HTTP_INBOX', + virtual_inbox = True, + expires_at = '0' + ) + else : + return InboxPreview( + id = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + favourite = True, + team_access = True, + virtual_inbox = True, + ) + + def testInboxPreview(self): + """Test InboxPreview""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inbox_ruleset_controller_api.py b/test/test_inbox_ruleset_controller_api.py new file mode 100644 index 00000000..1b0cc9c4 --- /dev/null +++ b/test/test_inbox_ruleset_controller_api.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import mailslurp_client +from mailslurp_client.api.inbox_ruleset_controller_api import InboxRulesetControllerApi # noqa: E501 +from mailslurp_client.rest import ApiException + + +class TestInboxRulesetControllerApi(unittest.TestCase): + """InboxRulesetControllerApi unit test stubs""" + + def setUp(self): + self.api = mailslurp_client.api.inbox_ruleset_controller_api.InboxRulesetControllerApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_new_inbox_ruleset(self): + """Test case for create_new_inbox_ruleset + + Create an inbox ruleset # noqa: E501 + """ + pass + + def test_delete_inbox_ruleset(self): + """Test case for delete_inbox_ruleset + + Delete an inbox ruleset # noqa: E501 + """ + pass + + def test_delete_inbox_rulesets(self): + """Test case for delete_inbox_rulesets + + Delete inbox rulesets # noqa: E501 + """ + pass + + def test_get_inbox_ruleset(self): + """Test case for get_inbox_ruleset + + Get an inbox ruleset # noqa: E501 + """ + pass + + def test_get_inbox_rulesets(self): + """Test case for get_inbox_rulesets + + List inbox rulesets # noqa: E501 + """ + pass + + def test_test_inbox_ruleset(self): + """Test case for test_inbox_ruleset + + Test an inbox ruleset # noqa: E501 + """ + pass + + def test_test_inbox_rulesets_for_inbox(self): + """Test case for test_inbox_rulesets_for_inbox + + Test inbox rulesets for inbox # noqa: E501 + """ + pass + + def test_test_new_inbox_ruleset(self): + """Test case for test_new_inbox_ruleset + + Test new inbox ruleset # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inbox_ruleset_dto.py b/test/test_inbox_ruleset_dto.py new file mode 100644 index 00000000..d57bed68 --- /dev/null +++ b/test/test_inbox_ruleset_dto.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.inbox_ruleset_dto import InboxRulesetDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestInboxRulesetDto(unittest.TestCase): + """InboxRulesetDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test InboxRulesetDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.inbox_ruleset_dto.InboxRulesetDto() # noqa: E501 + if include_optional : + return InboxRulesetDto( + id = '0', + inbox_id = '0', + scope = 'RECEIVING_EMAILS', + action = 'BLOCK', + target = '0', + handler = 'EXCEPTION', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return InboxRulesetDto( + id = '0', + inbox_id = '0', + scope = 'RECEIVING_EMAILS', + action = 'BLOCK', + target = '0', + handler = 'EXCEPTION', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testInboxRulesetDto(self): + """Test InboxRulesetDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inbox_ruleset_test_options.py b/test/test_inbox_ruleset_test_options.py new file mode 100644 index 00000000..c4281473 --- /dev/null +++ b/test/test_inbox_ruleset_test_options.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.inbox_ruleset_test_options import InboxRulesetTestOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestInboxRulesetTestOptions(unittest.TestCase): + """InboxRulesetTestOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test InboxRulesetTestOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.inbox_ruleset_test_options.InboxRulesetTestOptions() # noqa: E501 + if include_optional : + return InboxRulesetTestOptions( + test_target = '0' + ) + else : + return InboxRulesetTestOptions( + test_target = '0', + ) + + def testInboxRulesetTestOptions(self): + """Test InboxRulesetTestOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inbox_ruleset_test_result.py b/test/test_inbox_ruleset_test_result.py new file mode 100644 index 00000000..42bd5825 --- /dev/null +++ b/test/test_inbox_ruleset_test_result.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.inbox_ruleset_test_result import InboxRulesetTestResult # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestInboxRulesetTestResult(unittest.TestCase): + """InboxRulesetTestResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test InboxRulesetTestResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.inbox_ruleset_test_result.InboxRulesetTestResult() # noqa: E501 + if include_optional : + return InboxRulesetTestResult( + ruleset_matches = { + 'key' : True + }, + matches = True + ) + else : + return InboxRulesetTestResult( + ruleset_matches = { + 'key' : True + }, + matches = True, + ) + + def testInboxRulesetTestResult(self): + """Test InboxRulesetTestResult""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inline_object.py b/test/test_inline_object.py new file mode 100644 index 00000000..aa167c1d --- /dev/null +++ b/test/test_inline_object.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.inline_object import InlineObject # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestInlineObject(unittest.TestCase): + """InlineObject unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test InlineObject + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.inline_object.InlineObject() # noqa: E501 + if include_optional : + return InlineObject( + content_type_header = '0', + file = bytes(b'blah') + ) + else : + return InlineObject( + file = bytes(b'blah'), + ) + + def testInlineObject(self): + """Test InlineObject""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_inline_object1.py b/test/test_inline_object1.py new file mode 100644 index 00000000..7c87f3a6 --- /dev/null +++ b/test/test_inline_object1.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.inline_object1 import InlineObject1 # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestInlineObject1(unittest.TestCase): + """InlineObject1 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test InlineObject1 + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.inline_object1.InlineObject1() # noqa: E501 + if include_optional : + return InlineObject1( + short = 56, + char = '0', + int = 56, + long = 56, + float = 1.337, + double = 1.337, + direct = True, + read_only = True + ) + else : + return InlineObject1( + ) + + def testInlineObject1(self): + """Test InlineObject1""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_ip_address_result.py b/test/test_ip_address_result.py new file mode 100644 index 00000000..82b8d9b1 --- /dev/null +++ b/test/test_ip_address_result.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.ip_address_result import IPAddressResult # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestIPAddressResult(unittest.TestCase): + """IPAddressResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test IPAddressResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.ip_address_result.IPAddressResult() # noqa: E501 + if include_optional : + return IPAddressResult( + address = '0', + hostname = '0' + ) + else : + return IPAddressResult( + address = '0', + hostname = '0', + ) + + def testIPAddressResult(self): + """Test IPAddressResult""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_json_schema_dto.py b/test/test_json_schema_dto.py new file mode 100644 index 00000000..43c81359 --- /dev/null +++ b/test/test_json_schema_dto.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.json_schema_dto import JSONSchemaDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestJSONSchemaDto(unittest.TestCase): + """JSONSchemaDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test JSONSchemaDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.json_schema_dto.JSONSchemaDto() # noqa: E501 + if include_optional : + return JSONSchemaDto( + value = '0' + ) + else : + return JSONSchemaDto( + value = '0', + ) + + def testJSONSchemaDto(self): + """Test JSONSchemaDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_mail_server_controller_api.py b/test/test_mail_server_controller_api.py new file mode 100644 index 00000000..e7d6dc07 --- /dev/null +++ b/test/test_mail_server_controller_api.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import mailslurp_client +from mailslurp_client.api.mail_server_controller_api import MailServerControllerApi # noqa: E501 +from mailslurp_client.rest import ApiException + + +class TestMailServerControllerApi(unittest.TestCase): + """MailServerControllerApi unit test stubs""" + + def setUp(self): + self.api = mailslurp_client.api.mail_server_controller_api.MailServerControllerApi() # noqa: E501 + + def tearDown(self): + pass + + def test_describe_mail_server_domain(self): + """Test case for describe_mail_server_domain + + Get DNS Mail Server records for a domain # noqa: E501 + """ + pass + + def test_get_dns_lookup(self): + """Test case for get_dns_lookup + + Lookup DNS records for a domain # noqa: E501 + """ + pass + + def test_get_ip_address(self): + """Test case for get_ip_address + + Get IP address for a domain # noqa: E501 + """ + pass + + def test_verify_email_address(self): + """Test case for verify_email_address + + Deprecated. Use the EmailVerificationController methods for more accurate and reliable functionality. Verify the existence of an email address at a given mail server. # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_match_option.py b/test/test_match_option.py new file mode 100644 index 00000000..da5e6245 --- /dev/null +++ b/test/test_match_option.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.match_option import MatchOption # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestMatchOption(unittest.TestCase): + """MatchOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test MatchOption + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.match_option.MatchOption() # noqa: E501 + if include_optional : + return MatchOption( + field = 'SUBJECT', + should = 'CONTAIN', + value = '0' + ) + else : + return MatchOption( + field = 'SUBJECT', + should = 'CONTAIN', + value = '0', + ) + + def testMatchOption(self): + """Test MatchOption""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_match_options.py b/test/test_match_options.py new file mode 100644 index 00000000..f32b38c1 --- /dev/null +++ b/test/test_match_options.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.match_options import MatchOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestMatchOptions(unittest.TestCase): + """MatchOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test MatchOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.match_options.MatchOptions() # noqa: E501 + if include_optional : + return MatchOptions( + matches = [ + mailslurp_client.models.match_option.MatchOption( + field = 'SUBJECT', + should = 'CONTAIN', + value = '0', ) + ], + conditions = [ + mailslurp_client.models.condition_option.ConditionOption( + condition = 'HAS_ATTACHMENTS', + value = 'TRUE', ) + ] + ) + else : + return MatchOptions( + ) + + def testMatchOptions(self): + """Test MatchOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_missed_email.py b/test/test_missed_email.py new file mode 100644 index 00000000..bd8329a7 --- /dev/null +++ b/test/test_missed_email.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.missed_email import MissedEmail # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestMissedEmail(unittest.TestCase): + """MissedEmail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test MissedEmail + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.missed_email.MissedEmail() # noqa: E501 + if include_optional : + return MissedEmail( + id = '0', + user_id = '0', + subject = '0', + body_excerpt = '0', + attachment_count = 56, + _from = '0', + raw_url = '0', + raw_key = '0', + raw_bucket = '0', + can_restore = True, + to = [ + '0' + ], + cc = [ + '0' + ], + bcc = [ + '0' + ], + inbox_ids = [ + '0' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return MissedEmail( + attachment_count = 56, + to = [ + '0' + ], + cc = [ + '0' + ], + bcc = [ + '0' + ], + inbox_ids = [ + '0' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testMissedEmail(self): + """Test MissedEmail""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_missed_email_controller_api.py b/test/test_missed_email_controller_api.py new file mode 100644 index 00000000..16bad321 --- /dev/null +++ b/test/test_missed_email_controller_api.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import mailslurp_client +from mailslurp_client.api.missed_email_controller_api import MissedEmailControllerApi # noqa: E501 +from mailslurp_client.rest import ApiException + + +class TestMissedEmailControllerApi(unittest.TestCase): + """MissedEmailControllerApi unit test stubs""" + + def setUp(self): + self.api = mailslurp_client.api.missed_email_controller_api.MissedEmailControllerApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_all_missed_emails(self): + """Test case for get_all_missed_emails + + Get all MissedEmails in paginated format # noqa: E501 + """ + pass + + def test_get_all_unknown_missed_emails(self): + """Test case for get_all_unknown_missed_emails + + Get all unknown missed emails in paginated format # noqa: E501 + """ + pass + + def test_get_missed_email(self): + """Test case for get_missed_email + + Get MissedEmail # noqa: E501 + """ + pass + + def test_restore_missed_emails(self): + """Test case for restore_missed_emails + + Restore missed emails # noqa: E501 + """ + pass + + def test_wait_for_nth_missed_email(self): + """Test case for wait_for_nth_missed_email + + Wait for Nth missed email # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_missed_email_projection.py b/test/test_missed_email_projection.py new file mode 100644 index 00000000..05a507e4 --- /dev/null +++ b/test/test_missed_email_projection.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.missed_email_projection import MissedEmailProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestMissedEmailProjection(unittest.TestCase): + """MissedEmailProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test MissedEmailProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.missed_email_projection.MissedEmailProjection() # noqa: E501 + if include_optional : + return MissedEmailProjection( + id = '0', + _from = '0', + subject = '0', + user_id = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return MissedEmailProjection( + id = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testMissedEmailProjection(self): + """Test MissedEmailProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_name_server_record.py b/test/test_name_server_record.py new file mode 100644 index 00000000..9483a7e4 --- /dev/null +++ b/test/test_name_server_record.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.name_server_record import NameServerRecord # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestNameServerRecord(unittest.TestCase): + """NameServerRecord unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test NameServerRecord + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.name_server_record.NameServerRecord() # noqa: E501 + if include_optional : + return NameServerRecord( + raw = '0', + record_type = '0', + priority = '0', + value = '0' + ) + else : + return NameServerRecord( + raw = '0', + record_type = '0', + priority = '0', + value = '0', + ) + + def testNameServerRecord(self): + """Test NameServerRecord""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_organization_inbox_projection.py b/test/test_organization_inbox_projection.py new file mode 100644 index 00000000..019086b0 --- /dev/null +++ b/test/test_organization_inbox_projection.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.organization_inbox_projection import OrganizationInboxProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestOrganizationInboxProjection(unittest.TestCase): + """OrganizationInboxProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test OrganizationInboxProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.organization_inbox_projection.OrganizationInboxProjection() # noqa: E501 + if include_optional : + return OrganizationInboxProjection( + id = '0', + domain_id = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + name = '0', + email_address = '0', + favourite = True, + tags = [ + '0' + ], + team_access = True, + inbox_type = 'HTTP_INBOX', + read_only = True, + virtual_inbox = True + ) + else : + return OrganizationInboxProjection( + id = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + favourite = True, + team_access = True, + read_only = True, + virtual_inbox = True, + ) + + def testOrganizationInboxProjection(self): + """Test OrganizationInboxProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_page_alias.py b/test/test_page_alias.py new file mode 100644 index 00000000..bbf67142 --- /dev/null +++ b/test/test_page_alias.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.page_alias import PageAlias # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPageAlias(unittest.TestCase): + """PageAlias unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PageAlias + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.page_alias.PageAlias() # noqa: E501 + if include_optional : + return PageAlias( + content = [ + mailslurp_client.models.alias_projection.AliasProjection( + name = '0', + id = '0', + inbox_id = '0', + user_id = '0', + email_address = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + use_threads = True, + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + pageable = mailslurp_client.models.pageable_object.PageableObject( + offset = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + page_number = 56, + page_size = 56, + paged = True, + unpaged = True, ), + total = 56, + last = True, + total_elements = 56, + total_pages = 56, + size = 56, + number = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + first = True, + number_of_elements = 56, + empty = True + ) + else : + return PageAlias( + ) + + def testPageAlias(self): + """Test PageAlias""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_page_attachment_entity.py b/test/test_page_attachment_entity.py new file mode 100644 index 00000000..3ca92027 --- /dev/null +++ b/test/test_page_attachment_entity.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.page_attachment_entity import PageAttachmentEntity # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPageAttachmentEntity(unittest.TestCase): + """PageAttachmentEntity unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PageAttachmentEntity + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.page_attachment_entity.PageAttachmentEntity() # noqa: E501 + if include_optional : + return PageAttachmentEntity( + content = [ + mailslurp_client.models.attachment_projection.AttachmentProjection( + name = '0', + content_length = 56, + content_type = 'image/png', + user_id = '0', + attachment_id = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + pageable = mailslurp_client.models.pageable_object.PageableObject( + offset = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + page_number = 56, + page_size = 56, + paged = True, + unpaged = True, ), + total = 56, + last = True, + total_elements = 56, + total_pages = 56, + size = 56, + number = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + first = True, + number_of_elements = 56, + empty = True + ) + else : + return PageAttachmentEntity( + ) + + def testPageAttachmentEntity(self): + """Test PageAttachmentEntity""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_page_bounced_email.py b/test/test_page_bounced_email.py new file mode 100644 index 00000000..971630f4 --- /dev/null +++ b/test/test_page_bounced_email.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.page_bounced_email import PageBouncedEmail # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPageBouncedEmail(unittest.TestCase): + """PageBouncedEmail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PageBouncedEmail + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.page_bounced_email.PageBouncedEmail() # noqa: E501 + if include_optional : + return PageBouncedEmail( + content = [ + mailslurp_client.models.bounce_projection.BounceProjection( + id = '0', + sender = '0', + subject = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + bounce_mta = '0', + bounce_type = '0', ) + ], + pageable = mailslurp_client.models.pageable_object.PageableObject( + offset = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + page_number = 56, + page_size = 56, + paged = True, + unpaged = True, ), + total = 56, + last = True, + total_elements = 56, + total_pages = 56, + size = 56, + number = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + first = True, + number_of_elements = 56, + empty = True + ) + else : + return PageBouncedEmail( + ) + + def testPageBouncedEmail(self): + """Test PageBouncedEmail""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_page_bounced_recipients.py b/test/test_page_bounced_recipients.py new file mode 100644 index 00000000..eb51e9c6 --- /dev/null +++ b/test/test_page_bounced_recipients.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.page_bounced_recipients import PageBouncedRecipients # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPageBouncedRecipients(unittest.TestCase): + """PageBouncedRecipients unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PageBouncedRecipients + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.page_bounced_recipients.PageBouncedRecipients() # noqa: E501 + if include_optional : + return PageBouncedRecipients( + content = [ + mailslurp_client.models.bounce_recipient_projection.BounceRecipientProjection( + id = '0', + action = '0', + status = '0', + sent_email_id = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + recipient = '0', ) + ], + pageable = mailslurp_client.models.pageable_object.PageableObject( + offset = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + page_number = 56, + page_size = 56, + paged = True, + unpaged = True, ), + total = 56, + last = True, + total_elements = 56, + total_pages = 56, + size = 56, + number = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + first = True, + number_of_elements = 56, + empty = True + ) + else : + return PageBouncedRecipients( + ) + + def testPageBouncedRecipients(self): + """Test PageBouncedRecipients""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_page_complaint.py b/test/test_page_complaint.py new file mode 100644 index 00000000..aa580641 --- /dev/null +++ b/test/test_page_complaint.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.page_complaint import PageComplaint # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPageComplaint(unittest.TestCase): + """PageComplaint unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PageComplaint + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.page_complaint.PageComplaint() # noqa: E501 + if include_optional : + return PageComplaint( + content = [ + mailslurp_client.models.complaint.Complaint( + id = '0', + user_id = '0', + event_type = '0', + mail_source = '0', + mail_message_id = '0', + complaint_recipient = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + pageable = mailslurp_client.models.pageable_object.PageableObject( + offset = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + page_number = 56, + page_size = 56, + paged = True, + unpaged = True, ), + total = 56, + last = True, + total_elements = 56, + total_pages = 56, + size = 56, + number = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + first = True, + number_of_elements = 56, + empty = True + ) + else : + return PageComplaint( + ) + + def testPageComplaint(self): + """Test PageComplaint""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_page_contact_projection.py b/test/test_page_contact_projection.py new file mode 100644 index 00000000..d4f9624f --- /dev/null +++ b/test/test_page_contact_projection.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.page_contact_projection import PageContactProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPageContactProjection(unittest.TestCase): + """PageContactProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PageContactProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.page_contact_projection.PageContactProjection() # noqa: E501 + if include_optional : + return PageContactProjection( + content = [ + mailslurp_client.models.contact_projection.ContactProjection( + id = '0', + group_id = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + first_name = '0', + last_name = '0', + company = '0', + email_addresses = [ + '0' + ], + opt_out = True, ) + ], + pageable = mailslurp_client.models.pageable_object.PageableObject( + offset = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + page_number = 56, + page_size = 56, + paged = True, + unpaged = True, ), + total = 56, + last = True, + total_elements = 56, + total_pages = 56, + size = 56, + number = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + first = True, + number_of_elements = 56, + empty = True + ) + else : + return PageContactProjection( + ) + + def testPageContactProjection(self): + """Test PageContactProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_page_delivery_status.py b/test/test_page_delivery_status.py new file mode 100644 index 00000000..fd834038 --- /dev/null +++ b/test/test_page_delivery_status.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.page_delivery_status import PageDeliveryStatus # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPageDeliveryStatus(unittest.TestCase): + """PageDeliveryStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PageDeliveryStatus + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.page_delivery_status.PageDeliveryStatus() # noqa: E501 + if include_optional : + return PageDeliveryStatus( + content = [ + mailslurp_client.models.delivery_status_dto.DeliveryStatusDto( + id = '0', + user_id = '0', + sent_id = '0', + remote_mta_ip = '0', + inbox_id = '0', + reporting_mta = '0', + recipients = [ + '0' + ], + smtp_response = '0', + smtp_status_code = 56, + processing_time_millis = 56, + received = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + subject = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + pageable = mailslurp_client.models.pageable_object.PageableObject( + offset = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + page_number = 56, + page_size = 56, + paged = True, + unpaged = True, ), + total = 56, + last = True, + total_elements = 56, + total_pages = 56, + size = 56, + number = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + first = True, + number_of_elements = 56, + empty = True + ) + else : + return PageDeliveryStatus( + ) + + def testPageDeliveryStatus(self): + """Test PageDeliveryStatus""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_page_email_preview.py b/test/test_page_email_preview.py new file mode 100644 index 00000000..2e525c04 --- /dev/null +++ b/test/test_page_email_preview.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.page_email_preview import PageEmailPreview # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPageEmailPreview(unittest.TestCase): + """PageEmailPreview unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PageEmailPreview + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.page_email_preview.PageEmailPreview() # noqa: E501 + if include_optional : + return PageEmailPreview( + content = [ + mailslurp_client.models.email_preview.EmailPreview( + id = '0', + domain_id = '0', + subject = '0', + to = [ + '0' + ], + from = '0', + bcc = [ + '0' + ], + cc = [ + '0' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + read = True, + attachments = [ + '0' + ], ) + ], + pageable = mailslurp_client.models.pageable_object.PageableObject( + offset = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + page_number = 56, + page_size = 56, + paged = True, + unpaged = True, ), + total = 56, + last = True, + total_elements = 56, + total_pages = 56, + size = 56, + number = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + first = True, + number_of_elements = 56, + empty = True + ) + else : + return PageEmailPreview( + ) + + def testPageEmailPreview(self): + """Test PageEmailPreview""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_page_email_projection.py b/test/test_page_email_projection.py new file mode 100644 index 00000000..450d1460 --- /dev/null +++ b/test/test_page_email_projection.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.page_email_projection import PageEmailProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPageEmailProjection(unittest.TestCase): + """PageEmailProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PageEmailProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.page_email_projection.PageEmailProjection() # noqa: E501 + if include_optional : + return PageEmailProjection( + content = [ + mailslurp_client.models.email_projection.EmailProjection( + id = '0', + from = '0', + subject = '0', + inbox_id = '0', + attachments = [ + '0' + ], + to = [ + '0' + ], + bcc = [ + '0' + ], + cc = [ + '0' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + domain_id = '0', + read = True, + team_access = True, + body_md5_hash = '0', + body_excerpt = '0', ) + ], + pageable = mailslurp_client.models.pageable_object.PageableObject( + offset = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + page_number = 56, + page_size = 56, + paged = True, + unpaged = True, ), + total = 56, + last = True, + total_elements = 56, + total_pages = 56, + size = 56, + number = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + first = True, + number_of_elements = 56, + empty = True + ) + else : + return PageEmailProjection( + ) + + def testPageEmailProjection(self): + """Test PageEmailProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_page_email_validation_request.py b/test/test_page_email_validation_request.py new file mode 100644 index 00000000..6799ddc3 --- /dev/null +++ b/test/test_page_email_validation_request.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.page_email_validation_request import PageEmailValidationRequest # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPageEmailValidationRequest(unittest.TestCase): + """PageEmailValidationRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PageEmailValidationRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.page_email_validation_request.PageEmailValidationRequest() # noqa: E501 + if include_optional : + return PageEmailValidationRequest( + content = [ + mailslurp_client.models.email_validation_request.EmailValidationRequest( + id = '0', + user_id = '0', + email_address = '0', + is_valid = True, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + pageable = mailslurp_client.models.pageable_object.PageableObject( + offset = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + page_number = 56, + page_size = 56, + paged = True, + unpaged = True, ), + total = 56, + last = True, + total_elements = 56, + total_pages = 56, + size = 56, + number = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + first = True, + number_of_elements = 56, + empty = True + ) + else : + return PageEmailValidationRequest( + ) + + def testPageEmailValidationRequest(self): + """Test PageEmailValidationRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_page_expired_inbox_record_projection.py b/test/test_page_expired_inbox_record_projection.py new file mode 100644 index 00000000..4d693139 --- /dev/null +++ b/test/test_page_expired_inbox_record_projection.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.page_expired_inbox_record_projection import PageExpiredInboxRecordProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPageExpiredInboxRecordProjection(unittest.TestCase): + """PageExpiredInboxRecordProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PageExpiredInboxRecordProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.page_expired_inbox_record_projection.PageExpiredInboxRecordProjection() # noqa: E501 + if include_optional : + return PageExpiredInboxRecordProjection( + content = [ + mailslurp_client.models.expired_inbox_record_projection.ExpiredInboxRecordProjection( + id = '0', + user_id = '0', + email_address = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + pageable = mailslurp_client.models.pageable_object.PageableObject( + offset = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + page_number = 56, + page_size = 56, + paged = True, + unpaged = True, ), + total = 56, + last = True, + total_elements = 56, + total_pages = 56, + size = 56, + number = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + first = True, + number_of_elements = 56, + empty = True + ) + else : + return PageExpiredInboxRecordProjection( + ) + + def testPageExpiredInboxRecordProjection(self): + """Test PageExpiredInboxRecordProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_page_group_projection.py b/test/test_page_group_projection.py new file mode 100644 index 00000000..3a833fad --- /dev/null +++ b/test/test_page_group_projection.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.page_group_projection import PageGroupProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPageGroupProjection(unittest.TestCase): + """PageGroupProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PageGroupProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.page_group_projection.PageGroupProjection() # noqa: E501 + if include_optional : + return PageGroupProjection( + content = [ + mailslurp_client.models.group_projection.GroupProjection( + name = '0', + id = '0', + description = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + pageable = mailslurp_client.models.pageable_object.PageableObject( + offset = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + page_number = 56, + page_size = 56, + paged = True, + unpaged = True, ), + total = 56, + last = True, + total_elements = 56, + total_pages = 56, + size = 56, + number = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + first = True, + number_of_elements = 56, + empty = True + ) + else : + return PageGroupProjection( + ) + + def testPageGroupProjection(self): + """Test PageGroupProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_page_inbox_forwarder_dto.py b/test/test_page_inbox_forwarder_dto.py new file mode 100644 index 00000000..86cb1494 --- /dev/null +++ b/test/test_page_inbox_forwarder_dto.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.page_inbox_forwarder_dto import PageInboxForwarderDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPageInboxForwarderDto(unittest.TestCase): + """PageInboxForwarderDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PageInboxForwarderDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.page_inbox_forwarder_dto.PageInboxForwarderDto() # noqa: E501 + if include_optional : + return PageInboxForwarderDto( + content = [ + mailslurp_client.models.inbox_forwarder_dto.InboxForwarderDto( + id = '0', + inbox_id = '0', + field = 'RECIPIENTS', + match = '0', + forward_to_recipients = [ + '0' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + pageable = mailslurp_client.models.pageable_object.PageableObject( + offset = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + page_number = 56, + page_size = 56, + paged = True, + unpaged = True, ), + total = 56, + last = True, + total_elements = 56, + total_pages = 56, + size = 56, + number = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + first = True, + number_of_elements = 56, + empty = True + ) + else : + return PageInboxForwarderDto( + ) + + def testPageInboxForwarderDto(self): + """Test PageInboxForwarderDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_page_inbox_projection.py b/test/test_page_inbox_projection.py new file mode 100644 index 00000000..6425f5e6 --- /dev/null +++ b/test/test_page_inbox_projection.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.page_inbox_projection import PageInboxProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPageInboxProjection(unittest.TestCase): + """PageInboxProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PageInboxProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.page_inbox_projection.PageInboxProjection() # noqa: E501 + if include_optional : + return PageInboxProjection( + content = [ + mailslurp_client.models.inbox_preview.InboxPreview( + id = '0', + domain_id = '0', + email_address = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + favourite = True, + name = '0', + tags = [ + '0' + ], + team_access = True, + inbox_type = 'HTTP_INBOX', + virtual_inbox = True, + expires_at = '0', ) + ], + pageable = mailslurp_client.models.pageable_object.PageableObject( + offset = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + page_number = 56, + page_size = 56, + paged = True, + unpaged = True, ), + total = 56, + last = True, + total_elements = 56, + total_pages = 56, + size = 56, + number = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + first = True, + number_of_elements = 56, + empty = True + ) + else : + return PageInboxProjection( + ) + + def testPageInboxProjection(self): + """Test PageInboxProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_page_inbox_ruleset_dto.py b/test/test_page_inbox_ruleset_dto.py new file mode 100644 index 00000000..8da01979 --- /dev/null +++ b/test/test_page_inbox_ruleset_dto.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.page_inbox_ruleset_dto import PageInboxRulesetDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPageInboxRulesetDto(unittest.TestCase): + """PageInboxRulesetDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PageInboxRulesetDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.page_inbox_ruleset_dto.PageInboxRulesetDto() # noqa: E501 + if include_optional : + return PageInboxRulesetDto( + content = [ + mailslurp_client.models.inbox_ruleset_dto.InboxRulesetDto( + id = '0', + inbox_id = '0', + scope = 'RECEIVING_EMAILS', + action = 'BLOCK', + target = '0', + handler = 'EXCEPTION', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + pageable = mailslurp_client.models.pageable_object.PageableObject( + offset = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + page_number = 56, + page_size = 56, + paged = True, + unpaged = True, ), + total = 56, + last = True, + total_elements = 56, + total_pages = 56, + size = 56, + number = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + first = True, + number_of_elements = 56, + empty = True + ) + else : + return PageInboxRulesetDto( + ) + + def testPageInboxRulesetDto(self): + """Test PageInboxRulesetDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_page_missed_email_projection.py b/test/test_page_missed_email_projection.py new file mode 100644 index 00000000..7ff00407 --- /dev/null +++ b/test/test_page_missed_email_projection.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.page_missed_email_projection import PageMissedEmailProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPageMissedEmailProjection(unittest.TestCase): + """PageMissedEmailProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PageMissedEmailProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.page_missed_email_projection.PageMissedEmailProjection() # noqa: E501 + if include_optional : + return PageMissedEmailProjection( + content = [ + mailslurp_client.models.missed_email_projection.MissedEmailProjection( + id = '0', + from = '0', + subject = '0', + user_id = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + pageable = mailslurp_client.models.pageable_object.PageableObject( + offset = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + page_number = 56, + page_size = 56, + paged = True, + unpaged = True, ), + total = 56, + last = True, + total_elements = 56, + total_pages = 56, + size = 56, + number = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + first = True, + number_of_elements = 56, + empty = True + ) + else : + return PageMissedEmailProjection( + ) + + def testPageMissedEmailProjection(self): + """Test PageMissedEmailProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_page_organization_inbox_projection.py b/test/test_page_organization_inbox_projection.py new file mode 100644 index 00000000..79d632f5 --- /dev/null +++ b/test/test_page_organization_inbox_projection.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.page_organization_inbox_projection import PageOrganizationInboxProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPageOrganizationInboxProjection(unittest.TestCase): + """PageOrganizationInboxProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PageOrganizationInboxProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.page_organization_inbox_projection.PageOrganizationInboxProjection() # noqa: E501 + if include_optional : + return PageOrganizationInboxProjection( + content = [ + mailslurp_client.models.organization_inbox_projection.OrganizationInboxProjection( + id = '0', + domain_id = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + name = '0', + email_address = '0', + favourite = True, + tags = [ + '0' + ], + team_access = True, + inbox_type = 'HTTP_INBOX', + read_only = True, + virtual_inbox = True, ) + ], + pageable = mailslurp_client.models.pageable_object.PageableObject( + offset = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + page_number = 56, + page_size = 56, + paged = True, + unpaged = True, ), + total = 56, + last = True, + total_elements = 56, + total_pages = 56, + size = 56, + number = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + first = True, + number_of_elements = 56, + empty = True + ) + else : + return PageOrganizationInboxProjection( + ) + + def testPageOrganizationInboxProjection(self): + """Test PageOrganizationInboxProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_page_phone_number_projection.py b/test/test_page_phone_number_projection.py new file mode 100644 index 00000000..66b1ac62 --- /dev/null +++ b/test/test_page_phone_number_projection.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.page_phone_number_projection import PagePhoneNumberProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPagePhoneNumberProjection(unittest.TestCase): + """PagePhoneNumberProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PagePhoneNumberProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.page_phone_number_projection.PagePhoneNumberProjection() # noqa: E501 + if include_optional : + return PagePhoneNumberProjection( + content = [ + mailslurp_client.models.phone_number_projection.PhoneNumberProjection( + id = '0', + user_id = '0', + phone_number = '0', + phone_country = 'US', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + pageable = mailslurp_client.models.pageable_object.PageableObject( + offset = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + page_number = 56, + page_size = 56, + paged = True, + unpaged = True, ), + total = 56, + last = True, + total_elements = 56, + total_pages = 56, + size = 56, + number = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + first = True, + number_of_elements = 56, + empty = True + ) + else : + return PagePhoneNumberProjection( + ) + + def testPagePhoneNumberProjection(self): + """Test PagePhoneNumberProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_page_sent_email_projection.py b/test/test_page_sent_email_projection.py new file mode 100644 index 00000000..c5165eb0 --- /dev/null +++ b/test/test_page_sent_email_projection.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.page_sent_email_projection import PageSentEmailProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPageSentEmailProjection(unittest.TestCase): + """PageSentEmailProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PageSentEmailProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.page_sent_email_projection.PageSentEmailProjection() # noqa: E501 + if include_optional : + return PageSentEmailProjection( + content = [ + mailslurp_client.models.sent_email_projection.SentEmailProjection( + id = '0', + from = '0', + user_id = '0', + subject = '0', + body_md5_hash = '0', + bcc = [ + '0' + ], + cc = [ + '0' + ], + virtual_send = True, + inbox_id = '0', + attachments = [ + '0' + ], + to = [ + '0' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + pageable = mailslurp_client.models.pageable_object.PageableObject( + offset = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + page_number = 56, + page_size = 56, + paged = True, + unpaged = True, ), + total = 56, + size = 56, + number = 56, + number_of_elements = 56, + total_elements = 56, + total_pages = 56, + last = True, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + first = True, + empty = True + ) + else : + return PageSentEmailProjection( + content = [ + mailslurp_client.models.sent_email_projection.SentEmailProjection( + id = '0', + from = '0', + user_id = '0', + subject = '0', + body_md5_hash = '0', + bcc = [ + '0' + ], + cc = [ + '0' + ], + virtual_send = True, + inbox_id = '0', + attachments = [ + '0' + ], + to = [ + '0' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + size = 56, + number = 56, + number_of_elements = 56, + total_elements = 56, + total_pages = 56, + ) + + def testPageSentEmailProjection(self): + """Test PageSentEmailProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_page_sent_email_with_queue_projection.py b/test/test_page_sent_email_with_queue_projection.py new file mode 100644 index 00000000..e15068e4 --- /dev/null +++ b/test/test_page_sent_email_with_queue_projection.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.page_sent_email_with_queue_projection import PageSentEmailWithQueueProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPageSentEmailWithQueueProjection(unittest.TestCase): + """PageSentEmailWithQueueProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PageSentEmailWithQueueProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.page_sent_email_with_queue_projection.PageSentEmailWithQueueProjection() # noqa: E501 + if include_optional : + return PageSentEmailWithQueueProjection( + content = [ + mailslurp_client.models.send_with_queue_result.SendWithQueueResult( + id = '0', + user_id = '0', + subject = '0', + inbox_id = '0', + header_id = '0', + delivered = True, + exception_name = '0', + message = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + pageable = mailslurp_client.models.pageable_object.PageableObject( + offset = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + page_number = 56, + page_size = 56, + paged = True, + unpaged = True, ), + total = 56, + size = 56, + number = 56, + number_of_elements = 56, + total_elements = 56, + total_pages = 56, + last = True, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + first = True, + empty = True + ) + else : + return PageSentEmailWithQueueProjection( + content = [ + mailslurp_client.models.send_with_queue_result.SendWithQueueResult( + id = '0', + user_id = '0', + subject = '0', + inbox_id = '0', + header_id = '0', + delivered = True, + exception_name = '0', + message = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + size = 56, + number = 56, + number_of_elements = 56, + total_elements = 56, + total_pages = 56, + ) + + def testPageSentEmailWithQueueProjection(self): + """Test PageSentEmailWithQueueProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_page_sms_projection.py b/test/test_page_sms_projection.py new file mode 100644 index 00000000..e11f81da --- /dev/null +++ b/test/test_page_sms_projection.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.page_sms_projection import PageSmsProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPageSmsProjection(unittest.TestCase): + """PageSmsProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PageSmsProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.page_sms_projection.PageSmsProjection() # noqa: E501 + if include_optional : + return PageSmsProjection( + content = [ + mailslurp_client.models.sms_projection.SmsProjection( + id = '0', + body = '0', + user_id = '0', + phone_number = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + from_number = '0', + read = True, ) + ], + pageable = mailslurp_client.models.pageable_object.PageableObject( + offset = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + page_number = 56, + page_size = 56, + paged = True, + unpaged = True, ), + total = 56, + last = True, + total_elements = 56, + total_pages = 56, + size = 56, + number = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + first = True, + number_of_elements = 56, + empty = True + ) + else : + return PageSmsProjection( + ) + + def testPageSmsProjection(self): + """Test PageSmsProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_page_template_projection.py b/test/test_page_template_projection.py new file mode 100644 index 00000000..38c8d297 --- /dev/null +++ b/test/test_page_template_projection.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.page_template_projection import PageTemplateProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPageTemplateProjection(unittest.TestCase): + """PageTemplateProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PageTemplateProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.page_template_projection.PageTemplateProjection() # noqa: E501 + if include_optional : + return PageTemplateProjection( + content = [ + mailslurp_client.models.template_projection.TemplateProjection( + name = '0', + id = '0', + variables = [ + '0' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + pageable = mailslurp_client.models.pageable_object.PageableObject( + offset = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + page_number = 56, + page_size = 56, + paged = True, + unpaged = True, ), + total = 56, + last = True, + total_elements = 56, + total_pages = 56, + size = 56, + number = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + first = True, + number_of_elements = 56, + empty = True + ) + else : + return PageTemplateProjection( + ) + + def testPageTemplateProjection(self): + """Test PageTemplateProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_page_thread_projection.py b/test/test_page_thread_projection.py new file mode 100644 index 00000000..fbc5dd40 --- /dev/null +++ b/test/test_page_thread_projection.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.page_thread_projection import PageThreadProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPageThreadProjection(unittest.TestCase): + """PageThreadProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PageThreadProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.page_thread_projection.PageThreadProjection() # noqa: E501 + if include_optional : + return PageThreadProjection( + content = [ + mailslurp_client.models.thread_projection.ThreadProjection( + name = '0', + id = '0', + subject = '0', + inbox_id = '0', + user_id = '0', + to = [ + '0' + ], + bcc = [ + '0' + ], + cc = [ + '0' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + alias_id = '0', ) + ], + pageable = mailslurp_client.models.pageable_object.PageableObject( + offset = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + page_number = 56, + page_size = 56, + paged = True, + unpaged = True, ), + total = 56, + last = True, + total_elements = 56, + total_pages = 56, + size = 56, + number = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + first = True, + number_of_elements = 56, + empty = True + ) + else : + return PageThreadProjection( + ) + + def testPageThreadProjection(self): + """Test PageThreadProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_page_tracking_pixel_projection.py b/test/test_page_tracking_pixel_projection.py new file mode 100644 index 00000000..c2d4182d --- /dev/null +++ b/test/test_page_tracking_pixel_projection.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.page_tracking_pixel_projection import PageTrackingPixelProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPageTrackingPixelProjection(unittest.TestCase): + """PageTrackingPixelProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PageTrackingPixelProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.page_tracking_pixel_projection.PageTrackingPixelProjection() # noqa: E501 + if include_optional : + return PageTrackingPixelProjection( + content = [ + mailslurp_client.models.tracking_pixel_projection.TrackingPixelProjection( + name = '0', + id = '0', + inbox_id = '0', + user_id = '0', + sent_email_id = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + recipient = '0', + seen = True, + seen_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + pageable = mailslurp_client.models.pageable_object.PageableObject( + offset = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + page_number = 56, + page_size = 56, + paged = True, + unpaged = True, ), + total = 56, + last = True, + total_elements = 56, + total_pages = 56, + size = 56, + number = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + first = True, + number_of_elements = 56, + empty = True + ) + else : + return PageTrackingPixelProjection( + ) + + def testPageTrackingPixelProjection(self): + """Test PageTrackingPixelProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_page_unknown_missed_email_projection.py b/test/test_page_unknown_missed_email_projection.py new file mode 100644 index 00000000..7cc0b91f --- /dev/null +++ b/test/test_page_unknown_missed_email_projection.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.page_unknown_missed_email_projection import PageUnknownMissedEmailProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPageUnknownMissedEmailProjection(unittest.TestCase): + """PageUnknownMissedEmailProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PageUnknownMissedEmailProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.page_unknown_missed_email_projection.PageUnknownMissedEmailProjection() # noqa: E501 + if include_optional : + return PageUnknownMissedEmailProjection( + content = [ + mailslurp_client.models.unknown_missed_email_projection.UnknownMissedEmailProjection( + id = '0', + from = '0', + subject = '0', + to = [ + '0' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + pageable = mailslurp_client.models.pageable_object.PageableObject( + offset = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + page_number = 56, + page_size = 56, + paged = True, + unpaged = True, ), + total = 56, + last = True, + total_elements = 56, + total_pages = 56, + size = 56, + number = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + first = True, + number_of_elements = 56, + empty = True + ) + else : + return PageUnknownMissedEmailProjection( + ) + + def testPageUnknownMissedEmailProjection(self): + """Test PageUnknownMissedEmailProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_page_webhook_projection.py b/test/test_page_webhook_projection.py new file mode 100644 index 00000000..2b738c63 --- /dev/null +++ b/test/test_page_webhook_projection.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.page_webhook_projection import PageWebhookProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPageWebhookProjection(unittest.TestCase): + """PageWebhookProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PageWebhookProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.page_webhook_projection.PageWebhookProjection() # noqa: E501 + if include_optional : + return PageWebhookProjection( + content = [ + mailslurp_client.models.webhook_projection.WebhookProjection( + name = '0', + id = '0', + url = '0', + inbox_id = '0', + event_name = 'EMAIL_RECEIVED', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + phone_number_id = '0', + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) + ], + pageable = mailslurp_client.models.pageable_object.PageableObject( + offset = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + page_number = 56, + page_size = 56, + paged = True, + unpaged = True, ), + total = 56, + last = True, + total_elements = 56, + total_pages = 56, + size = 56, + number = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + first = True, + number_of_elements = 56, + empty = True + ) + else : + return PageWebhookProjection( + ) + + def testPageWebhookProjection(self): + """Test PageWebhookProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_page_webhook_result.py b/test/test_page_webhook_result.py new file mode 100644 index 00000000..e9a6531d --- /dev/null +++ b/test/test_page_webhook_result.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.page_webhook_result import PageWebhookResult # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPageWebhookResult(unittest.TestCase): + """PageWebhookResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PageWebhookResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.page_webhook_result.PageWebhookResult() # noqa: E501 + if include_optional : + return PageWebhookResult( + content = [ + mailslurp_client.models.webhook_result_dto.WebhookResultDto( + id = '0', + user_id = '0', + inbox_id = '0', + webhook_id = '0', + webhook_url = '0', + message_id = '0', + redrive_id = '0', + http_method = 'GET', + webhook_event = 'EMAIL_RECEIVED', + response_status = 56, + response_time_millis = 56, + response_body_extract = '0', + result_type = 'BAD_RESPONSE', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + seen = True, ) + ], + pageable = mailslurp_client.models.pageable_object.PageableObject( + offset = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + page_number = 56, + page_size = 56, + paged = True, + unpaged = True, ), + total = 56, + last = True, + total_elements = 56, + total_pages = 56, + size = 56, + number = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + first = True, + number_of_elements = 56, + empty = True + ) + else : + return PageWebhookResult( + ) + + def testPageWebhookResult(self): + """Test PageWebhookResult""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_pageable_object.py b/test/test_pageable_object.py new file mode 100644 index 00000000..24c8963d --- /dev/null +++ b/test/test_pageable_object.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.pageable_object import PageableObject # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPageableObject(unittest.TestCase): + """PageableObject unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PageableObject + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.pageable_object.PageableObject() # noqa: E501 + if include_optional : + return PageableObject( + offset = 56, + sort = mailslurp_client.models.sort.Sort( + empty = True, + sorted = True, + unsorted = True, ), + page_number = 56, + page_size = 56, + paged = True, + unpaged = True + ) + else : + return PageableObject( + ) + + def testPageableObject(self): + """Test PageableObject""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_phone_controller_api.py b/test/test_phone_controller_api.py new file mode 100644 index 00000000..8e4d3a75 --- /dev/null +++ b/test/test_phone_controller_api.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import mailslurp_client +from mailslurp_client.api.phone_controller_api import PhoneControllerApi # noqa: E501 +from mailslurp_client.rest import ApiException + + +class TestPhoneControllerApi(unittest.TestCase): + """PhoneControllerApi unit test stubs""" + + def setUp(self): + self.api = mailslurp_client.api.phone_controller_api.PhoneControllerApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_emergency_address(self): + """Test case for create_emergency_address + + """ + pass + + def test_delete_emergency_address(self): + """Test case for delete_emergency_address + + """ + pass + + def test_delete_phone_number(self): + """Test case for delete_phone_number + + """ + pass + + def test_get_emergency_address(self): + """Test case for get_emergency_address + + """ + pass + + def test_get_emergency_addresses(self): + """Test case for get_emergency_addresses + + """ + pass + + def test_get_phone_number(self): + """Test case for get_phone_number + + """ + pass + + def test_get_phone_numbers(self): + """Test case for get_phone_numbers + + """ + pass + + def test_get_phone_plans(self): + """Test case for get_phone_plans + + """ + pass + + def test_test_phone_number_send_sms(self): + """Test case for test_phone_number_send_sms + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_phone_number_dto.py b/test/test_phone_number_dto.py new file mode 100644 index 00000000..1da3a28c --- /dev/null +++ b/test/test_phone_number_dto.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.phone_number_dto import PhoneNumberDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPhoneNumberDto(unittest.TestCase): + """PhoneNumberDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PhoneNumberDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.phone_number_dto.PhoneNumberDto() # noqa: E501 + if include_optional : + return PhoneNumberDto( + id = '0', + user_id = '0', + compliance_address = '0', + emergency_address = '0', + phone_number = '0', + phone_country = 'US', + phone_plan = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return PhoneNumberDto( + id = '0', + user_id = '0', + phone_number = '0', + phone_country = 'US', + phone_plan = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testPhoneNumberDto(self): + """Test PhoneNumberDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_phone_number_projection.py b/test/test_phone_number_projection.py new file mode 100644 index 00000000..10649626 --- /dev/null +++ b/test/test_phone_number_projection.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.phone_number_projection import PhoneNumberProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPhoneNumberProjection(unittest.TestCase): + """PhoneNumberProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PhoneNumberProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.phone_number_projection.PhoneNumberProjection() # noqa: E501 + if include_optional : + return PhoneNumberProjection( + id = '0', + user_id = '0', + phone_number = '0', + phone_country = 'US', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return PhoneNumberProjection( + id = '0', + user_id = '0', + phone_number = '0', + phone_country = 'US', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testPhoneNumberProjection(self): + """Test PhoneNumberProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_phone_plan_dto.py b/test/test_phone_plan_dto.py new file mode 100644 index 00000000..0dc41573 --- /dev/null +++ b/test/test_phone_plan_dto.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.phone_plan_dto import PhonePlanDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestPhonePlanDto(unittest.TestCase): + """PhonePlanDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test PhonePlanDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.phone_plan_dto.PhonePlanDto() # noqa: E501 + if include_optional : + return PhonePlanDto( + id = '0', + user_id = '0', + phone_country = 'US', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return PhonePlanDto( + id = '0', + user_id = '0', + phone_country = 'US', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testPhonePlanDto(self): + """Test PhonePlanDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_raw_email_json.py b/test/test_raw_email_json.py new file mode 100644 index 00000000..a9c49ee8 --- /dev/null +++ b/test/test_raw_email_json.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.raw_email_json import RawEmailJson # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestRawEmailJson(unittest.TestCase): + """RawEmailJson unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test RawEmailJson + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.raw_email_json.RawEmailJson() # noqa: E501 + if include_optional : + return RawEmailJson( + content = '0' + ) + else : + return RawEmailJson( + content = '0', + ) + + def testRawEmailJson(self): + """Test RawEmailJson""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_recipient.py b/test/test_recipient.py new file mode 100644 index 00000000..f5758c54 --- /dev/null +++ b/test/test_recipient.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.recipient import Recipient # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestRecipient(unittest.TestCase): + """Recipient unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test Recipient + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.recipient.Recipient() # noqa: E501 + if include_optional : + return Recipient( + raw_value = '0', + email_address = '0', + name = '0' + ) + else : + return Recipient( + raw_value = '0', + email_address = '0', + ) + + def testRecipient(self): + """Test Recipient""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_reply_to_alias_email_options.py b/test/test_reply_to_alias_email_options.py new file mode 100644 index 00000000..2492eb4e --- /dev/null +++ b/test/test_reply_to_alias_email_options.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.reply_to_alias_email_options import ReplyToAliasEmailOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestReplyToAliasEmailOptions(unittest.TestCase): + """ReplyToAliasEmailOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ReplyToAliasEmailOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.reply_to_alias_email_options.ReplyToAliasEmailOptions() # noqa: E501 + if include_optional : + return ReplyToAliasEmailOptions( + body = '0', + is_html = True, + charset = '0', + attachments = [ + '0' + ], + template_variables = { + 'key' : None + }, + template = '0', + send_strategy = 'SINGLE_MESSAGE', + use_inbox_name = True, + html = True + ) + else : + return ReplyToAliasEmailOptions( + body = '0', + is_html = True, + ) + + def testReplyToAliasEmailOptions(self): + """Test ReplyToAliasEmailOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_reply_to_email_options.py b/test/test_reply_to_email_options.py new file mode 100644 index 00000000..cc1c020d --- /dev/null +++ b/test/test_reply_to_email_options.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.reply_to_email_options import ReplyToEmailOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestReplyToEmailOptions(unittest.TestCase): + """ReplyToEmailOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ReplyToEmailOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.reply_to_email_options.ReplyToEmailOptions() # noqa: E501 + if include_optional : + return ReplyToEmailOptions( + body = '0', + is_html = True, + _from = '0', + reply_to = '0', + charset = '0', + attachments = [ + '0' + ], + template_variables = { + 'key' : None + }, + template = '0', + send_strategy = 'SINGLE_MESSAGE', + use_inbox_name = True, + html = True + ) + else : + return ReplyToEmailOptions( + body = '0', + is_html = True, + ) + + def testReplyToEmailOptions(self): + """Test ReplyToEmailOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_send_email_options.py b/test/test_send_email_options.py new file mode 100644 index 00000000..e53785e6 --- /dev/null +++ b/test/test_send_email_options.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.send_email_options import SendEmailOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestSendEmailOptions(unittest.TestCase): + """SendEmailOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test SendEmailOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.send_email_options.SendEmailOptions() # noqa: E501 + if include_optional : + return SendEmailOptions( + to_contacts = [ + '0' + ], + to_group = '0', + to = [ + '0' + ], + _from = '0', + cc = [ + '0' + ], + bcc = [ + '0' + ], + subject = '0', + reply_to = '0', + body = '0', + html = True, + is_html = True, + charset = '0', + attachments = [ + '0' + ], + template_variables = { + 'key' : None + }, + template = '0', + send_strategy = 'SINGLE_MESSAGE', + use_inbox_name = True, + add_tracking_pixel = True, + filter_bounced_recipients = True, + validate_email_addresses = 'VALIDATE_FILTER_REMOVE_INVALID' + ) + else : + return SendEmailOptions( + ) + + def testSendEmailOptions(self): + """Test SendEmailOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_send_smtp_envelope_options.py b/test/test_send_smtp_envelope_options.py new file mode 100644 index 00000000..348175d3 --- /dev/null +++ b/test/test_send_smtp_envelope_options.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.send_smtp_envelope_options import SendSMTPEnvelopeOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestSendSMTPEnvelopeOptions(unittest.TestCase): + """SendSMTPEnvelopeOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test SendSMTPEnvelopeOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.send_smtp_envelope_options.SendSMTPEnvelopeOptions() # noqa: E501 + if include_optional : + return SendSMTPEnvelopeOptions( + rcpt_to = [ + '0' + ], + mail_from = '0', + data = '0' + ) + else : + return SendSMTPEnvelopeOptions( + rcpt_to = [ + '0' + ], + mail_from = '0', + data = '0', + ) + + def testSendSMTPEnvelopeOptions(self): + """Test SendSMTPEnvelopeOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_send_with_queue_result.py b/test/test_send_with_queue_result.py new file mode 100644 index 00000000..0fef747c --- /dev/null +++ b/test/test_send_with_queue_result.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.send_with_queue_result import SendWithQueueResult # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestSendWithQueueResult(unittest.TestCase): + """SendWithQueueResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test SendWithQueueResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.send_with_queue_result.SendWithQueueResult() # noqa: E501 + if include_optional : + return SendWithQueueResult( + id = '0', + user_id = '0', + subject = '0', + inbox_id = '0', + header_id = '0', + delivered = True, + exception_name = '0', + message = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return SendWithQueueResult( + id = '0', + user_id = '0', + header_id = '0', + delivered = True, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testSendWithQueueResult(self): + """Test SendWithQueueResult""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sender.py b/test/test_sender.py new file mode 100644 index 00000000..e6880e66 --- /dev/null +++ b/test/test_sender.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.sender import Sender # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestSender(unittest.TestCase): + """Sender unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test Sender + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.sender.Sender() # noqa: E501 + if include_optional : + return Sender( + raw_value = '0', + email_address = '0', + name = '0' + ) + else : + return Sender( + raw_value = '0', + email_address = '0', + ) + + def testSender(self): + """Test Sender""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sent_email_dto.py b/test/test_sent_email_dto.py new file mode 100644 index 00000000..f63c0a3f --- /dev/null +++ b/test/test_sent_email_dto.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.sent_email_dto import SentEmailDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestSentEmailDto(unittest.TestCase): + """SentEmailDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test SentEmailDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.sent_email_dto.SentEmailDto() # noqa: E501 + if include_optional : + return SentEmailDto( + id = '0', + user_id = '0', + inbox_id = '0', + domain_id = '0', + to = [ + '0' + ], + _from = '0', + reply_to = '0', + cc = [ + '0' + ], + bcc = [ + '0' + ], + attachments = [ + '0' + ], + subject = '0', + body_md5_hash = '0', + body = '0', + to_contacts = [ + '0' + ], + to_group = '0', + charset = '0', + is_html = True, + sent_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + pixel_ids = [ + '0' + ], + message_id = '0', + message_ids = [ + '0' + ], + virtual_send = True, + template_id = '0', + template_variables = { + 'key' : None + }, + html = True + ) + else : + return SentEmailDto( + id = '0', + user_id = '0', + inbox_id = '0', + sent_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testSentEmailDto(self): + """Test SentEmailDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sent_email_projection.py b/test/test_sent_email_projection.py new file mode 100644 index 00000000..96478a85 --- /dev/null +++ b/test/test_sent_email_projection.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.sent_email_projection import SentEmailProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestSentEmailProjection(unittest.TestCase): + """SentEmailProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test SentEmailProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.sent_email_projection.SentEmailProjection() # noqa: E501 + if include_optional : + return SentEmailProjection( + id = '0', + _from = '0', + user_id = '0', + subject = '0', + body_md5_hash = '0', + bcc = [ + '0' + ], + cc = [ + '0' + ], + virtual_send = True, + inbox_id = '0', + attachments = [ + '0' + ], + to = [ + '0' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return SentEmailProjection( + id = '0', + user_id = '0', + bcc = [ + '0' + ], + cc = [ + '0' + ], + virtual_send = True, + inbox_id = '0', + attachments = [ + '0' + ], + to = [ + '0' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testSentEmailProjection(self): + """Test SentEmailProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sent_emails_controller_api.py b/test/test_sent_emails_controller_api.py new file mode 100644 index 00000000..5ff1e57c --- /dev/null +++ b/test/test_sent_emails_controller_api.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import mailslurp_client +from mailslurp_client.api.sent_emails_controller_api import SentEmailsControllerApi # noqa: E501 +from mailslurp_client.rest import ApiException + + +class TestSentEmailsControllerApi(unittest.TestCase): + """SentEmailsControllerApi unit test stubs""" + + def setUp(self): + self.api = mailslurp_client.api.sent_emails_controller_api.SentEmailsControllerApi() # noqa: E501 + + def tearDown(self): + pass + + def test_delete_all_sent_emails(self): + """Test case for delete_all_sent_emails + + Delete all sent email receipts # noqa: E501 + """ + pass + + def test_delete_sent_email(self): + """Test case for delete_sent_email + + Delete sent email receipt # noqa: E501 + """ + pass + + def test_get_all_sent_tracking_pixels(self): + """Test case for get_all_sent_tracking_pixels + + """ + pass + + def test_get_raw_sent_email_contents(self): + """Test case for get_raw_sent_email_contents + + Get raw sent email string. Returns unparsed raw SMTP message with headers and body. # noqa: E501 + """ + pass + + def test_get_raw_sent_email_json(self): + """Test case for get_raw_sent_email_json + + Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format. # noqa: E501 + """ + pass + + def test_get_sent_delivery_status(self): + """Test case for get_sent_delivery_status + + """ + pass + + def test_get_sent_delivery_statuses(self): + """Test case for get_sent_delivery_statuses + + """ + pass + + def test_get_sent_delivery_statuses_by_sent_id(self): + """Test case for get_sent_delivery_statuses_by_sent_id + + """ + pass + + def test_get_sent_email(self): + """Test case for get_sent_email + + Get sent email receipt # noqa: E501 + """ + pass + + def test_get_sent_email_html_content(self): + """Test case for get_sent_email_html_content + + Get sent email HTML content # noqa: E501 + """ + pass + + def test_get_sent_email_preview_ur_ls(self): + """Test case for get_sent_email_preview_ur_ls + + Get sent email URL for viewing in browser or downloading # noqa: E501 + """ + pass + + def test_get_sent_email_tracking_pixels(self): + """Test case for get_sent_email_tracking_pixels + + """ + pass + + def test_get_sent_emails(self): + """Test case for get_sent_emails + + Get all sent emails in paginated form # noqa: E501 + """ + pass + + def test_get_sent_emails_with_queue_results(self): + """Test case for get_sent_emails_with_queue_results + + Get results of email sent with queues in paginated form # noqa: E501 + """ + pass + + def test_get_sent_organization_emails(self): + """Test case for get_sent_organization_emails + + """ + pass + + def test_wait_for_delivery_statuses(self): + """Test case for wait_for_delivery_statuses + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_set_inbox_favourited_options.py b/test/test_set_inbox_favourited_options.py new file mode 100644 index 00000000..5750dcb8 --- /dev/null +++ b/test/test_set_inbox_favourited_options.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.set_inbox_favourited_options import SetInboxFavouritedOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestSetInboxFavouritedOptions(unittest.TestCase): + """SetInboxFavouritedOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test SetInboxFavouritedOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.set_inbox_favourited_options.SetInboxFavouritedOptions() # noqa: E501 + if include_optional : + return SetInboxFavouritedOptions( + state = True + ) + else : + return SetInboxFavouritedOptions( + state = True, + ) + + def testSetInboxFavouritedOptions(self): + """Test SetInboxFavouritedOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_simple_send_email_options.py b/test/test_simple_send_email_options.py new file mode 100644 index 00000000..3be0a78c --- /dev/null +++ b/test/test_simple_send_email_options.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.simple_send_email_options import SimpleSendEmailOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestSimpleSendEmailOptions(unittest.TestCase): + """SimpleSendEmailOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test SimpleSendEmailOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.simple_send_email_options.SimpleSendEmailOptions() # noqa: E501 + if include_optional : + return SimpleSendEmailOptions( + sender_id = '0', + to = '0', + body = '0', + subject = '0' + ) + else : + return SimpleSendEmailOptions( + to = '0', + ) + + def testSimpleSendEmailOptions(self): + """Test SimpleSendEmailOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sms_controller_api.py b/test/test_sms_controller_api.py new file mode 100644 index 00000000..cffbc18a --- /dev/null +++ b/test/test_sms_controller_api.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import mailslurp_client +from mailslurp_client.api.sms_controller_api import SmsControllerApi # noqa: E501 +from mailslurp_client.rest import ApiException + + +class TestSmsControllerApi(unittest.TestCase): + """SmsControllerApi unit test stubs""" + + def setUp(self): + self.api = mailslurp_client.api.sms_controller_api.SmsControllerApi() # noqa: E501 + + def tearDown(self): + pass + + def test_delete_sms_message(self): + """Test case for delete_sms_message + + Delete SMS message. # noqa: E501 + """ + pass + + def test_delete_sms_messages(self): + """Test case for delete_sms_messages + + Delete all SMS messages # noqa: E501 + """ + pass + + def test_get_sms_message(self): + """Test case for get_sms_message + + Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController. # noqa: E501 + """ + pass + + def test_get_sms_messages_paginated(self): + """Test case for get_sms_messages_paginated + + Get all SMS messages in all phone numbers in paginated form. . # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sms_dto.py b/test/test_sms_dto.py new file mode 100644 index 00000000..ab9d563a --- /dev/null +++ b/test/test_sms_dto.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.sms_dto import SmsDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestSmsDto(unittest.TestCase): + """SmsDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test SmsDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.sms_dto.SmsDto() # noqa: E501 + if include_optional : + return SmsDto( + id = '0', + user_id = '0', + phone_number = '0', + from_number = '0', + body = '0', + read = True, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return SmsDto( + id = '0', + user_id = '0', + phone_number = '0', + from_number = '0', + body = '0', + read = True, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testSmsDto(self): + """Test SmsDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sms_match_option.py b/test/test_sms_match_option.py new file mode 100644 index 00000000..3a7d2bf0 --- /dev/null +++ b/test/test_sms_match_option.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.sms_match_option import SmsMatchOption # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestSmsMatchOption(unittest.TestCase): + """SmsMatchOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test SmsMatchOption + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.sms_match_option.SmsMatchOption() # noqa: E501 + if include_optional : + return SmsMatchOption( + field = 'BODY', + should = 'CONTAIN', + value = '0' + ) + else : + return SmsMatchOption( + field = 'BODY', + should = 'CONTAIN', + value = '0', + ) + + def testSmsMatchOption(self): + """Test SmsMatchOption""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sms_preview.py b/test/test_sms_preview.py new file mode 100644 index 00000000..eff01576 --- /dev/null +++ b/test/test_sms_preview.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.sms_preview import SmsPreview # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestSmsPreview(unittest.TestCase): + """SmsPreview unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test SmsPreview + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.sms_preview.SmsPreview() # noqa: E501 + if include_optional : + return SmsPreview( + id = '0', + user_id = '0', + body = '0', + phone_number = '0', + from_number = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return SmsPreview( + id = '0', + user_id = '0', + body = '0', + phone_number = '0', + from_number = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testSmsPreview(self): + """Test SmsPreview""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sms_projection.py b/test/test_sms_projection.py new file mode 100644 index 00000000..718d3090 --- /dev/null +++ b/test/test_sms_projection.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.sms_projection import SmsProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestSmsProjection(unittest.TestCase): + """SmsProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test SmsProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.sms_projection.SmsProjection() # noqa: E501 + if include_optional : + return SmsProjection( + id = '0', + body = '0', + user_id = '0', + phone_number = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + from_number = '0', + read = True + ) + else : + return SmsProjection( + id = '0', + body = '0', + user_id = '0', + phone_number = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + from_number = '0', + read = True, + ) + + def testSmsProjection(self): + """Test SmsProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sort.py b/test/test_sort.py new file mode 100644 index 00000000..55badf10 --- /dev/null +++ b/test/test_sort.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.sort import Sort # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestSort(unittest.TestCase): + """Sort unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test Sort + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.sort.Sort() # noqa: E501 + if include_optional : + return Sort( + empty = True, + sorted = True, + unsorted = True + ) + else : + return Sort( + ) + + def testSort(self): + """Test Sort""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_template_controller_api.py b/test/test_template_controller_api.py new file mode 100644 index 00000000..cea0edc9 --- /dev/null +++ b/test/test_template_controller_api.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import mailslurp_client +from mailslurp_client.api.template_controller_api import TemplateControllerApi # noqa: E501 +from mailslurp_client.rest import ApiException + + +class TestTemplateControllerApi(unittest.TestCase): + """TemplateControllerApi unit test stubs""" + + def setUp(self): + self.api = mailslurp_client.api.template_controller_api.TemplateControllerApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_template(self): + """Test case for create_template + + Create a Template # noqa: E501 + """ + pass + + def test_delete_template(self): + """Test case for delete_template + + Delete email template # noqa: E501 + """ + pass + + def test_get_all_templates(self): + """Test case for get_all_templates + + List templates # noqa: E501 + """ + pass + + def test_get_template(self): + """Test case for get_template + + Get template # noqa: E501 + """ + pass + + def test_get_template_preview_html(self): + """Test case for get_template_preview_html + + Get template preview HTML # noqa: E501 + """ + pass + + def test_get_template_preview_json(self): + """Test case for get_template_preview_json + + Get template preview Json # noqa: E501 + """ + pass + + def test_get_templates(self): + """Test case for get_templates + + List templates # noqa: E501 + """ + pass + + def test_update_template(self): + """Test case for update_template + + Update template # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_template_dto.py b/test/test_template_dto.py new file mode 100644 index 00000000..2ea30967 --- /dev/null +++ b/test/test_template_dto.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.template_dto import TemplateDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestTemplateDto(unittest.TestCase): + """TemplateDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test TemplateDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.template_dto.TemplateDto() # noqa: E501 + if include_optional : + return TemplateDto( + id = '0', + name = '0', + variables = [ + mailslurp_client.models.template_variable.TemplateVariable( + name = '0', + variable_type = 'STRING', ) + ], + content = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return TemplateDto( + id = '0', + name = '0', + variables = [ + mailslurp_client.models.template_variable.TemplateVariable( + name = '0', + variable_type = 'STRING', ) + ], + content = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testTemplateDto(self): + """Test TemplateDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_template_preview.py b/test/test_template_preview.py new file mode 100644 index 00000000..c5420895 --- /dev/null +++ b/test/test_template_preview.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.template_preview import TemplatePreview # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestTemplatePreview(unittest.TestCase): + """TemplatePreview unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test TemplatePreview + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.template_preview.TemplatePreview() # noqa: E501 + if include_optional : + return TemplatePreview( + preview = '0' + ) + else : + return TemplatePreview( + preview = '0', + ) + + def testTemplatePreview(self): + """Test TemplatePreview""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_template_projection.py b/test/test_template_projection.py new file mode 100644 index 00000000..1822dfd4 --- /dev/null +++ b/test/test_template_projection.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.template_projection import TemplateProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestTemplateProjection(unittest.TestCase): + """TemplateProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test TemplateProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.template_projection.TemplateProjection() # noqa: E501 + if include_optional : + return TemplateProjection( + name = '0', + id = '0', + variables = [ + '0' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return TemplateProjection( + name = '0', + id = '0', + variables = [ + '0' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testTemplateProjection(self): + """Test TemplateProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_template_variable.py b/test/test_template_variable.py new file mode 100644 index 00000000..0e0754b5 --- /dev/null +++ b/test/test_template_variable.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.template_variable import TemplateVariable # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestTemplateVariable(unittest.TestCase): + """TemplateVariable unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test TemplateVariable + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.template_variable.TemplateVariable() # noqa: E501 + if include_optional : + return TemplateVariable( + name = '0', + variable_type = 'STRING' + ) + else : + return TemplateVariable( + name = '0', + variable_type = 'STRING', + ) + + def testTemplateVariable(self): + """Test TemplateVariable""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_test_new_inbox_forwarder_options.py b/test/test_test_new_inbox_forwarder_options.py new file mode 100644 index 00000000..48e702c9 --- /dev/null +++ b/test/test_test_new_inbox_forwarder_options.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.test_new_inbox_forwarder_options import TestNewInboxForwarderOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestTestNewInboxForwarderOptions(unittest.TestCase): + """TestNewInboxForwarderOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test TestNewInboxForwarderOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.test_new_inbox_forwarder_options.TestNewInboxForwarderOptions() # noqa: E501 + if include_optional : + return TestNewInboxForwarderOptions( + inbox_forwarder_test_options = mailslurp_client.models.inbox_forwarder_test_options.InboxForwarderTestOptions( + test_value = '0', ), + create_inbox_forwarder_options = mailslurp_client.models.create_inbox_forwarder_options.CreateInboxForwarderOptions( + field = 'RECIPIENTS', + match = '0', + forward_to_recipients = [ + '0' + ], ) + ) + else : + return TestNewInboxForwarderOptions( + inbox_forwarder_test_options = mailslurp_client.models.inbox_forwarder_test_options.InboxForwarderTestOptions( + test_value = '0', ), + create_inbox_forwarder_options = mailslurp_client.models.create_inbox_forwarder_options.CreateInboxForwarderOptions( + field = 'RECIPIENTS', + match = '0', + forward_to_recipients = [ + '0' + ], ), + ) + + def testTestNewInboxForwarderOptions(self): + """Test TestNewInboxForwarderOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_test_new_inbox_ruleset_options.py b/test/test_test_new_inbox_ruleset_options.py new file mode 100644 index 00000000..304b9b5c --- /dev/null +++ b/test/test_test_new_inbox_ruleset_options.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.test_new_inbox_ruleset_options import TestNewInboxRulesetOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestTestNewInboxRulesetOptions(unittest.TestCase): + """TestNewInboxRulesetOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test TestNewInboxRulesetOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.test_new_inbox_ruleset_options.TestNewInboxRulesetOptions() # noqa: E501 + if include_optional : + return TestNewInboxRulesetOptions( + inbox_ruleset_test_options = mailslurp_client.models.inbox_ruleset_test_options.InboxRulesetTestOptions( + test_target = '0', ), + create_inbox_ruleset_options = mailslurp_client.models.create_inbox_ruleset_options.CreateInboxRulesetOptions( + scope = 'RECEIVING_EMAILS', + action = 'BLOCK', + target = '0', ) + ) + else : + return TestNewInboxRulesetOptions( + inbox_ruleset_test_options = mailslurp_client.models.inbox_ruleset_test_options.InboxRulesetTestOptions( + test_target = '0', ), + create_inbox_ruleset_options = mailslurp_client.models.create_inbox_ruleset_options.CreateInboxRulesetOptions( + scope = 'RECEIVING_EMAILS', + action = 'BLOCK', + target = '0', ), + ) + + def testTestNewInboxRulesetOptions(self): + """Test TestNewInboxRulesetOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_test_phone_number_options.py b/test/test_test_phone_number_options.py new file mode 100644 index 00000000..a0a596ab --- /dev/null +++ b/test/test_test_phone_number_options.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.test_phone_number_options import TestPhoneNumberOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestTestPhoneNumberOptions(unittest.TestCase): + """TestPhoneNumberOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test TestPhoneNumberOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.test_phone_number_options.TestPhoneNumberOptions() # noqa: E501 + if include_optional : + return TestPhoneNumberOptions( + message = '0' + ) + else : + return TestPhoneNumberOptions( + message = '0', + ) + + def testTestPhoneNumberOptions(self): + """Test TestPhoneNumberOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_thread_projection.py b/test/test_thread_projection.py new file mode 100644 index 00000000..7557b1b1 --- /dev/null +++ b/test/test_thread_projection.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.thread_projection import ThreadProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestThreadProjection(unittest.TestCase): + """ThreadProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ThreadProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.thread_projection.ThreadProjection() # noqa: E501 + if include_optional : + return ThreadProjection( + name = '0', + id = '0', + subject = '0', + inbox_id = '0', + user_id = '0', + to = [ + '0' + ], + bcc = [ + '0' + ], + cc = [ + '0' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + alias_id = '0' + ) + else : + return ThreadProjection( + id = '0', + inbox_id = '0', + user_id = '0', + to = [ + '0' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + alias_id = '0', + ) + + def testThreadProjection(self): + """Test ThreadProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tracking_controller_api.py b/test/test_tracking_controller_api.py new file mode 100644 index 00000000..2daf66ab --- /dev/null +++ b/test/test_tracking_controller_api.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import mailslurp_client +from mailslurp_client.api.tracking_controller_api import TrackingControllerApi # noqa: E501 +from mailslurp_client.rest import ApiException + + +class TestTrackingControllerApi(unittest.TestCase): + """TrackingControllerApi unit test stubs""" + + def setUp(self): + self.api = mailslurp_client.api.tracking_controller_api.TrackingControllerApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_tracking_pixel(self): + """Test case for create_tracking_pixel + + Create tracking pixel # noqa: E501 + """ + pass + + def test_get_all_tracking_pixels(self): + """Test case for get_all_tracking_pixels + + Get tracking pixels # noqa: E501 + """ + pass + + def test_get_tracking_pixel(self): + """Test case for get_tracking_pixel + + Get pixel # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tracking_pixel_dto.py b/test/test_tracking_pixel_dto.py new file mode 100644 index 00000000..a65b2e80 --- /dev/null +++ b/test/test_tracking_pixel_dto.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.tracking_pixel_dto import TrackingPixelDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestTrackingPixelDto(unittest.TestCase): + """TrackingPixelDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test TrackingPixelDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.tracking_pixel_dto.TrackingPixelDto() # noqa: E501 + if include_optional : + return TrackingPixelDto( + id = '0', + seen = True, + recipient = '0', + html = '0', + url = '0', + inbox_id = '0', + sent_email_id = '0', + seen_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return TrackingPixelDto( + id = '0', + seen = True, + html = '0', + url = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testTrackingPixelDto(self): + """Test TrackingPixelDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tracking_pixel_projection.py b/test/test_tracking_pixel_projection.py new file mode 100644 index 00000000..21c48542 --- /dev/null +++ b/test/test_tracking_pixel_projection.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.tracking_pixel_projection import TrackingPixelProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestTrackingPixelProjection(unittest.TestCase): + """TrackingPixelProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test TrackingPixelProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.tracking_pixel_projection.TrackingPixelProjection() # noqa: E501 + if include_optional : + return TrackingPixelProjection( + name = '0', + id = '0', + inbox_id = '0', + user_id = '0', + sent_email_id = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + recipient = '0', + seen = True, + seen_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return TrackingPixelProjection( + id = '0', + user_id = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + seen = True, + ) + + def testTrackingPixelProjection(self): + """Test TrackingPixelProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_unknown_missed_email_projection.py b/test/test_unknown_missed_email_projection.py new file mode 100644 index 00000000..18bc090b --- /dev/null +++ b/test/test_unknown_missed_email_projection.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.unknown_missed_email_projection import UnknownMissedEmailProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestUnknownMissedEmailProjection(unittest.TestCase): + """UnknownMissedEmailProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test UnknownMissedEmailProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.unknown_missed_email_projection.UnknownMissedEmailProjection() # noqa: E501 + if include_optional : + return UnknownMissedEmailProjection( + id = '0', + _from = '0', + subject = '0', + to = [ + '0' + ], + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return UnknownMissedEmailProjection( + id = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testUnknownMissedEmailProjection(self): + """Test UnknownMissedEmailProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_unread_count.py b/test/test_unread_count.py new file mode 100644 index 00000000..42aeede4 --- /dev/null +++ b/test/test_unread_count.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.unread_count import UnreadCount # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestUnreadCount(unittest.TestCase): + """UnreadCount unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test UnreadCount + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.unread_count.UnreadCount() # noqa: E501 + if include_optional : + return UnreadCount( + count = 56 + ) + else : + return UnreadCount( + count = 56, + ) + + def testUnreadCount(self): + """Test UnreadCount""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_unseen_error_count_dto.py b/test/test_unseen_error_count_dto.py new file mode 100644 index 00000000..56a29550 --- /dev/null +++ b/test/test_unseen_error_count_dto.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.unseen_error_count_dto import UnseenErrorCountDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestUnseenErrorCountDto(unittest.TestCase): + """UnseenErrorCountDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test UnseenErrorCountDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.unseen_error_count_dto.UnseenErrorCountDto() # noqa: E501 + if include_optional : + return UnseenErrorCountDto( + count = 56 + ) + else : + return UnseenErrorCountDto( + count = 56, + ) + + def testUnseenErrorCountDto(self): + """Test UnseenErrorCountDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_alias_options.py b/test/test_update_alias_options.py new file mode 100644 index 00000000..846e4761 --- /dev/null +++ b/test/test_update_alias_options.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.update_alias_options import UpdateAliasOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestUpdateAliasOptions(unittest.TestCase): + """UpdateAliasOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test UpdateAliasOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.update_alias_options.UpdateAliasOptions() # noqa: E501 + if include_optional : + return UpdateAliasOptions( + name = '0' + ) + else : + return UpdateAliasOptions( + ) + + def testUpdateAliasOptions(self): + """Test UpdateAliasOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_domain_options.py b/test/test_update_domain_options.py new file mode 100644 index 00000000..f030098e --- /dev/null +++ b/test/test_update_domain_options.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.update_domain_options import UpdateDomainOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestUpdateDomainOptions(unittest.TestCase): + """UpdateDomainOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test UpdateDomainOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.update_domain_options.UpdateDomainOptions() # noqa: E501 + if include_optional : + return UpdateDomainOptions( + catch_all_inbox_id = '0' + ) + else : + return UpdateDomainOptions( + ) + + def testUpdateDomainOptions(self): + """Test UpdateDomainOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_group_contacts.py b/test/test_update_group_contacts.py new file mode 100644 index 00000000..6dcb3cd3 --- /dev/null +++ b/test/test_update_group_contacts.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.update_group_contacts import UpdateGroupContacts # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestUpdateGroupContacts(unittest.TestCase): + """UpdateGroupContacts unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test UpdateGroupContacts + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.update_group_contacts.UpdateGroupContacts() # noqa: E501 + if include_optional : + return UpdateGroupContacts( + contact_ids = [ + '0' + ] + ) + else : + return UpdateGroupContacts( + contact_ids = [ + '0' + ], + ) + + def testUpdateGroupContacts(self): + """Test UpdateGroupContacts""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_inbox_options.py b/test/test_update_inbox_options.py new file mode 100644 index 00000000..fb9ee8c5 --- /dev/null +++ b/test/test_update_inbox_options.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.update_inbox_options import UpdateInboxOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestUpdateInboxOptions(unittest.TestCase): + """UpdateInboxOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test UpdateInboxOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.update_inbox_options.UpdateInboxOptions() # noqa: E501 + if include_optional : + return UpdateInboxOptions( + name = '0', + description = '0', + tags = [ + '0' + ], + expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + favourite = True + ) + else : + return UpdateInboxOptions( + ) + + def testUpdateInboxOptions(self): + """Test UpdateInboxOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_upload_attachment_options.py b/test/test_upload_attachment_options.py new file mode 100644 index 00000000..1b4a32b0 --- /dev/null +++ b/test/test_upload_attachment_options.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.upload_attachment_options import UploadAttachmentOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestUploadAttachmentOptions(unittest.TestCase): + """UploadAttachmentOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test UploadAttachmentOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.upload_attachment_options.UploadAttachmentOptions() # noqa: E501 + if include_optional : + return UploadAttachmentOptions( + content_type = '0', + filename = '0', + base64_contents = '0' + ) + else : + return UploadAttachmentOptions( + base64_contents = '0', + ) + + def testUploadAttachmentOptions(self): + """Test UploadAttachmentOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_user_info_dto.py b/test/test_user_info_dto.py new file mode 100644 index 00000000..87956bd8 --- /dev/null +++ b/test/test_user_info_dto.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.user_info_dto import UserInfoDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestUserInfoDto(unittest.TestCase): + """UserInfoDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test UserInfoDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.user_info_dto.UserInfoDto() # noqa: E501 + if include_optional : + return UserInfoDto( + id = '0', + email_address = '0', + account_state = 'FROZEN', + subscription_type = 'PRO_MONTHLY', + account_type = 'SOLO', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return UserInfoDto( + id = '0', + email_address = '0', + account_state = 'FROZEN', + account_type = 'SOLO', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testUserInfoDto(self): + """Test UserInfoDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_validate_email_address_list_options.py b/test/test_validate_email_address_list_options.py new file mode 100644 index 00000000..48a050ab --- /dev/null +++ b/test/test_validate_email_address_list_options.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.validate_email_address_list_options import ValidateEmailAddressListOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestValidateEmailAddressListOptions(unittest.TestCase): + """ValidateEmailAddressListOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ValidateEmailAddressListOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.validate_email_address_list_options.ValidateEmailAddressListOptions() # noqa: E501 + if include_optional : + return ValidateEmailAddressListOptions( + email_address_list = [ + '0' + ] + ) + else : + return ValidateEmailAddressListOptions( + email_address_list = [ + '0' + ], + ) + + def testValidateEmailAddressListOptions(self): + """Test ValidateEmailAddressListOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_validate_email_address_list_result.py b/test/test_validate_email_address_list_result.py new file mode 100644 index 00000000..7f4a9e23 --- /dev/null +++ b/test/test_validate_email_address_list_result.py @@ -0,0 +1,70 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.validate_email_address_list_result import ValidateEmailAddressListResult # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestValidateEmailAddressListResult(unittest.TestCase): + """ValidateEmailAddressListResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ValidateEmailAddressListResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.validate_email_address_list_result.ValidateEmailAddressListResult() # noqa: E501 + if include_optional : + return ValidateEmailAddressListResult( + valid_email_addresses = [ + '0' + ], + invalid_email_addresses = [ + '0' + ], + result_map_email_address_is_valid = { + 'key' : True + } + ) + else : + return ValidateEmailAddressListResult( + valid_email_addresses = [ + '0' + ], + invalid_email_addresses = [ + '0' + ], + result_map_email_address_is_valid = { + 'key' : True + }, + ) + + def testValidateEmailAddressListResult(self): + """Test ValidateEmailAddressListResult""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_validation_dto.py b/test/test_validation_dto.py new file mode 100644 index 00000000..f69abc40 --- /dev/null +++ b/test/test_validation_dto.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.validation_dto import ValidationDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestValidationDto(unittest.TestCase): + """ValidationDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ValidationDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.validation_dto.ValidationDto() # noqa: E501 + if include_optional : + return ValidationDto( + email_id = '0', + html = mailslurp_client.models.html_validation_result.HTMLValidationResult( + is_valid = True, + errors = [ + mailslurp_client.models.validation_message.ValidationMessage( + line_number = 56, + message = '0', ) + ], + warnings = [ + mailslurp_client.models.validation_message.ValidationMessage( + line_number = 56, + message = '0', ) + ], ) + ) + else : + return ValidationDto( + email_id = '0', + html = mailslurp_client.models.html_validation_result.HTMLValidationResult( + is_valid = True, + errors = [ + mailslurp_client.models.validation_message.ValidationMessage( + line_number = 56, + message = '0', ) + ], + warnings = [ + mailslurp_client.models.validation_message.ValidationMessage( + line_number = 56, + message = '0', ) + ], ), + ) + + def testValidationDto(self): + """Test ValidationDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_validation_message.py b/test/test_validation_message.py new file mode 100644 index 00000000..f614d361 --- /dev/null +++ b/test/test_validation_message.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.validation_message import ValidationMessage # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestValidationMessage(unittest.TestCase): + """ValidationMessage unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test ValidationMessage + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.validation_message.ValidationMessage() # noqa: E501 + if include_optional : + return ValidationMessage( + line_number = 56, + message = '0' + ) + else : + return ValidationMessage( + line_number = 56, + ) + + def testValidationMessage(self): + """Test ValidationMessage""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_verify_email_address_options.py b/test/test_verify_email_address_options.py new file mode 100644 index 00000000..2e1373ee --- /dev/null +++ b/test/test_verify_email_address_options.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.verify_email_address_options import VerifyEmailAddressOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestVerifyEmailAddressOptions(unittest.TestCase): + """VerifyEmailAddressOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test VerifyEmailAddressOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.verify_email_address_options.VerifyEmailAddressOptions() # noqa: E501 + if include_optional : + return VerifyEmailAddressOptions( + mail_server_domain = '0', + email_address = '0', + sender_email_address = '0', + port = 56 + ) + else : + return VerifyEmailAddressOptions( + email_address = '0', + ) + + def testVerifyEmailAddressOptions(self): + """Test VerifyEmailAddressOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_verify_webhook_signature_options.py b/test/test_verify_webhook_signature_options.py new file mode 100644 index 00000000..c4b57205 --- /dev/null +++ b/test/test_verify_webhook_signature_options.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.verify_webhook_signature_options import VerifyWebhookSignatureOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestVerifyWebhookSignatureOptions(unittest.TestCase): + """VerifyWebhookSignatureOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test VerifyWebhookSignatureOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.verify_webhook_signature_options.VerifyWebhookSignatureOptions() # noqa: E501 + if include_optional : + return VerifyWebhookSignatureOptions( + message_id = '0', + signature = '0' + ) + else : + return VerifyWebhookSignatureOptions( + message_id = '0', + signature = '0', + ) + + def testVerifyWebhookSignatureOptions(self): + """Test VerifyWebhookSignatureOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_verify_webhook_signature_results.py b/test/test_verify_webhook_signature_results.py new file mode 100644 index 00000000..6d9183d9 --- /dev/null +++ b/test/test_verify_webhook_signature_results.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.verify_webhook_signature_results import VerifyWebhookSignatureResults # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestVerifyWebhookSignatureResults(unittest.TestCase): + """VerifyWebhookSignatureResults unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test VerifyWebhookSignatureResults + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.verify_webhook_signature_results.VerifyWebhookSignatureResults() # noqa: E501 + if include_optional : + return VerifyWebhookSignatureResults( + is_valid = True + ) + else : + return VerifyWebhookSignatureResults( + is_valid = True, + ) + + def testVerifyWebhookSignatureResults(self): + """Test VerifyWebhookSignatureResults""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_wait_for_conditions.py b/test/test_wait_for_conditions.py new file mode 100644 index 00000000..6038b21a --- /dev/null +++ b/test/test_wait_for_conditions.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.wait_for_conditions import WaitForConditions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestWaitForConditions(unittest.TestCase): + """WaitForConditions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test WaitForConditions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.wait_for_conditions.WaitForConditions() # noqa: E501 + if include_optional : + return WaitForConditions( + inbox_id = '0', + count = 56, + delay_timeout = 56, + timeout = 56, + unread_only = True, + count_type = 'EXACTLY', + matches = [ + mailslurp_client.models.match_option.MatchOption( + field = 'SUBJECT', + should = 'CONTAIN', + value = '0', ) + ], + sort_direction = 'ASC', + since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + before = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return WaitForConditions( + inbox_id = '0', + timeout = 56, + ) + + def testWaitForConditions(self): + """Test WaitForConditions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_wait_for_controller_api.py b/test/test_wait_for_controller_api.py new file mode 100644 index 00000000..a1155e39 --- /dev/null +++ b/test/test_wait_for_controller_api.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import mailslurp_client +from mailslurp_client.api.wait_for_controller_api import WaitForControllerApi # noqa: E501 +from mailslurp_client.rest import ApiException + + +class TestWaitForControllerApi(unittest.TestCase): + """WaitForControllerApi unit test stubs""" + + def setUp(self): + self.api = mailslurp_client.api.wait_for_controller_api.WaitForControllerApi() # noqa: E501 + + def tearDown(self): + pass + + def test_wait_for(self): + """Test case for wait_for + + Wait for an email to match the provided filter conditions such as subject contains keyword. # noqa: E501 + """ + pass + + def test_wait_for_email_count(self): + """Test case for wait_for_email_count + + Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs # noqa: E501 + """ + pass + + def test_wait_for_latest_email(self): + """Test case for wait_for_latest_email + + Fetch inbox's latest email or if empty wait for an email to arrive # noqa: E501 + """ + pass + + def test_wait_for_latest_sms(self): + """Test case for wait_for_latest_sms + + Wait for the latest SMS message to match the provided filter conditions such as body contains keyword. # noqa: E501 + """ + pass + + def test_wait_for_matching_emails(self): + """Test case for wait_for_matching_emails + + Wait or return list of emails that match simple matching patterns # noqa: E501 + """ + pass + + def test_wait_for_matching_first_email(self): + """Test case for wait_for_matching_first_email + + Wait for or return the first email that matches provided MatchOptions array # noqa: E501 + """ + pass + + def test_wait_for_nth_email(self): + """Test case for wait_for_nth_email + + Wait for or fetch the email with a given index in the inbox specified. If index doesn't exist waits for it to exist or timeout to occur. # noqa: E501 + """ + pass + + def test_wait_for_sms(self): + """Test case for wait_for_sms + + Wait for an SMS message to match the provided filter conditions such as body contains keyword. # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_wait_for_single_sms_options.py b/test/test_wait_for_single_sms_options.py new file mode 100644 index 00000000..50d976b8 --- /dev/null +++ b/test/test_wait_for_single_sms_options.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.wait_for_single_sms_options import WaitForSingleSmsOptions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestWaitForSingleSmsOptions(unittest.TestCase): + """WaitForSingleSmsOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test WaitForSingleSmsOptions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.wait_for_single_sms_options.WaitForSingleSmsOptions() # noqa: E501 + if include_optional : + return WaitForSingleSmsOptions( + phone_number_id = '0', + timeout = 56, + unread_only = True, + before = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + sort_direction = 'ASC', + delay = 56 + ) + else : + return WaitForSingleSmsOptions( + phone_number_id = '0', + timeout = 56, + ) + + def testWaitForSingleSmsOptions(self): + """Test WaitForSingleSmsOptions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_wait_for_sms_conditions.py b/test/test_wait_for_sms_conditions.py new file mode 100644 index 00000000..ff32d761 --- /dev/null +++ b/test/test_wait_for_sms_conditions.py @@ -0,0 +1,71 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.wait_for_sms_conditions import WaitForSmsConditions # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestWaitForSmsConditions(unittest.TestCase): + """WaitForSmsConditions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test WaitForSmsConditions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.wait_for_sms_conditions.WaitForSmsConditions() # noqa: E501 + if include_optional : + return WaitForSmsConditions( + phone_number_id = '0', + limit = 56, + count = 56, + delay_timeout = 56, + timeout = 56, + unread_only = True, + count_type = 'EXACTLY', + matches = [ + mailslurp_client.models.sms_match_option.SmsMatchOption( + field = 'BODY', + should = 'CONTAIN', + value = '0', ) + ], + sort_direction = 'ASC', + since = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + before = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return WaitForSmsConditions( + phone_number_id = '0', + count = 56, + timeout = 56, + ) + + def testWaitForSmsConditions(self): + """Test WaitForSmsConditions""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhook_bounce_payload.py b/test/test_webhook_bounce_payload.py new file mode 100644 index 00000000..4fd7e35e --- /dev/null +++ b/test/test_webhook_bounce_payload.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.webhook_bounce_payload import WebhookBouncePayload # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestWebhookBouncePayload(unittest.TestCase): + """WebhookBouncePayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test WebhookBouncePayload + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.webhook_bounce_payload.WebhookBouncePayload() # noqa: E501 + if include_optional : + return WebhookBouncePayload( + message_id = '0', + webhook_id = '0', + event_name = 'EMAIL_RECEIVED', + webhook_name = '0', + bounce_id = '0', + sent_to_recipients = [ + '0' + ], + sender = '0', + bounce_recipients = [ + '0' + ] + ) + else : + return WebhookBouncePayload( + message_id = '0', + webhook_id = '0', + event_name = 'EMAIL_RECEIVED', + bounce_id = '0', + sender = '0', + ) + + def testWebhookBouncePayload(self): + """Test WebhookBouncePayload""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhook_bounce_recipient_payload.py b/test/test_webhook_bounce_recipient_payload.py new file mode 100644 index 00000000..4f3a9e81 --- /dev/null +++ b/test/test_webhook_bounce_recipient_payload.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.webhook_bounce_recipient_payload import WebhookBounceRecipientPayload # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestWebhookBounceRecipientPayload(unittest.TestCase): + """WebhookBounceRecipientPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test WebhookBounceRecipientPayload + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.webhook_bounce_recipient_payload.WebhookBounceRecipientPayload() # noqa: E501 + if include_optional : + return WebhookBounceRecipientPayload( + message_id = '0', + webhook_id = '0', + event_name = 'EMAIL_RECEIVED', + webhook_name = '0', + recipient = '0' + ) + else : + return WebhookBounceRecipientPayload( + message_id = '0', + webhook_id = '0', + event_name = 'EMAIL_RECEIVED', + recipient = '0', + ) + + def testWebhookBounceRecipientPayload(self): + """Test WebhookBounceRecipientPayload""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhook_controller_api.py b/test/test_webhook_controller_api.py new file mode 100644 index 00000000..d016a6ff --- /dev/null +++ b/test/test_webhook_controller_api.py @@ -0,0 +1,250 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest + +import mailslurp_client +from mailslurp_client.api.webhook_controller_api import WebhookControllerApi # noqa: E501 +from mailslurp_client.rest import ApiException + + +class TestWebhookControllerApi(unittest.TestCase): + """WebhookControllerApi unit test stubs""" + + def setUp(self): + self.api = mailslurp_client.api.webhook_controller_api.WebhookControllerApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_account_webhook(self): + """Test case for create_account_webhook + + Attach a WebHook URL to an inbox # noqa: E501 + """ + pass + + def test_create_webhook(self): + """Test case for create_webhook + + Attach a WebHook URL to an inbox # noqa: E501 + """ + pass + + def test_create_webhook_for_phone_number(self): + """Test case for create_webhook_for_phone_number + + Attach a WebHook URL to a phone number # noqa: E501 + """ + pass + + def test_delete_all_webhooks(self): + """Test case for delete_all_webhooks + + Delete all webhooks # noqa: E501 + """ + pass + + def test_delete_webhook(self): + """Test case for delete_webhook + + Delete and disable a Webhook for an Inbox # noqa: E501 + """ + pass + + def test_delete_webhook_by_id(self): + """Test case for delete_webhook_by_id + + Delete a webhook # noqa: E501 + """ + pass + + def test_get_all_webhook_results(self): + """Test case for get_all_webhook_results + + Get results for all webhooks # noqa: E501 + """ + pass + + def test_get_all_webhooks(self): + """Test case for get_all_webhooks + + List Webhooks Paginated # noqa: E501 + """ + pass + + def test_get_inbox_webhooks_paginated(self): + """Test case for get_inbox_webhooks_paginated + + Get paginated webhooks for an Inbox # noqa: E501 + """ + pass + + def test_get_json_schema_for_webhook_event(self): + """Test case for get_json_schema_for_webhook_event + + """ + pass + + def test_get_json_schema_for_webhook_payload(self): + """Test case for get_json_schema_for_webhook_payload + + """ + pass + + def test_get_phone_number_webhooks_paginated(self): + """Test case for get_phone_number_webhooks_paginated + + Get paginated webhooks for a phone number # noqa: E501 + """ + pass + + def test_get_test_webhook_payload(self): + """Test case for get_test_webhook_payload + + """ + pass + + def test_get_test_webhook_payload_bounce(self): + """Test case for get_test_webhook_payload_bounce + + """ + pass + + def test_get_test_webhook_payload_bounce_recipient(self): + """Test case for get_test_webhook_payload_bounce_recipient + + """ + pass + + def test_get_test_webhook_payload_delivery_status(self): + """Test case for get_test_webhook_payload_delivery_status + + Get webhook test payload for delivery status event # noqa: E501 + """ + pass + + def test_get_test_webhook_payload_email_opened(self): + """Test case for get_test_webhook_payload_email_opened + + """ + pass + + def test_get_test_webhook_payload_email_read(self): + """Test case for get_test_webhook_payload_email_read + + """ + pass + + def test_get_test_webhook_payload_for_webhook(self): + """Test case for get_test_webhook_payload_for_webhook + + """ + pass + + def test_get_test_webhook_payload_new_attachment(self): + """Test case for get_test_webhook_payload_new_attachment + + Get webhook test payload for new attachment event # noqa: E501 + """ + pass + + def test_get_test_webhook_payload_new_contact(self): + """Test case for get_test_webhook_payload_new_contact + + Get webhook test payload for new contact event # noqa: E501 + """ + pass + + def test_get_test_webhook_payload_new_email(self): + """Test case for get_test_webhook_payload_new_email + + Get webhook test payload for new email event # noqa: E501 + """ + pass + + def test_get_test_webhook_payload_new_sms(self): + """Test case for get_test_webhook_payload_new_sms + + Get webhook test payload for new sms event # noqa: E501 + """ + pass + + def test_get_webhook(self): + """Test case for get_webhook + + Get a webhook # noqa: E501 + """ + pass + + def test_get_webhook_result(self): + """Test case for get_webhook_result + + Get a webhook result for a webhook # noqa: E501 + """ + pass + + def test_get_webhook_results(self): + """Test case for get_webhook_results + + Get a webhook results for a webhook # noqa: E501 + """ + pass + + def test_get_webhook_results_unseen_error_count(self): + """Test case for get_webhook_results_unseen_error_count + + Get count of unseen webhook results with error status # noqa: E501 + """ + pass + + def test_get_webhooks(self): + """Test case for get_webhooks + + Get all webhooks for an Inbox # noqa: E501 + """ + pass + + def test_redrive_webhook_result(self): + """Test case for redrive_webhook_result + + Get a webhook result and try to resend the original webhook payload # noqa: E501 + """ + pass + + def test_send_test_data(self): + """Test case for send_test_data + + Send webhook test data # noqa: E501 + """ + pass + + def test_update_webhook_headers(self): + """Test case for update_webhook_headers + + Update a webhook request headers # noqa: E501 + """ + pass + + def test_verify_webhook_signature(self): + """Test case for verify_webhook_signature + + Verify a webhook payload signature # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhook_delivery_status_payload.py b/test/test_webhook_delivery_status_payload.py new file mode 100644 index 00000000..a329ed7e --- /dev/null +++ b/test/test_webhook_delivery_status_payload.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.webhook_delivery_status_payload import WebhookDeliveryStatusPayload # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestWebhookDeliveryStatusPayload(unittest.TestCase): + """WebhookDeliveryStatusPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test WebhookDeliveryStatusPayload + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.webhook_delivery_status_payload.WebhookDeliveryStatusPayload() # noqa: E501 + if include_optional : + return WebhookDeliveryStatusPayload( + message_id = '0', + webhook_id = '0', + event_name = 'EMAIL_RECEIVED', + webhook_name = '0', + id = '0', + user_id = '0', + sent_id = '0', + remote_mta_ip = '0', + inbox_id = '0', + reporting_mta = '0', + recipients = [ + '0' + ], + smtp_response = '0', + smtp_status_code = 56, + processing_time_millis = 56, + received = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + subject = '0' + ) + else : + return WebhookDeliveryStatusPayload( + message_id = '0', + webhook_id = '0', + event_name = 'EMAIL_RECEIVED', + id = '0', + user_id = '0', + ) + + def testWebhookDeliveryStatusPayload(self): + """Test WebhookDeliveryStatusPayload""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhook_dto.py b/test/test_webhook_dto.py new file mode 100644 index 00000000..22f38d70 --- /dev/null +++ b/test/test_webhook_dto.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.webhook_dto import WebhookDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestWebhookDto(unittest.TestCase): + """WebhookDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test WebhookDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.webhook_dto.WebhookDto() # noqa: E501 + if include_optional : + return WebhookDto( + id = '0', + user_id = '0', + basic_auth = True, + name = '0', + phone_id = '0', + inbox_id = '0', + url = '0', + method = 'GET', + payload_json_schema = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + event_name = 'EMAIL_RECEIVED', + request_headers = mailslurp_client.models.webhook_headers.WebhookHeaders( + headers = [ + mailslurp_client.models.webhook_header_name_value.WebhookHeaderNameValue( + name = '0', + value = '0', ) + ], ) + ) + else : + return WebhookDto( + id = '0', + user_id = '0', + basic_auth = True, + url = '0', + method = 'GET', + payload_json_schema = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testWebhookDto(self): + """Test WebhookDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhook_email_opened_payload.py b/test/test_webhook_email_opened_payload.py new file mode 100644 index 00000000..132f5f33 --- /dev/null +++ b/test/test_webhook_email_opened_payload.py @@ -0,0 +1,69 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.webhook_email_opened_payload import WebhookEmailOpenedPayload # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestWebhookEmailOpenedPayload(unittest.TestCase): + """WebhookEmailOpenedPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test WebhookEmailOpenedPayload + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.webhook_email_opened_payload.WebhookEmailOpenedPayload() # noqa: E501 + if include_optional : + return WebhookEmailOpenedPayload( + message_id = '0', + webhook_id = '0', + event_name = 'EMAIL_RECEIVED', + webhook_name = '0', + inbox_id = '0', + pixel_id = '0', + sent_email_id = '0', + recipient = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return WebhookEmailOpenedPayload( + message_id = '0', + webhook_id = '0', + event_name = 'EMAIL_RECEIVED', + inbox_id = '0', + pixel_id = '0', + sent_email_id = '0', + recipient = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testWebhookEmailOpenedPayload(self): + """Test WebhookEmailOpenedPayload""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhook_email_read_payload.py b/test/test_webhook_email_read_payload.py new file mode 100644 index 00000000..d70c6ddd --- /dev/null +++ b/test/test_webhook_email_read_payload.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.webhook_email_read_payload import WebhookEmailReadPayload # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestWebhookEmailReadPayload(unittest.TestCase): + """WebhookEmailReadPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test WebhookEmailReadPayload + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.webhook_email_read_payload.WebhookEmailReadPayload() # noqa: E501 + if include_optional : + return WebhookEmailReadPayload( + message_id = '0', + webhook_id = '0', + event_name = 'EMAIL_RECEIVED', + webhook_name = '0', + email_id = '0', + inbox_id = '0', + email_is_read = True, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return WebhookEmailReadPayload( + message_id = '0', + webhook_id = '0', + event_name = 'EMAIL_RECEIVED', + email_id = '0', + inbox_id = '0', + email_is_read = True, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testWebhookEmailReadPayload(self): + """Test WebhookEmailReadPayload""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhook_header_name_value.py b/test/test_webhook_header_name_value.py new file mode 100644 index 00000000..e328b10a --- /dev/null +++ b/test/test_webhook_header_name_value.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.webhook_header_name_value import WebhookHeaderNameValue # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestWebhookHeaderNameValue(unittest.TestCase): + """WebhookHeaderNameValue unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test WebhookHeaderNameValue + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.webhook_header_name_value.WebhookHeaderNameValue() # noqa: E501 + if include_optional : + return WebhookHeaderNameValue( + name = '0', + value = '0' + ) + else : + return WebhookHeaderNameValue( + name = '0', + value = '0', + ) + + def testWebhookHeaderNameValue(self): + """Test WebhookHeaderNameValue""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhook_headers.py b/test/test_webhook_headers.py new file mode 100644 index 00000000..81a862c8 --- /dev/null +++ b/test/test_webhook_headers.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.webhook_headers import WebhookHeaders # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestWebhookHeaders(unittest.TestCase): + """WebhookHeaders unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test WebhookHeaders + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.webhook_headers.WebhookHeaders() # noqa: E501 + if include_optional : + return WebhookHeaders( + headers = [ + mailslurp_client.models.webhook_header_name_value.WebhookHeaderNameValue( + name = '0', + value = '0', ) + ] + ) + else : + return WebhookHeaders( + headers = [ + mailslurp_client.models.webhook_header_name_value.WebhookHeaderNameValue( + name = '0', + value = '0', ) + ], + ) + + def testWebhookHeaders(self): + """Test WebhookHeaders""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhook_new_attachment_payload.py b/test/test_webhook_new_attachment_payload.py new file mode 100644 index 00000000..fd16d198 --- /dev/null +++ b/test/test_webhook_new_attachment_payload.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.webhook_new_attachment_payload import WebhookNewAttachmentPayload # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestWebhookNewAttachmentPayload(unittest.TestCase): + """WebhookNewAttachmentPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test WebhookNewAttachmentPayload + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.webhook_new_attachment_payload.WebhookNewAttachmentPayload() # noqa: E501 + if include_optional : + return WebhookNewAttachmentPayload( + message_id = '0', + webhook_id = '0', + webhook_name = '0', + event_name = 'EMAIL_RECEIVED', + attachment_id = '0', + name = '0', + content_type = '0', + content_length = 56 + ) + else : + return WebhookNewAttachmentPayload( + message_id = '0', + webhook_id = '0', + event_name = 'EMAIL_RECEIVED', + attachment_id = '0', + name = '0', + content_type = '0', + content_length = 56, + ) + + def testWebhookNewAttachmentPayload(self): + """Test WebhookNewAttachmentPayload""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhook_new_contact_payload.py b/test/test_webhook_new_contact_payload.py new file mode 100644 index 00000000..2a923a92 --- /dev/null +++ b/test/test_webhook_new_contact_payload.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.webhook_new_contact_payload import WebhookNewContactPayload # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestWebhookNewContactPayload(unittest.TestCase): + """WebhookNewContactPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test WebhookNewContactPayload + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.webhook_new_contact_payload.WebhookNewContactPayload() # noqa: E501 + if include_optional : + return WebhookNewContactPayload( + message_id = '0', + webhook_id = '0', + webhook_name = '0', + event_name = 'EMAIL_RECEIVED', + contact_id = '0', + group_id = '0', + first_name = '0', + last_name = '0', + company = '0', + primary_email_address = '0', + email_addresses = [ + '0' + ], + tags = [ + '0' + ], + meta_data = mailslurp_client.models.meta_data.metaData(), + opt_out = True, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return WebhookNewContactPayload( + message_id = '0', + webhook_id = '0', + event_name = 'EMAIL_RECEIVED', + contact_id = '0', + email_addresses = [ + '0' + ], + tags = [ + '0' + ], + opt_out = True, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testWebhookNewContactPayload(self): + """Test WebhookNewContactPayload""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhook_new_email_payload.py b/test/test_webhook_new_email_payload.py new file mode 100644 index 00000000..2603c788 --- /dev/null +++ b/test/test_webhook_new_email_payload.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.webhook_new_email_payload import WebhookNewEmailPayload # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestWebhookNewEmailPayload(unittest.TestCase): + """WebhookNewEmailPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test WebhookNewEmailPayload + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.webhook_new_email_payload.WebhookNewEmailPayload() # noqa: E501 + if include_optional : + return WebhookNewEmailPayload( + message_id = '0', + webhook_id = '0', + event_name = 'EMAIL_RECEIVED', + webhook_name = '0', + inbox_id = '0', + domain_id = '0', + email_id = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + to = [ + '0' + ], + _from = '0', + cc = [ + '0' + ], + bcc = [ + '0' + ], + subject = '0', + attachment_meta_datas = [ + mailslurp_client.models.attachment_meta_data.Attachment meta data( + name = '0', + content_type = '0', + content_length = 56, + id = '0', ) + ] + ) + else : + return WebhookNewEmailPayload( + message_id = '0', + webhook_id = '0', + event_name = 'EMAIL_RECEIVED', + inbox_id = '0', + email_id = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + to = [ + '0' + ], + _from = '0', + cc = [ + '0' + ], + bcc = [ + '0' + ], + attachment_meta_datas = [ + mailslurp_client.models.attachment_meta_data.Attachment meta data( + name = '0', + content_type = '0', + content_length = 56, + id = '0', ) + ], + ) + + def testWebhookNewEmailPayload(self): + """Test WebhookNewEmailPayload""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhook_new_sms_payload.py b/test/test_webhook_new_sms_payload.py new file mode 100644 index 00000000..9f67d3ea --- /dev/null +++ b/test/test_webhook_new_sms_payload.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.webhook_new_sms_payload import WebhookNewSmsPayload # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestWebhookNewSmsPayload(unittest.TestCase): + """WebhookNewSmsPayload unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test WebhookNewSmsPayload + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.webhook_new_sms_payload.WebhookNewSmsPayload() # noqa: E501 + if include_optional : + return WebhookNewSmsPayload( + message_id = '0', + webhook_id = '0', + event_name = 'EMAIL_RECEIVED', + webhook_name = '0', + sms_id = '0', + user_id = '0', + phone_number = '0', + to_number = '0', + from_number = '0', + body = '0', + read = True + ) + else : + return WebhookNewSmsPayload( + message_id = '0', + webhook_id = '0', + event_name = 'EMAIL_RECEIVED', + sms_id = '0', + user_id = '0', + phone_number = '0', + to_number = '0', + from_number = '0', + body = '0', + read = True, + ) + + def testWebhookNewSmsPayload(self): + """Test WebhookNewSmsPayload""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhook_projection.py b/test/test_webhook_projection.py new file mode 100644 index 00000000..e6ffef77 --- /dev/null +++ b/test/test_webhook_projection.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.webhook_projection import WebhookProjection # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestWebhookProjection(unittest.TestCase): + """WebhookProjection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test WebhookProjection + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.webhook_projection.WebhookProjection() # noqa: E501 + if include_optional : + return WebhookProjection( + name = '0', + id = '0', + url = '0', + inbox_id = '0', + event_name = 'EMAIL_RECEIVED', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + phone_number_id = '0', + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') + ) + else : + return WebhookProjection( + id = '0', + url = '0', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + ) + + def testWebhookProjection(self): + """Test WebhookProjection""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhook_redrive_result.py b/test/test_webhook_redrive_result.py new file mode 100644 index 00000000..271d8da6 --- /dev/null +++ b/test/test_webhook_redrive_result.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.webhook_redrive_result import WebhookRedriveResult # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestWebhookRedriveResult(unittest.TestCase): + """WebhookRedriveResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test WebhookRedriveResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.webhook_redrive_result.WebhookRedriveResult() # noqa: E501 + if include_optional : + return WebhookRedriveResult( + webhook_result_id = '0', + success = True, + message = '0' + ) + else : + return WebhookRedriveResult( + webhook_result_id = '0', + success = True, + ) + + def testWebhookRedriveResult(self): + """Test WebhookRedriveResult""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhook_result_dto.py b/test/test_webhook_result_dto.py new file mode 100644 index 00000000..26fe4bc9 --- /dev/null +++ b/test/test_webhook_result_dto.py @@ -0,0 +1,78 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.webhook_result_dto import WebhookResultDto # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestWebhookResultDto(unittest.TestCase): + """WebhookResultDto unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test WebhookResultDto + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.webhook_result_dto.WebhookResultDto() # noqa: E501 + if include_optional : + return WebhookResultDto( + id = '0', + user_id = '0', + inbox_id = '0', + webhook_id = '0', + webhook_url = '0', + message_id = '0', + redrive_id = '0', + http_method = 'GET', + webhook_event = 'EMAIL_RECEIVED', + response_status = 56, + response_time_millis = 56, + response_body_extract = '0', + result_type = 'BAD_RESPONSE', + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + seen = True + ) + else : + return WebhookResultDto( + user_id = '0', + webhook_id = '0', + webhook_url = '0', + message_id = '0', + http_method = 'GET', + webhook_event = 'EMAIL_RECEIVED', + response_time_millis = 56, + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + seen = True, + ) + + def testWebhookResultDto(self): + """Test WebhookResultDto""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhook_test_request.py b/test/test_webhook_test_request.py new file mode 100644 index 00000000..b181cfa8 --- /dev/null +++ b/test/test_webhook_test_request.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.webhook_test_request import WebhookTestRequest # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestWebhookTestRequest(unittest.TestCase): + """WebhookTestRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test WebhookTestRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.webhook_test_request.WebhookTestRequest() # noqa: E501 + if include_optional : + return WebhookTestRequest( + url = '0', + method = 'GET', + headers = { + 'key' : '0' + }, + payload = '0' + ) + else : + return WebhookTestRequest( + url = '0', + method = 'GET', + headers = { + 'key' : '0' + }, + ) + + def testWebhookTestRequest(self): + """Test WebhookTestRequest""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhook_test_response.py b/test/test_webhook_test_response.py new file mode 100644 index 00000000..fdcdef0b --- /dev/null +++ b/test/test_webhook_test_response.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.webhook_test_response import WebhookTestResponse # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestWebhookTestResponse(unittest.TestCase): + """WebhookTestResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test WebhookTestResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.webhook_test_response.WebhookTestResponse() # noqa: E501 + if include_optional : + return WebhookTestResponse( + status_code = 56, + message = '0' + ) + else : + return WebhookTestResponse( + ) + + def testWebhookTestResponse(self): + """Test WebhookTestResponse""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhook_test_result.py b/test/test_webhook_test_result.py new file mode 100644 index 00000000..1143e35a --- /dev/null +++ b/test/test_webhook_test_result.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + MailSlurp API + + MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository # noqa: E501 + + The version of the OpenAPI document: 6.5.2 + Contact: contact@mailslurp.dev + Generated by: https://openapi-generator.tech +""" + + +from __future__ import absolute_import + +import unittest +import datetime + +import mailslurp_client +from mailslurp_client.models.webhook_test_result import WebhookTestResult # noqa: E501 +from mailslurp_client.rest import ApiException + +class TestWebhookTestResult(unittest.TestCase): + """WebhookTestResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional): + """Test WebhookTestResult + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # model = mailslurp_client.models.webhook_test_result.WebhookTestResult() # noqa: E501 + if include_optional : + return WebhookTestResult( + message = '0', + response = mailslurp_client.models.webhook_test_response.WebhookTestResponse( + status_code = 56, + message = '0', ), + request = mailslurp_client.models.webhook_test_request.WebhookTestRequest( + url = '0', + method = 'GET', + headers = { + 'key' : '0' + }, + payload = '0', ) + ) + else : + return WebhookTestResult( + response = mailslurp_client.models.webhook_test_response.WebhookTestResponse( + status_code = 56, + message = '0', ), + request = mailslurp_client.models.webhook_test_request.WebhookTestRequest( + url = '0', + method = 'GET', + headers = { + 'key' : '0' + }, + payload = '0', ), + ) + + def testWebhookTestResult(self): + """Test WebhookTestResult""" + inst_req_only = self.make_instance(include_optional=False) + inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000..fe06d68d --- /dev/null +++ b/tox.ini @@ -0,0 +1,9 @@ +[tox] +envlist = py27, py3 + +[testenv] +deps=-r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + +commands= + pytest --cov=mailslurp_client