mailslurp_client 15.7.12 → 15.7.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mailslurp_client/api/alias_controller_api.rb +1 -1
- data/lib/mailslurp_client/api/attachment_controller_api.rb +1 -1
- data/lib/mailslurp_client/api/bounce_controller_api.rb +1 -1
- data/lib/mailslurp_client/api/bulk_actions_controller_api.rb +1 -1
- data/lib/mailslurp_client/api/common_actions_controller_api.rb +1 -1
- data/lib/mailslurp_client/api/contact_controller_api.rb +1 -1
- data/lib/mailslurp_client/api/domain_controller_api.rb +1 -1
- data/lib/mailslurp_client/api/email_controller_api.rb +1 -1
- data/lib/mailslurp_client/api/email_verification_controller_api.rb +1 -1
- data/lib/mailslurp_client/api/expired_controller_api.rb +1 -1
- data/lib/mailslurp_client/api/export_controller_api.rb +1 -1
- data/lib/mailslurp_client/api/form_controller_api.rb +1 -1
- data/lib/mailslurp_client/api/group_controller_api.rb +1 -1
- data/lib/mailslurp_client/api/inbox_controller_api.rb +1 -1
- data/lib/mailslurp_client/api/inbox_forwarder_controller_api.rb +1 -1
- data/lib/mailslurp_client/api/inbox_ruleset_controller_api.rb +1 -1
- data/lib/mailslurp_client/api/mail_server_controller_api.rb +1 -1
- data/lib/mailslurp_client/api/missed_email_controller_api.rb +1 -1
- data/lib/mailslurp_client/api/sent_emails_controller_api.rb +1 -1
- data/lib/mailslurp_client/api/template_controller_api.rb +1 -1
- data/lib/mailslurp_client/api/tracking_controller_api.rb +1 -1
- data/lib/mailslurp_client/api/wait_for_controller_api.rb +1 -1
- data/lib/mailslurp_client/api/webhook_controller_api.rb +67 -1
- data/lib/mailslurp_client/api_client.rb +1 -1
- data/lib/mailslurp_client/api_error.rb +1 -1
- data/lib/mailslurp_client/configuration.rb +1 -1
- data/lib/mailslurp_client/models/abstract_webhook_payload.rb +1 -1
- data/lib/mailslurp_client/models/alias_dto.rb +1 -1
- data/lib/mailslurp_client/models/alias_projection.rb +16 -16
- data/lib/mailslurp_client/models/attachment_entity.rb +1 -1
- data/lib/mailslurp_client/models/attachment_meta_data.rb +1 -1
- data/lib/mailslurp_client/models/attachment_projection.rb +15 -15
- data/lib/mailslurp_client/models/basic_auth_options.rb +1 -1
- data/lib/mailslurp_client/models/bounce_projection.rb +1 -1
- data/lib/mailslurp_client/models/bounce_recipient.rb +1 -1
- data/lib/mailslurp_client/models/bounced_email_dto.rb +1 -1
- data/lib/mailslurp_client/models/bounced_recipient_dto.rb +1 -1
- data/lib/mailslurp_client/models/bulk_send_email_options.rb +1 -1
- data/lib/mailslurp_client/models/condition_option.rb +1 -1
- data/lib/mailslurp_client/models/contact_dto.rb +1 -1
- data/lib/mailslurp_client/models/contact_projection.rb +1 -1
- data/lib/mailslurp_client/models/content_match_options.rb +1 -1
- data/lib/mailslurp_client/models/count_dto.rb +1 -1
- data/lib/mailslurp_client/models/create_alias_options.rb +1 -1
- data/lib/mailslurp_client/models/create_contact_options.rb +1 -1
- data/lib/mailslurp_client/models/create_domain_options.rb +1 -1
- data/lib/mailslurp_client/models/create_group_options.rb +1 -1
- data/lib/mailslurp_client/models/create_inbox_dto.rb +1 -1
- data/lib/mailslurp_client/models/create_inbox_forwarder_options.rb +1 -1
- data/lib/mailslurp_client/models/create_inbox_ruleset_options.rb +1 -1
- data/lib/mailslurp_client/models/create_template_options.rb +1 -1
- data/lib/mailslurp_client/models/create_tracking_pixel_options.rb +1 -1
- data/lib/mailslurp_client/models/create_webhook_options.rb +1 -1
- data/lib/mailslurp_client/models/describe_domain_options.rb +1 -1
- data/lib/mailslurp_client/models/describe_mail_server_domain_result.rb +1 -1
- data/lib/mailslurp_client/models/dns_lookup_options.rb +1 -1
- data/lib/mailslurp_client/models/dns_lookup_result.rb +1 -1
- data/lib/mailslurp_client/models/dns_lookup_results.rb +1 -1
- data/lib/mailslurp_client/models/domain_dto.rb +1 -1
- data/lib/mailslurp_client/models/domain_name_record.rb +1 -1
- data/lib/mailslurp_client/models/domain_preview.rb +1 -1
- data/lib/mailslurp_client/models/download_attachment_dto.rb +1 -1
- data/lib/mailslurp_client/models/email.rb +1 -1
- data/lib/mailslurp_client/models/email_analysis.rb +1 -1
- data/lib/mailslurp_client/models/email_content_match_result.rb +1 -1
- data/lib/mailslurp_client/models/email_links_result.rb +1 -1
- data/lib/mailslurp_client/models/email_preview.rb +1 -1
- data/lib/mailslurp_client/models/email_preview_urls.rb +1 -1
- data/lib/mailslurp_client/models/email_projection.rb +23 -23
- data/lib/mailslurp_client/models/email_recipients.rb +1 -1
- data/lib/mailslurp_client/models/email_text_lines_result.rb +1 -1
- data/lib/mailslurp_client/models/email_validation_request.rb +1 -1
- data/lib/mailslurp_client/models/email_verification_result.rb +1 -1
- data/lib/mailslurp_client/models/expiration_defaults.rb +1 -1
- data/lib/mailslurp_client/models/expired_inbox_dto.rb +1 -1
- data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +1 -1
- data/lib/mailslurp_client/models/export_link.rb +1 -1
- data/lib/mailslurp_client/models/export_options.rb +1 -1
- data/lib/mailslurp_client/models/filter_bounced_recipients_options.rb +1 -1
- data/lib/mailslurp_client/models/filter_bounced_recipients_result.rb +1 -1
- data/lib/mailslurp_client/models/flush_expired_inboxes_result.rb +1 -1
- data/lib/mailslurp_client/models/forward_email_options.rb +1 -1
- data/lib/mailslurp_client/models/gravatar_url.rb +1 -1
- data/lib/mailslurp_client/models/group_contacts_dto.rb +1 -1
- data/lib/mailslurp_client/models/group_dto.rb +1 -1
- data/lib/mailslurp_client/models/group_projection.rb +1 -1
- data/lib/mailslurp_client/models/html_validation_result.rb +1 -1
- data/lib/mailslurp_client/models/imap_flag_operation_options.rb +1 -1
- data/lib/mailslurp_client/models/imap_smtp_access_details.rb +1 -1
- data/lib/mailslurp_client/models/inbox_by_email_address_result.rb +1 -1
- data/lib/mailslurp_client/models/inbox_dto.rb +1 -1
- data/lib/mailslurp_client/models/inbox_exists_dto.rb +1 -1
- data/lib/mailslurp_client/models/inbox_forwarder_dto.rb +1 -1
- data/lib/mailslurp_client/models/inbox_forwarder_test_options.rb +1 -1
- data/lib/mailslurp_client/models/inbox_forwarder_test_result.rb +1 -1
- data/lib/mailslurp_client/models/inbox_id_item.rb +1 -1
- data/lib/mailslurp_client/models/inbox_ids_result.rb +1 -1
- data/lib/mailslurp_client/models/inbox_preview.rb +1 -1
- data/lib/mailslurp_client/models/inbox_ruleset_dto.rb +1 -1
- data/lib/mailslurp_client/models/inbox_ruleset_test_options.rb +1 -1
- data/lib/mailslurp_client/models/inbox_ruleset_test_result.rb +1 -1
- data/lib/mailslurp_client/models/inline_object.rb +1 -1
- data/lib/mailslurp_client/models/ip_address_result.rb +1 -1
- data/lib/mailslurp_client/models/json_schema_dto.rb +1 -1
- data/lib/mailslurp_client/models/match_option.rb +1 -1
- data/lib/mailslurp_client/models/match_options.rb +1 -1
- data/lib/mailslurp_client/models/missed_email.rb +1 -1
- data/lib/mailslurp_client/models/missed_email_projection.rb +1 -1
- data/lib/mailslurp_client/models/name_server_record.rb +1 -1
- data/lib/mailslurp_client/models/organization_inbox_projection.rb +1 -1
- data/lib/mailslurp_client/models/page_alias.rb +20 -20
- data/lib/mailslurp_client/models/page_attachment_entity.rb +20 -20
- data/lib/mailslurp_client/models/page_bounced_email.rb +20 -20
- data/lib/mailslurp_client/models/page_bounced_recipients.rb +20 -20
- data/lib/mailslurp_client/models/page_contact_projection.rb +20 -20
- data/lib/mailslurp_client/models/page_email_preview.rb +20 -20
- data/lib/mailslurp_client/models/page_email_projection.rb +20 -20
- data/lib/mailslurp_client/models/page_email_validation_request.rb +20 -20
- data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +20 -20
- data/lib/mailslurp_client/models/page_group_projection.rb +20 -20
- data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +20 -20
- data/lib/mailslurp_client/models/page_inbox_projection.rb +20 -20
- data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +20 -20
- data/lib/mailslurp_client/models/page_missed_email_projection.rb +20 -20
- data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +20 -20
- data/lib/mailslurp_client/models/page_sent_email_projection.rb +1 -1
- data/lib/mailslurp_client/models/page_template_projection.rb +20 -20
- data/lib/mailslurp_client/models/page_thread_projection.rb +20 -20
- data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +20 -20
- data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +20 -20
- data/lib/mailslurp_client/models/page_webhook_projection.rb +20 -20
- data/lib/mailslurp_client/models/page_webhook_result.rb +20 -20
- data/lib/mailslurp_client/models/pageable_object.rb +1 -1
- data/lib/mailslurp_client/models/raw_email_json.rb +1 -1
- data/lib/mailslurp_client/models/recipient.rb +1 -1
- data/lib/mailslurp_client/models/reply_to_alias_email_options.rb +1 -1
- data/lib/mailslurp_client/models/reply_to_email_options.rb +1 -1
- data/lib/mailslurp_client/models/send_email_options.rb +1 -1
- data/lib/mailslurp_client/models/send_smtp_envelope_options.rb +1 -1
- data/lib/mailslurp_client/models/sender.rb +1 -1
- data/lib/mailslurp_client/models/sent_email_dto.rb +1 -1
- data/lib/mailslurp_client/models/sent_email_projection.rb +55 -55
- data/lib/mailslurp_client/models/set_inbox_favourited_options.rb +1 -1
- data/lib/mailslurp_client/models/simple_send_email_options.rb +1 -1
- data/lib/mailslurp_client/models/sort.rb +1 -1
- data/lib/mailslurp_client/models/template_dto.rb +1 -1
- data/lib/mailslurp_client/models/template_projection.rb +16 -16
- data/lib/mailslurp_client/models/template_variable.rb +1 -1
- data/lib/mailslurp_client/models/test_new_inbox_forwarder_options.rb +1 -1
- data/lib/mailslurp_client/models/test_new_inbox_ruleset_options.rb +1 -1
- data/lib/mailslurp_client/models/thread_projection.rb +16 -16
- data/lib/mailslurp_client/models/tracking_pixel_dto.rb +1 -1
- data/lib/mailslurp_client/models/tracking_pixel_projection.rb +11 -11
- data/lib/mailslurp_client/models/unknown_missed_email_projection.rb +1 -1
- data/lib/mailslurp_client/models/unread_count.rb +1 -1
- data/lib/mailslurp_client/models/unseen_error_count_dto.rb +1 -1
- data/lib/mailslurp_client/models/update_alias_options.rb +1 -1
- data/lib/mailslurp_client/models/update_domain_options.rb +1 -1
- data/lib/mailslurp_client/models/update_group_contacts.rb +1 -1
- data/lib/mailslurp_client/models/update_inbox_options.rb +1 -1
- data/lib/mailslurp_client/models/upload_attachment_options.rb +1 -1
- data/lib/mailslurp_client/models/validate_email_address_list_options.rb +1 -1
- data/lib/mailslurp_client/models/validate_email_address_list_result.rb +1 -1
- data/lib/mailslurp_client/models/validation_dto.rb +1 -1
- data/lib/mailslurp_client/models/validation_message.rb +1 -1
- data/lib/mailslurp_client/models/verify_email_address_options.rb +1 -1
- data/lib/mailslurp_client/models/wait_for_conditions.rb +1 -1
- data/lib/mailslurp_client/models/webhook_bounce_payload.rb +2 -2
- data/lib/mailslurp_client/models/webhook_bounce_recipient_payload.rb +2 -2
- data/lib/mailslurp_client/models/webhook_dto.rb +1 -1
- data/lib/mailslurp_client/models/webhook_email_opened_payload.rb +1 -1
- data/lib/mailslurp_client/models/webhook_email_read_payload.rb +1 -1
- data/lib/mailslurp_client/models/webhook_new_attachment_payload.rb +1 -1
- data/lib/mailslurp_client/models/webhook_new_contact_payload.rb +1 -1
- data/lib/mailslurp_client/models/webhook_new_email_payload.rb +1 -1
- data/lib/mailslurp_client/models/webhook_projection.rb +1 -1
- data/lib/mailslurp_client/models/webhook_redrive_result.rb +1 -1
- data/lib/mailslurp_client/models/webhook_result_dto.rb +1 -1
- data/lib/mailslurp_client/models/webhook_test_request.rb +1 -1
- data/lib/mailslurp_client/models/webhook_test_response.rb +1 -1
- data/lib/mailslurp_client/models/webhook_test_result.rb +1 -1
- data/lib/mailslurp_client/version.rb +2 -2
- data/lib/mailslurp_client.rb +1 -4
- metadata +2 -5
- data/lib/mailslurp_client/api/api_internal_controller_api.rb +0 -89
- data/lib/mailslurp_client/models/get_or_create_saml_user_options.rb +0 -234
- data/lib/mailslurp_client/models/user_dto.rb +0 -438
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mailslurp_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 15.7.
|
4
|
+
version: 15.7.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mailslurp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Create emails addresses in Ruby then send and receive real emails and
|
14
14
|
attachments. See https://www.mailslurp.com/docs/ruby/ for full Ruby documentation.
|
@@ -24,7 +24,6 @@ files:
|
|
24
24
|
- SUPPORT.md
|
25
25
|
- lib/mailslurp_client.rb
|
26
26
|
- lib/mailslurp_client/api/alias_controller_api.rb
|
27
|
-
- lib/mailslurp_client/api/api_internal_controller_api.rb
|
28
27
|
- lib/mailslurp_client/api/attachment_controller_api.rb
|
29
28
|
- lib/mailslurp_client/api/bounce_controller_api.rb
|
30
29
|
- lib/mailslurp_client/api/bulk_actions_controller_api.rb
|
@@ -106,7 +105,6 @@ files:
|
|
106
105
|
- lib/mailslurp_client/models/filter_bounced_recipients_result.rb
|
107
106
|
- lib/mailslurp_client/models/flush_expired_inboxes_result.rb
|
108
107
|
- lib/mailslurp_client/models/forward_email_options.rb
|
109
|
-
- lib/mailslurp_client/models/get_or_create_saml_user_options.rb
|
110
108
|
- lib/mailslurp_client/models/gravatar_url.rb
|
111
109
|
- lib/mailslurp_client/models/group_contacts_dto.rb
|
112
110
|
- lib/mailslurp_client/models/group_dto.rb
|
@@ -186,7 +184,6 @@ files:
|
|
186
184
|
- lib/mailslurp_client/models/update_group_contacts.rb
|
187
185
|
- lib/mailslurp_client/models/update_inbox_options.rb
|
188
186
|
- lib/mailslurp_client/models/upload_attachment_options.rb
|
189
|
-
- lib/mailslurp_client/models/user_dto.rb
|
190
187
|
- lib/mailslurp_client/models/validate_email_address_list_options.rb
|
191
188
|
- lib/mailslurp_client/models/validate_email_address_list_result.rb
|
192
189
|
- lib/mailslurp_client/models/validation_dto.rb
|
@@ -1,89 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#MailSlurp API
|
3
|
-
|
4
|
-
#MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
|
5
|
-
|
6
|
-
The version of the OpenAPI document: 6.5.2
|
7
|
-
Contact: contact@mailslurp.dev
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.3.1
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'cgi'
|
14
|
-
|
15
|
-
module MailSlurpClient
|
16
|
-
class ApiInternalControllerApi
|
17
|
-
attr_accessor :api_client
|
18
|
-
|
19
|
-
def initialize(api_client = ApiClient.default)
|
20
|
-
@api_client = api_client
|
21
|
-
end
|
22
|
-
# @param key [String]
|
23
|
-
# @param get_or_create_saml_user_options [GetOrCreateSamlUserOptions]
|
24
|
-
# @param [Hash] opts the optional parameters
|
25
|
-
# @return [UserDto]
|
26
|
-
def get_saml_user_or_create(key, get_or_create_saml_user_options, opts = {})
|
27
|
-
data, _status_code, _headers = get_saml_user_or_create_with_http_info(key, get_or_create_saml_user_options, opts)
|
28
|
-
data
|
29
|
-
end
|
30
|
-
|
31
|
-
# @param key [String]
|
32
|
-
# @param get_or_create_saml_user_options [GetOrCreateSamlUserOptions]
|
33
|
-
# @param [Hash] opts the optional parameters
|
34
|
-
# @return [Array<(UserDto, Integer, Hash)>] UserDto data, response status code and response headers
|
35
|
-
def get_saml_user_or_create_with_http_info(key, get_or_create_saml_user_options, opts = {})
|
36
|
-
if @api_client.config.debugging
|
37
|
-
@api_client.config.logger.debug 'Calling API: ApiInternalControllerApi.get_saml_user_or_create ...'
|
38
|
-
end
|
39
|
-
# verify the required parameter 'key' is set
|
40
|
-
if @api_client.config.client_side_validation && key.nil?
|
41
|
-
fail ArgumentError, "Missing the required parameter 'key' when calling ApiInternalControllerApi.get_saml_user_or_create"
|
42
|
-
end
|
43
|
-
# verify the required parameter 'get_or_create_saml_user_options' is set
|
44
|
-
if @api_client.config.client_side_validation && get_or_create_saml_user_options.nil?
|
45
|
-
fail ArgumentError, "Missing the required parameter 'get_or_create_saml_user_options' when calling ApiInternalControllerApi.get_saml_user_or_create"
|
46
|
-
end
|
47
|
-
# resource path
|
48
|
-
local_var_path = '/internal/saml/user'
|
49
|
-
|
50
|
-
# query parameters
|
51
|
-
query_params = opts[:query_params] || {}
|
52
|
-
query_params[:'key'] = key
|
53
|
-
|
54
|
-
# header parameters
|
55
|
-
header_params = opts[:header_params] || {}
|
56
|
-
# HTTP header 'Accept' (if needed)
|
57
|
-
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
58
|
-
# HTTP header 'Content-Type'
|
59
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
60
|
-
|
61
|
-
# form parameters
|
62
|
-
form_params = opts[:form_params] || {}
|
63
|
-
|
64
|
-
# http body (model)
|
65
|
-
post_body = opts[:body] || @api_client.object_to_http_body(get_or_create_saml_user_options)
|
66
|
-
|
67
|
-
# return_type
|
68
|
-
return_type = opts[:return_type] || 'UserDto'
|
69
|
-
|
70
|
-
# auth_names
|
71
|
-
auth_names = opts[:auth_names] || ['API_KEY']
|
72
|
-
|
73
|
-
new_options = opts.merge(
|
74
|
-
:header_params => header_params,
|
75
|
-
:query_params => query_params,
|
76
|
-
:form_params => form_params,
|
77
|
-
:body => post_body,
|
78
|
-
:auth_names => auth_names,
|
79
|
-
:return_type => return_type
|
80
|
-
)
|
81
|
-
|
82
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
83
|
-
if @api_client.config.debugging
|
84
|
-
@api_client.config.logger.debug "API called: ApiInternalControllerApi#get_saml_user_or_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
85
|
-
end
|
86
|
-
return data, status_code, headers
|
87
|
-
end
|
88
|
-
end
|
89
|
-
end
|
@@ -1,234 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#MailSlurp API
|
3
|
-
|
4
|
-
#MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
|
5
|
-
|
6
|
-
The version of the OpenAPI document: 6.5.2
|
7
|
-
Contact: contact@mailslurp.dev
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.3.1
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'date'
|
14
|
-
|
15
|
-
module MailSlurpClient
|
16
|
-
class GetOrCreateSamlUserOptions
|
17
|
-
attr_accessor :issuer
|
18
|
-
|
19
|
-
attr_accessor :name_id
|
20
|
-
|
21
|
-
attr_accessor :name_id_format
|
22
|
-
|
23
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
-
def self.attribute_map
|
25
|
-
{
|
26
|
-
:'issuer' => :'issuer',
|
27
|
-
:'name_id' => :'nameId',
|
28
|
-
:'name_id_format' => :'nameIdFormat'
|
29
|
-
}
|
30
|
-
end
|
31
|
-
|
32
|
-
# Attribute type mapping.
|
33
|
-
def self.openapi_types
|
34
|
-
{
|
35
|
-
:'issuer' => :'String',
|
36
|
-
:'name_id' => :'String',
|
37
|
-
:'name_id_format' => :'String'
|
38
|
-
}
|
39
|
-
end
|
40
|
-
|
41
|
-
# List of attributes with nullable: true
|
42
|
-
def self.openapi_nullable
|
43
|
-
Set.new([
|
44
|
-
])
|
45
|
-
end
|
46
|
-
|
47
|
-
# Initializes the object
|
48
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
49
|
-
def initialize(attributes = {})
|
50
|
-
if (!attributes.is_a?(Hash))
|
51
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::GetOrCreateSamlUserOptions` initialize method"
|
52
|
-
end
|
53
|
-
|
54
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
55
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
56
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
57
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::GetOrCreateSamlUserOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
58
|
-
end
|
59
|
-
h[k.to_sym] = v
|
60
|
-
}
|
61
|
-
|
62
|
-
if attributes.key?(:'issuer')
|
63
|
-
self.issuer = attributes[:'issuer']
|
64
|
-
end
|
65
|
-
|
66
|
-
if attributes.key?(:'name_id')
|
67
|
-
self.name_id = attributes[:'name_id']
|
68
|
-
end
|
69
|
-
|
70
|
-
if attributes.key?(:'name_id_format')
|
71
|
-
self.name_id_format = attributes[:'name_id_format']
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
76
|
-
# @return Array for valid properties with the reasons
|
77
|
-
def list_invalid_properties
|
78
|
-
invalid_properties = Array.new
|
79
|
-
if @issuer.nil?
|
80
|
-
invalid_properties.push('invalid value for "issuer", issuer cannot be nil.')
|
81
|
-
end
|
82
|
-
|
83
|
-
if @name_id.nil?
|
84
|
-
invalid_properties.push('invalid value for "name_id", name_id cannot be nil.')
|
85
|
-
end
|
86
|
-
|
87
|
-
invalid_properties
|
88
|
-
end
|
89
|
-
|
90
|
-
# Check to see if the all the properties in the model are valid
|
91
|
-
# @return true if the model is valid
|
92
|
-
def valid?
|
93
|
-
return false if @issuer.nil?
|
94
|
-
return false if @name_id.nil?
|
95
|
-
true
|
96
|
-
end
|
97
|
-
|
98
|
-
# Checks equality by comparing each attribute.
|
99
|
-
# @param [Object] Object to be compared
|
100
|
-
def ==(o)
|
101
|
-
return true if self.equal?(o)
|
102
|
-
self.class == o.class &&
|
103
|
-
issuer == o.issuer &&
|
104
|
-
name_id == o.name_id &&
|
105
|
-
name_id_format == o.name_id_format
|
106
|
-
end
|
107
|
-
|
108
|
-
# @see the `==` method
|
109
|
-
# @param [Object] Object to be compared
|
110
|
-
def eql?(o)
|
111
|
-
self == o
|
112
|
-
end
|
113
|
-
|
114
|
-
# Calculates hash code according to all attributes.
|
115
|
-
# @return [Integer] Hash code
|
116
|
-
def hash
|
117
|
-
[issuer, name_id, name_id_format].hash
|
118
|
-
end
|
119
|
-
|
120
|
-
# Builds the object from hash
|
121
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
122
|
-
# @return [Object] Returns the model itself
|
123
|
-
def self.build_from_hash(attributes)
|
124
|
-
new.build_from_hash(attributes)
|
125
|
-
end
|
126
|
-
|
127
|
-
# Builds the object from hash
|
128
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
129
|
-
# @return [Object] Returns the model itself
|
130
|
-
def build_from_hash(attributes)
|
131
|
-
return nil unless attributes.is_a?(Hash)
|
132
|
-
self.class.openapi_types.each_pair do |key, type|
|
133
|
-
if type =~ /\AArray<(.*)>/i
|
134
|
-
# check to ensure the input is an array given that the attribute
|
135
|
-
# is documented as an array but the input is not
|
136
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
137
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
138
|
-
end
|
139
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
140
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
141
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
142
|
-
end
|
143
|
-
|
144
|
-
self
|
145
|
-
end
|
146
|
-
|
147
|
-
# Deserializes the data based on type
|
148
|
-
# @param string type Data type
|
149
|
-
# @param string value Value to be deserialized
|
150
|
-
# @return [Object] Deserialized data
|
151
|
-
def _deserialize(type, value)
|
152
|
-
case type.to_sym
|
153
|
-
when :DateTime
|
154
|
-
DateTime.parse(value)
|
155
|
-
when :Date
|
156
|
-
Date.parse(value)
|
157
|
-
when :String
|
158
|
-
value.to_s
|
159
|
-
when :Integer
|
160
|
-
value.to_i
|
161
|
-
when :Float
|
162
|
-
value.to_f
|
163
|
-
when :Boolean
|
164
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
165
|
-
true
|
166
|
-
else
|
167
|
-
false
|
168
|
-
end
|
169
|
-
when :Object
|
170
|
-
# generic object (usually a Hash), return directly
|
171
|
-
value
|
172
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
173
|
-
inner_type = Regexp.last_match[:inner_type]
|
174
|
-
value.map { |v| _deserialize(inner_type, v) }
|
175
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
176
|
-
k_type = Regexp.last_match[:k_type]
|
177
|
-
v_type = Regexp.last_match[:v_type]
|
178
|
-
{}.tap do |hash|
|
179
|
-
value.each do |k, v|
|
180
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
181
|
-
end
|
182
|
-
end
|
183
|
-
else # model
|
184
|
-
MailSlurpClient.const_get(type).build_from_hash(value)
|
185
|
-
end
|
186
|
-
end
|
187
|
-
|
188
|
-
# Returns the string representation of the object
|
189
|
-
# @return [String] String presentation of the object
|
190
|
-
def to_s
|
191
|
-
to_hash.to_s
|
192
|
-
end
|
193
|
-
|
194
|
-
# to_body is an alias to to_hash (backward compatibility)
|
195
|
-
# @return [Hash] Returns the object in the form of hash
|
196
|
-
def to_body
|
197
|
-
to_hash
|
198
|
-
end
|
199
|
-
|
200
|
-
# Returns the object in the form of hash
|
201
|
-
# @return [Hash] Returns the object in the form of hash
|
202
|
-
def to_hash
|
203
|
-
hash = {}
|
204
|
-
self.class.attribute_map.each_pair do |attr, param|
|
205
|
-
value = self.send(attr)
|
206
|
-
if value.nil?
|
207
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
208
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
209
|
-
end
|
210
|
-
|
211
|
-
hash[param] = _to_hash(value)
|
212
|
-
end
|
213
|
-
hash
|
214
|
-
end
|
215
|
-
|
216
|
-
# Outputs non-array value in the form of hash
|
217
|
-
# For object, use to_hash. Otherwise, just return the value
|
218
|
-
# @param [Object] value Any valid value
|
219
|
-
# @return [Hash] Returns the value in the form of hash
|
220
|
-
def _to_hash(value)
|
221
|
-
if value.is_a?(Array)
|
222
|
-
value.compact.map { |v| _to_hash(v) }
|
223
|
-
elsif value.is_a?(Hash)
|
224
|
-
{}.tap do |hash|
|
225
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
226
|
-
end
|
227
|
-
elsif value.respond_to? :to_hash
|
228
|
-
value.to_hash
|
229
|
-
else
|
230
|
-
value
|
231
|
-
end
|
232
|
-
end
|
233
|
-
end
|
234
|
-
end
|