mailslurp_client 15.13.9 → 15.13.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client/api/api_user_controller_api.rb +23 -58
  3. data/lib/mailslurp_client/api/email_controller_api.rb +7 -10
  4. data/lib/mailslurp_client/api/inbox_controller_api.rb +2 -2
  5. data/lib/mailslurp_client/api/webhook_controller_api.rb +108 -0
  6. data/lib/mailslurp_client/models/alias_projection.rb +27 -27
  7. data/lib/mailslurp_client/models/attachment_projection.rb +14 -14
  8. data/lib/mailslurp_client/models/bounce_projection.rb +13 -13
  9. data/lib/mailslurp_client/models/bounce_recipient_projection.rb +13 -13
  10. data/lib/mailslurp_client/models/email_projection.rb +10 -10
  11. data/lib/mailslurp_client/models/page_alias.rb +22 -22
  12. data/lib/mailslurp_client/models/page_attachment_entity.rb +22 -22
  13. data/lib/mailslurp_client/models/page_bounced_email.rb +22 -22
  14. data/lib/mailslurp_client/models/page_bounced_recipients.rb +22 -22
  15. data/lib/mailslurp_client/models/page_complaint.rb +22 -22
  16. data/lib/mailslurp_client/models/page_contact_projection.rb +22 -22
  17. data/lib/mailslurp_client/models/page_delivery_status.rb +22 -22
  18. data/lib/mailslurp_client/models/page_email_preview.rb +22 -22
  19. data/lib/mailslurp_client/models/page_email_projection.rb +22 -22
  20. data/lib/mailslurp_client/models/page_email_validation_request.rb +22 -22
  21. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +22 -22
  22. data/lib/mailslurp_client/models/page_group_projection.rb +22 -22
  23. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +22 -22
  24. data/lib/mailslurp_client/models/page_inbox_projection.rb +22 -22
  25. data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +22 -22
  26. data/lib/mailslurp_client/models/page_missed_email_projection.rb +22 -22
  27. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +22 -22
  28. data/lib/mailslurp_client/models/page_phone_number_projection.rb +22 -22
  29. data/lib/mailslurp_client/models/page_sent_email_projection.rb +16 -16
  30. data/lib/mailslurp_client/models/page_sent_email_with_queue_projection.rb +16 -16
  31. data/lib/mailslurp_client/models/page_sms_projection.rb +22 -22
  32. data/lib/mailslurp_client/models/page_template_projection.rb +22 -22
  33. data/lib/mailslurp_client/models/page_thread_projection.rb +22 -22
  34. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +22 -22
  35. data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +22 -22
  36. data/lib/mailslurp_client/models/page_webhook_projection.rb +22 -22
  37. data/lib/mailslurp_client/models/page_webhook_result.rb +22 -22
  38. data/lib/mailslurp_client/models/phone_number_projection.rb +19 -19
  39. data/lib/mailslurp_client/models/sent_email_projection.rb +15 -15
  40. data/lib/mailslurp_client/models/sort.rb +13 -13
  41. data/lib/mailslurp_client/models/template_projection.rb +15 -15
  42. data/lib/mailslurp_client/models/thread_projection.rb +16 -16
  43. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +10 -10
  44. data/lib/mailslurp_client/models/webhook_delivery_status_payload.rb +429 -0
  45. data/lib/mailslurp_client/models/webhook_new_sms_payload.rb +393 -0
  46. data/lib/mailslurp_client/version.rb +1 -1
  47. data/lib/mailslurp_client.rb +2 -0
  48. metadata +4 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4e18ac1619c4a9b445983aa337c366510480c03b8ef8e335dbdba863caa46cf1
4
- data.tar.gz: 61b14a3b5bafc1036a183eab1aab49745191593d2bf35f0d560febc1e8bd62e3
3
+ metadata.gz: 9d5470ef47d765f919e62ecdc915589d08c48bbcc2848dd0649ac2340d360ac3
4
+ data.tar.gz: 16e4860ff8f2752a5a71e189f5729d0246b3910713832d92e23e7760fc13ae49
5
5
  SHA512:
6
- metadata.gz: c4ce5e749827b5c337a37ee197538c5d64146a2ef908e3d98e8e9b02331ad3417ae2d7bf9e8984172f84fd9c61f795c1c8caf164644e7c0ea0d89e3329bd549c
7
- data.tar.gz: ff3f51b0894ddb5dd7b079627cdc197239d28cd55d092be8d0cf24fae5e7bb6fa2b33c484540ce6b4af5a1612948b33c7177cd133d56424a977c29f7f9a8137f
6
+ metadata.gz: 4b436a4e1b778e8165c82fd941fb2deecdf51fafea536cf669fe7ca9e80036197dbf9a3103e6818a9f831b64a6a83dca0ee8baceab4609b3dd9201ed0c276093
7
+ data.tar.gz: 98c94a1e143795eb1ce9f468ae801afe1db6bfc9491a21b5066b4aa26cf8a889c07b61e579b08d1e495188fae17ced9961eedbe65129e4e2ce968c130432d642
@@ -19,87 +19,52 @@ module MailSlurpClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Utility function to extract properties from JSON objects in language where this is cumbersome.
23
+ # @param property [String] JSON property name or dot separated path selector such as `a.b.c`
24
+ # @param body [Object]
22
25
  # @param [Hash] opts the optional parameters
23
26
  # @return [String]
24
- def get_smtp_password(opts = {})
25
- data, _status_code, _headers = get_smtp_password_with_http_info(opts)
27
+ def get_json_property_as_string(property, body, opts = {})
28
+ data, _status_code, _headers = get_json_property_as_string_with_http_info(property, body, opts)
26
29
  data
27
30
  end
28
31
 
32
+ # Utility function to extract properties from JSON objects in language where this is cumbersome.
33
+ # @param property [String] JSON property name or dot separated path selector such as `a.b.c`
34
+ # @param body [Object]
29
35
  # @param [Hash] opts the optional parameters
30
36
  # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
31
- def get_smtp_password_with_http_info(opts = {})
37
+ def get_json_property_as_string_with_http_info(property, body, opts = {})
32
38
  if @api_client.config.debugging
33
- @api_client.config.logger.debug 'Calling API: ApiUserControllerApi.get_smtp_password ...'
39
+ @api_client.config.logger.debug 'Calling API: ApiUserControllerApi.get_json_property_as_string ...'
34
40
  end
35
- # resource path
36
- local_var_path = '/user/smtp/password'
37
-
38
- # query parameters
39
- query_params = opts[:query_params] || {}
40
-
41
- # header parameters
42
- header_params = opts[:header_params] || {}
43
- # HTTP header 'Accept' (if needed)
44
- header_params['Accept'] = @api_client.select_header_accept(['*/*'])
45
-
46
- # form parameters
47
- form_params = opts[:form_params] || {}
48
-
49
- # http body (model)
50
- post_body = opts[:body]
51
-
52
- # return_type
53
- return_type = opts[:return_type] || 'String'
54
-
55
- # auth_names
56
- auth_names = opts[:auth_names] || ['API_KEY']
57
-
58
- new_options = opts.merge(
59
- :header_params => header_params,
60
- :query_params => query_params,
61
- :form_params => form_params,
62
- :body => post_body,
63
- :auth_names => auth_names,
64
- :return_type => return_type
65
- )
66
-
67
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
68
- if @api_client.config.debugging
69
- @api_client.config.logger.debug "API called: ApiUserControllerApi#get_smtp_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
41
+ # verify the required parameter 'property' is set
42
+ if @api_client.config.client_side_validation && property.nil?
43
+ fail ArgumentError, "Missing the required parameter 'property' when calling ApiUserControllerApi.get_json_property_as_string"
70
44
  end
71
- return data, status_code, headers
72
- end
73
-
74
- # @param [Hash] opts the optional parameters
75
- # @return [String]
76
- def get_smtp_username(opts = {})
77
- data, _status_code, _headers = get_smtp_username_with_http_info(opts)
78
- data
79
- end
80
-
81
- # @param [Hash] opts the optional parameters
82
- # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
83
- def get_smtp_username_with_http_info(opts = {})
84
- if @api_client.config.debugging
85
- @api_client.config.logger.debug 'Calling API: ApiUserControllerApi.get_smtp_username ...'
45
+ # verify the required parameter 'body' is set
46
+ if @api_client.config.client_side_validation && body.nil?
47
+ fail ArgumentError, "Missing the required parameter 'body' when calling ApiUserControllerApi.get_json_property_as_string"
86
48
  end
87
49
  # resource path
88
- local_var_path = '/user/smtp/username'
50
+ local_var_path = '/user/json/pluck'
89
51
 
90
52
  # query parameters
91
53
  query_params = opts[:query_params] || {}
54
+ query_params[:'property'] = property
92
55
 
93
56
  # header parameters
94
57
  header_params = opts[:header_params] || {}
95
58
  # HTTP header 'Accept' (if needed)
96
59
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
60
+ # HTTP header 'Content-Type'
61
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
97
62
 
98
63
  # form parameters
99
64
  form_params = opts[:form_params] || {}
100
65
 
101
66
  # http body (model)
102
- post_body = opts[:body]
67
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
103
68
 
104
69
  # return_type
105
70
  return_type = opts[:return_type] || 'String'
@@ -116,9 +81,9 @@ module MailSlurpClient
116
81
  :return_type => return_type
117
82
  )
118
83
 
119
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
84
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
120
85
  if @api_client.config.debugging
121
- @api_client.config.logger.debug "API called: ApiUserControllerApi#get_smtp_username\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ @api_client.config.logger.debug "API called: ApiUserControllerApi#get_json_property_as_string\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
122
87
  end
123
88
  return data, status_code, headers
124
89
  end
@@ -1925,42 +1925,39 @@ module MailSlurpClient
1925
1925
 
1926
1926
  # Send email
1927
1927
  # 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.
1928
- # @param inbox_id [String] ID of the inbox you want to send the email from
1929
1928
  # @param send_email_options [SendEmailOptions]
1930
1929
  # @param [Hash] opts the optional parameters
1930
+ # @option opts [String] :inbox_id ID of the inbox you want to send the email from
1931
1931
  # @option opts [Boolean] :use_domain_pool Use domain pool. Optionally create inbox to send from using the mailslurp domain pool.
1932
1932
  # @option opts [Boolean] :virtual_send Optionally create inbox to send from that is a virtual inbox and won&#39;t send to external addresses
1933
1933
  # @return [nil]
1934
- def send_email_source_optional(inbox_id, send_email_options, opts = {})
1935
- send_email_source_optional_with_http_info(inbox_id, send_email_options, opts)
1934
+ def send_email_source_optional(send_email_options, opts = {})
1935
+ send_email_source_optional_with_http_info(send_email_options, opts)
1936
1936
  nil
1937
1937
  end
1938
1938
 
1939
1939
  # Send email
1940
1940
  # Alias for &#x60;InboxController.sendEmail&#x60; 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.
1941
- # @param inbox_id [String] ID of the inbox you want to send the email from
1942
1941
  # @param send_email_options [SendEmailOptions]
1943
1942
  # @param [Hash] opts the optional parameters
1943
+ # @option opts [String] :inbox_id ID of the inbox you want to send the email from
1944
1944
  # @option opts [Boolean] :use_domain_pool Use domain pool. Optionally create inbox to send from using the mailslurp domain pool.
1945
1945
  # @option opts [Boolean] :virtual_send Optionally create inbox to send from that is a virtual inbox and won&#39;t send to external addresses
1946
1946
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1947
- def send_email_source_optional_with_http_info(inbox_id, send_email_options, opts = {})
1947
+ def send_email_source_optional_with_http_info(send_email_options, opts = {})
1948
1948
  if @api_client.config.debugging
1949
1949
  @api_client.config.logger.debug 'Calling API: EmailControllerApi.send_email_source_optional ...'
1950
1950
  end
1951
- # verify the required parameter 'inbox_id' is set
1952
- if @api_client.config.client_side_validation && inbox_id.nil?
1953
- fail ArgumentError, "Missing the required parameter 'inbox_id' when calling EmailControllerApi.send_email_source_optional"
1954
- end
1955
1951
  # verify the required parameter 'send_email_options' is set
1956
1952
  if @api_client.config.client_side_validation && send_email_options.nil?
1957
1953
  fail ArgumentError, "Missing the required parameter 'send_email_options' when calling EmailControllerApi.send_email_source_optional"
1958
1954
  end
1959
1955
  # resource path
1960
- local_var_path = '/emails'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
1956
+ local_var_path = '/emails'
1961
1957
 
1962
1958
  # query parameters
1963
1959
  query_params = opts[:query_params] || {}
1960
+ query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
1964
1961
  query_params[:'useDomainPool'] = opts[:'use_domain_pool'] if !opts[:'use_domain_pool'].nil?
1965
1962
  query_params[:'virtualSend'] = opts[:'virtual_send'] if !opts[:'virtual_send'].nil?
1966
1963
 
@@ -1510,7 +1510,7 @@ module MailSlurpClient
1510
1510
  end
1511
1511
 
1512
1512
  # List Inboxes and email addresses
1513
- # List the inboxes you have created. Note use of the more advanced `getAllEmails` is recommended and allows paginated access using a limit and sort parameter.
1513
+ # 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.
1514
1514
  # @param [Hash] opts the optional parameters
1515
1515
  # @option opts [Integer] :size Optional result size limit. Note an automatic limit of 100 results is applied. See the paginated &#x60;getAllEmails&#x60; for larger queries. (default to 100)
1516
1516
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
@@ -1523,7 +1523,7 @@ module MailSlurpClient
1523
1523
  end
1524
1524
 
1525
1525
  # List Inboxes and email addresses
1526
- # List the inboxes you have created. Note use of the more advanced &#x60;getAllEmails&#x60; is recommended and allows paginated access using a limit and sort parameter.
1526
+ # List the inboxes you have created. Note use of the more advanced &#x60;getAllInboxes&#x60; is recommended and allows paginated access using a limit and sort parameter.
1527
1527
  # @param [Hash] opts the optional parameters
1528
1528
  # @option opts [Integer] :size Optional result size limit. Note an automatic limit of 100 results is applied. See the paginated &#x60;getAllEmails&#x60; for larger queries.
1529
1529
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
@@ -1035,6 +1035,60 @@ module MailSlurpClient
1035
1035
  return data, status_code, headers
1036
1036
  end
1037
1037
 
1038
+ # Get webhook test payload for delivery status event
1039
+ # @param [Hash] opts the optional parameters
1040
+ # @return [WebhookDeliveryStatusPayload]
1041
+ def get_test_webhook_payload_delivery_status(opts = {})
1042
+ data, _status_code, _headers = get_test_webhook_payload_delivery_status_with_http_info(opts)
1043
+ data
1044
+ end
1045
+
1046
+ # Get webhook test payload for delivery status event
1047
+ # @param [Hash] opts the optional parameters
1048
+ # @return [Array<(WebhookDeliveryStatusPayload, Integer, Hash)>] WebhookDeliveryStatusPayload data, response status code and response headers
1049
+ def get_test_webhook_payload_delivery_status_with_http_info(opts = {})
1050
+ if @api_client.config.debugging
1051
+ @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_test_webhook_payload_delivery_status ...'
1052
+ end
1053
+ # resource path
1054
+ local_var_path = '/webhooks/test/delivery-status-payload'
1055
+
1056
+ # query parameters
1057
+ query_params = opts[:query_params] || {}
1058
+
1059
+ # header parameters
1060
+ header_params = opts[:header_params] || {}
1061
+ # HTTP header 'Accept' (if needed)
1062
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1063
+
1064
+ # form parameters
1065
+ form_params = opts[:form_params] || {}
1066
+
1067
+ # http body (model)
1068
+ post_body = opts[:body]
1069
+
1070
+ # return_type
1071
+ return_type = opts[:return_type] || 'WebhookDeliveryStatusPayload'
1072
+
1073
+ # auth_names
1074
+ auth_names = opts[:auth_names] || ['API_KEY']
1075
+
1076
+ new_options = opts.merge(
1077
+ :header_params => header_params,
1078
+ :query_params => query_params,
1079
+ :form_params => form_params,
1080
+ :body => post_body,
1081
+ :auth_names => auth_names,
1082
+ :return_type => return_type
1083
+ )
1084
+
1085
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1086
+ if @api_client.config.debugging
1087
+ @api_client.config.logger.debug "API called: WebhookControllerApi#get_test_webhook_payload_delivery_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1088
+ end
1089
+ return data, status_code, headers
1090
+ end
1091
+
1038
1092
  # Get webhook test payload for email opened event
1039
1093
  # @param [Hash] opts the optional parameters
1040
1094
  # @return [WebhookEmailOpenedPayload]
@@ -1365,6 +1419,60 @@ module MailSlurpClient
1365
1419
  return data, status_code, headers
1366
1420
  end
1367
1421
 
1422
+ # Get webhook test payload for new sms event
1423
+ # @param [Hash] opts the optional parameters
1424
+ # @return [WebhookNewSmsPayload]
1425
+ def get_test_webhook_payload_new_sms(opts = {})
1426
+ data, _status_code, _headers = get_test_webhook_payload_new_sms_with_http_info(opts)
1427
+ data
1428
+ end
1429
+
1430
+ # Get webhook test payload for new sms event
1431
+ # @param [Hash] opts the optional parameters
1432
+ # @return [Array<(WebhookNewSmsPayload, Integer, Hash)>] WebhookNewSmsPayload data, response status code and response headers
1433
+ def get_test_webhook_payload_new_sms_with_http_info(opts = {})
1434
+ if @api_client.config.debugging
1435
+ @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_test_webhook_payload_new_sms ...'
1436
+ end
1437
+ # resource path
1438
+ local_var_path = '/webhooks/test/new-sms-payload'
1439
+
1440
+ # query parameters
1441
+ query_params = opts[:query_params] || {}
1442
+
1443
+ # header parameters
1444
+ header_params = opts[:header_params] || {}
1445
+ # HTTP header 'Accept' (if needed)
1446
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1447
+
1448
+ # form parameters
1449
+ form_params = opts[:form_params] || {}
1450
+
1451
+ # http body (model)
1452
+ post_body = opts[:body]
1453
+
1454
+ # return_type
1455
+ return_type = opts[:return_type] || 'WebhookNewSmsPayload'
1456
+
1457
+ # auth_names
1458
+ auth_names = opts[:auth_names] || ['API_KEY']
1459
+
1460
+ new_options = opts.merge(
1461
+ :header_params => header_params,
1462
+ :query_params => query_params,
1463
+ :form_params => form_params,
1464
+ :body => post_body,
1465
+ :auth_names => auth_names,
1466
+ :return_type => return_type
1467
+ )
1468
+
1469
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1470
+ if @api_client.config.debugging
1471
+ @api_client.config.logger.debug "API called: WebhookControllerApi#get_test_webhook_payload_new_sms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1472
+ end
1473
+ return data, status_code, headers
1474
+ end
1475
+
1368
1476
  # Get a webhook
1369
1477
  # @param webhook_id [String]
1370
1478
  # @param [Hash] opts the optional parameters
@@ -19,29 +19,29 @@ module MailSlurpClient
19
19
 
20
20
  attr_accessor :id
21
21
 
22
+ attr_accessor :inbox_id
23
+
22
24
  attr_accessor :user_id
23
25
 
24
26
  attr_accessor :email_address
25
27
 
26
- attr_accessor :inbox_id
27
-
28
28
  attr_accessor :created_at
29
29
 
30
- attr_accessor :updated_at
31
-
32
30
  attr_accessor :use_threads
33
31
 
32
+ attr_accessor :updated_at
33
+
34
34
  # Attribute mapping from ruby-style variable name to JSON key.
35
35
  def self.attribute_map
36
36
  {
37
37
  :'name' => :'name',
38
38
  :'id' => :'id',
39
+ :'inbox_id' => :'inboxId',
39
40
  :'user_id' => :'userId',
40
41
  :'email_address' => :'emailAddress',
41
- :'inbox_id' => :'inboxId',
42
42
  :'created_at' => :'createdAt',
43
- :'updated_at' => :'updatedAt',
44
- :'use_threads' => :'useThreads'
43
+ :'use_threads' => :'useThreads',
44
+ :'updated_at' => :'updatedAt'
45
45
  }
46
46
  end
47
47
 
@@ -50,12 +50,12 @@ module MailSlurpClient
50
50
  {
51
51
  :'name' => :'String',
52
52
  :'id' => :'String',
53
+ :'inbox_id' => :'String',
53
54
  :'user_id' => :'String',
54
55
  :'email_address' => :'String',
55
- :'inbox_id' => :'String',
56
56
  :'created_at' => :'DateTime',
57
- :'updated_at' => :'DateTime',
58
- :'use_threads' => :'Boolean'
57
+ :'use_threads' => :'Boolean',
58
+ :'updated_at' => :'DateTime'
59
59
  }
60
60
  end
61
61
 
@@ -88,6 +88,10 @@ module MailSlurpClient
88
88
  self.id = attributes[:'id']
89
89
  end
90
90
 
91
+ if attributes.key?(:'inbox_id')
92
+ self.inbox_id = attributes[:'inbox_id']
93
+ end
94
+
91
95
  if attributes.key?(:'user_id')
92
96
  self.user_id = attributes[:'user_id']
93
97
  end
@@ -96,21 +100,17 @@ module MailSlurpClient
96
100
  self.email_address = attributes[:'email_address']
97
101
  end
98
102
 
99
- if attributes.key?(:'inbox_id')
100
- self.inbox_id = attributes[:'inbox_id']
101
- end
102
-
103
103
  if attributes.key?(:'created_at')
104
104
  self.created_at = attributes[:'created_at']
105
105
  end
106
106
 
107
- if attributes.key?(:'updated_at')
108
- self.updated_at = attributes[:'updated_at']
109
- end
110
-
111
107
  if attributes.key?(:'use_threads')
112
108
  self.use_threads = attributes[:'use_threads']
113
109
  end
110
+
111
+ if attributes.key?(:'updated_at')
112
+ self.updated_at = attributes[:'updated_at']
113
+ end
114
114
  end
115
115
 
116
116
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -121,6 +121,10 @@ module MailSlurpClient
121
121
  invalid_properties.push('invalid value for "id", id cannot be nil.')
122
122
  end
123
123
 
124
+ if @inbox_id.nil?
125
+ invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
126
+ end
127
+
124
128
  if @user_id.nil?
125
129
  invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
126
130
  end
@@ -129,10 +133,6 @@ module MailSlurpClient
129
133
  invalid_properties.push('invalid value for "email_address", email_address cannot be nil.')
130
134
  end
131
135
 
132
- if @inbox_id.nil?
133
- invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
134
- end
135
-
136
136
  if @created_at.nil?
137
137
  invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
138
138
  end
@@ -148,9 +148,9 @@ module MailSlurpClient
148
148
  # @return true if the model is valid
149
149
  def valid?
150
150
  return false if @id.nil?
151
+ return false if @inbox_id.nil?
151
152
  return false if @user_id.nil?
152
153
  return false if @email_address.nil?
153
- return false if @inbox_id.nil?
154
154
  return false if @created_at.nil?
155
155
  return false if @updated_at.nil?
156
156
  true
@@ -163,12 +163,12 @@ module MailSlurpClient
163
163
  self.class == o.class &&
164
164
  name == o.name &&
165
165
  id == o.id &&
166
+ inbox_id == o.inbox_id &&
166
167
  user_id == o.user_id &&
167
168
  email_address == o.email_address &&
168
- inbox_id == o.inbox_id &&
169
169
  created_at == o.created_at &&
170
- updated_at == o.updated_at &&
171
- use_threads == o.use_threads
170
+ use_threads == o.use_threads &&
171
+ updated_at == o.updated_at
172
172
  end
173
173
 
174
174
  # @see the `==` method
@@ -180,7 +180,7 @@ module MailSlurpClient
180
180
  # Calculates hash code according to all attributes.
181
181
  # @return [Integer] Hash code
182
182
  def hash
183
- [name, id, user_id, email_address, inbox_id, created_at, updated_at, use_threads].hash
183
+ [name, id, inbox_id, user_id, email_address, created_at, use_threads, updated_at].hash
184
184
  end
185
185
 
186
186
  # Builds the object from hash
@@ -20,6 +20,9 @@ module MailSlurpClient
20
20
  # Content length of attachment in bytes
21
21
  attr_accessor :content_length
22
22
 
23
+ # Content type of attachment.
24
+ attr_accessor :content_type
25
+
23
26
  attr_accessor :user_id
24
27
 
25
28
  # Attachment ID
@@ -29,19 +32,16 @@ module MailSlurpClient
29
32
 
30
33
  attr_accessor :updated_at
31
34
 
32
- # Content type of attachment.
33
- attr_accessor :content_type
34
-
35
35
  # Attribute mapping from ruby-style variable name to JSON key.
36
36
  def self.attribute_map
37
37
  {
38
38
  :'name' => :'name',
39
39
  :'content_length' => :'contentLength',
40
+ :'content_type' => :'contentType',
40
41
  :'user_id' => :'userId',
41
42
  :'attachment_id' => :'attachmentId',
42
43
  :'created_at' => :'createdAt',
43
- :'updated_at' => :'updatedAt',
44
- :'content_type' => :'contentType'
44
+ :'updated_at' => :'updatedAt'
45
45
  }
46
46
  end
47
47
 
@@ -50,11 +50,11 @@ module MailSlurpClient
50
50
  {
51
51
  :'name' => :'String',
52
52
  :'content_length' => :'Integer',
53
+ :'content_type' => :'String',
53
54
  :'user_id' => :'String',
54
55
  :'attachment_id' => :'String',
55
56
  :'created_at' => :'DateTime',
56
- :'updated_at' => :'DateTime',
57
- :'content_type' => :'String'
57
+ :'updated_at' => :'DateTime'
58
58
  }
59
59
  end
60
60
 
@@ -87,6 +87,10 @@ module MailSlurpClient
87
87
  self.content_length = attributes[:'content_length']
88
88
  end
89
89
 
90
+ if attributes.key?(:'content_type')
91
+ self.content_type = attributes[:'content_type']
92
+ end
93
+
90
94
  if attributes.key?(:'user_id')
91
95
  self.user_id = attributes[:'user_id']
92
96
  end
@@ -102,10 +106,6 @@ module MailSlurpClient
102
106
  if attributes.key?(:'updated_at')
103
107
  self.updated_at = attributes[:'updated_at']
104
108
  end
105
-
106
- if attributes.key?(:'content_type')
107
- self.content_type = attributes[:'content_type']
108
- end
109
109
  end
110
110
 
111
111
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -148,11 +148,11 @@ module MailSlurpClient
148
148
  self.class == o.class &&
149
149
  name == o.name &&
150
150
  content_length == o.content_length &&
151
+ content_type == o.content_type &&
151
152
  user_id == o.user_id &&
152
153
  attachment_id == o.attachment_id &&
153
154
  created_at == o.created_at &&
154
- updated_at == o.updated_at &&
155
- content_type == o.content_type
155
+ updated_at == o.updated_at
156
156
  end
157
157
 
158
158
  # @see the `==` method
@@ -164,7 +164,7 @@ module MailSlurpClient
164
164
  # Calculates hash code according to all attributes.
165
165
  # @return [Integer] Hash code
166
166
  def hash
167
- [name, content_length, user_id, attachment_id, created_at, updated_at, content_type].hash
167
+ [name, content_length, content_type, user_id, attachment_id, created_at, updated_at].hash
168
168
  end
169
169
 
170
170
  # Builds the object from hash
@@ -23,10 +23,10 @@ module MailSlurpClient
23
23
 
24
24
  attr_accessor :created_at
25
25
 
26
- attr_accessor :bounce_mta
27
-
28
26
  attr_accessor :bounce_type
29
27
 
28
+ attr_accessor :bounce_mta
29
+
30
30
  # Attribute mapping from ruby-style variable name to JSON key.
31
31
  def self.attribute_map
32
32
  {
@@ -34,8 +34,8 @@ module MailSlurpClient
34
34
  :'sender' => :'sender',
35
35
  :'subject' => :'subject',
36
36
  :'created_at' => :'createdAt',
37
- :'bounce_mta' => :'bounceMta',
38
- :'bounce_type' => :'bounceType'
37
+ :'bounce_type' => :'bounceType',
38
+ :'bounce_mta' => :'bounceMta'
39
39
  }
40
40
  end
41
41
 
@@ -46,8 +46,8 @@ module MailSlurpClient
46
46
  :'sender' => :'String',
47
47
  :'subject' => :'String',
48
48
  :'created_at' => :'DateTime',
49
- :'bounce_mta' => :'String',
50
- :'bounce_type' => :'String'
49
+ :'bounce_type' => :'String',
50
+ :'bounce_mta' => :'String'
51
51
  }
52
52
  end
53
53
 
@@ -88,13 +88,13 @@ module MailSlurpClient
88
88
  self.created_at = attributes[:'created_at']
89
89
  end
90
90
 
91
- if attributes.key?(:'bounce_mta')
92
- self.bounce_mta = attributes[:'bounce_mta']
93
- end
94
-
95
91
  if attributes.key?(:'bounce_type')
96
92
  self.bounce_type = attributes[:'bounce_type']
97
93
  end
94
+
95
+ if attributes.key?(:'bounce_mta')
96
+ self.bounce_mta = attributes[:'bounce_mta']
97
+ end
98
98
  end
99
99
 
100
100
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -129,8 +129,8 @@ module MailSlurpClient
129
129
  sender == o.sender &&
130
130
  subject == o.subject &&
131
131
  created_at == o.created_at &&
132
- bounce_mta == o.bounce_mta &&
133
- bounce_type == o.bounce_type
132
+ bounce_type == o.bounce_type &&
133
+ bounce_mta == o.bounce_mta
134
134
  end
135
135
 
136
136
  # @see the `==` method
@@ -142,7 +142,7 @@ module MailSlurpClient
142
142
  # Calculates hash code according to all attributes.
143
143
  # @return [Integer] Hash code
144
144
  def hash
145
- [id, sender, subject, created_at, bounce_mta, bounce_type].hash
145
+ [id, sender, subject, created_at, bounce_type, bounce_mta].hash
146
146
  end
147
147
 
148
148
  # Builds the object from hash