ElasticEmail 4.0.20 → 4.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/ElasticEmail.gemspec +3 -3
  3. data/README.md +6 -8
  4. data/VERSION +1 -1
  5. data/docs/BodyPart.md +1 -1
  6. data/docs/ContactsApi.md +2 -78
  7. data/docs/EmailPredictedValidationStatus.md +15 -0
  8. data/docs/EmailValidationResult.md +5 -1
  9. data/docs/EmailsApi.md +1 -1
  10. data/docs/MessageAttachment.md +4 -2
  11. data/docs/VerificationsApi.md +4 -4
  12. data/lib/ElasticEmail/api/campaigns_api.rb +2 -2
  13. data/lib/ElasticEmail/api/contacts_api.rb +5 -71
  14. data/lib/ElasticEmail/api/emails_api.rb +2 -2
  15. data/lib/ElasticEmail/api/events_api.rb +2 -2
  16. data/lib/ElasticEmail/api/files_api.rb +2 -2
  17. data/lib/ElasticEmail/api/inbound_route_api.rb +2 -2
  18. data/lib/ElasticEmail/api/lists_api.rb +2 -2
  19. data/lib/ElasticEmail/api/security_api.rb +2 -2
  20. data/lib/ElasticEmail/api/segments_api.rb +2 -2
  21. data/lib/ElasticEmail/api/statistics_api.rb +2 -2
  22. data/lib/ElasticEmail/api/sub_accounts_api.rb +2 -2
  23. data/lib/ElasticEmail/api/suppressions_api.rb +2 -2
  24. data/lib/ElasticEmail/api/templates_api.rb +2 -2
  25. data/lib/ElasticEmail/api/verifications_api.rb +10 -10
  26. data/lib/ElasticEmail/api_client.rb +2 -2
  27. data/lib/ElasticEmail/api_error.rb +3 -2
  28. data/lib/ElasticEmail/configuration.rb +13 -2
  29. data/lib/ElasticEmail/models/access_level.rb +13 -10
  30. data/lib/ElasticEmail/models/account_status_enum.rb +8 -6
  31. data/lib/ElasticEmail/models/api_key.rb +2 -2
  32. data/lib/ElasticEmail/models/api_key_payload.rb +2 -2
  33. data/lib/ElasticEmail/models/body_content_type.rb +8 -5
  34. data/lib/ElasticEmail/models/body_part.rb +25 -3
  35. data/lib/ElasticEmail/models/campaign.rb +24 -2
  36. data/lib/ElasticEmail/models/campaign_options.rb +24 -2
  37. data/lib/ElasticEmail/models/campaign_recipient.rb +2 -2
  38. data/lib/ElasticEmail/models/campaign_status.rb +8 -5
  39. data/lib/ElasticEmail/models/campaign_template.rb +2 -2
  40. data/lib/ElasticEmail/models/channel_log_status_summary.rb +2 -2
  41. data/lib/ElasticEmail/models/compression_format.rb +8 -5
  42. data/lib/ElasticEmail/models/consent_data.rb +24 -2
  43. data/lib/ElasticEmail/models/consent_tracking.rb +8 -5
  44. data/lib/ElasticEmail/models/contact.rb +24 -2
  45. data/lib/ElasticEmail/models/contact_activity.rb +2 -2
  46. data/lib/ElasticEmail/models/contact_payload.rb +24 -2
  47. data/lib/ElasticEmail/models/contact_source.rb +8 -5
  48. data/lib/ElasticEmail/models/contact_status.rb +8 -5
  49. data/lib/ElasticEmail/models/contact_update_payload.rb +2 -2
  50. data/lib/ElasticEmail/models/contacts_list.rb +2 -2
  51. data/lib/ElasticEmail/models/delivery_optimization_type.rb +8 -5
  52. data/lib/ElasticEmail/models/email_content.rb +2 -2
  53. data/lib/ElasticEmail/models/email_data.rb +2 -2
  54. data/lib/ElasticEmail/models/email_message_data.rb +2 -2
  55. data/lib/ElasticEmail/models/email_predicted_validation_status.rb +43 -0
  56. data/lib/ElasticEmail/models/email_recipient.rb +2 -2
  57. data/lib/ElasticEmail/models/email_send.rb +2 -2
  58. data/lib/ElasticEmail/models/email_status.rb +24 -2
  59. data/lib/ElasticEmail/models/email_transactional_message_data.rb +2 -2
  60. data/lib/ElasticEmail/models/email_validation_result.rb +48 -6
  61. data/lib/ElasticEmail/models/email_validation_status.rb +8 -5
  62. data/lib/ElasticEmail/models/email_view.rb +2 -2
  63. data/lib/ElasticEmail/models/emails_payload.rb +2 -2
  64. data/lib/ElasticEmail/models/encoding_type.rb +8 -5
  65. data/lib/ElasticEmail/models/event_type.rb +8 -5
  66. data/lib/ElasticEmail/models/events_order_by.rb +8 -5
  67. data/lib/ElasticEmail/models/export_file_formats.rb +8 -5
  68. data/lib/ElasticEmail/models/export_link.rb +2 -2
  69. data/lib/ElasticEmail/models/export_status.rb +8 -5
  70. data/lib/ElasticEmail/models/file_info.rb +2 -2
  71. data/lib/ElasticEmail/models/file_payload.rb +2 -2
  72. data/lib/ElasticEmail/models/file_upload_result.rb +2 -2
  73. data/lib/ElasticEmail/models/inbound_payload.rb +24 -2
  74. data/lib/ElasticEmail/models/inbound_route.rb +24 -2
  75. data/lib/ElasticEmail/models/inbound_route_action_type.rb +8 -5
  76. data/lib/ElasticEmail/models/inbound_route_filter_type.rb +8 -5
  77. data/lib/ElasticEmail/models/list_payload.rb +2 -2
  78. data/lib/ElasticEmail/models/list_update_payload.rb +2 -2
  79. data/lib/ElasticEmail/models/log_job_status.rb +8 -5
  80. data/lib/ElasticEmail/models/log_status_summary.rb +2 -2
  81. data/lib/ElasticEmail/models/merge_email_payload.rb +2 -2
  82. data/lib/ElasticEmail/models/message_attachment.rb +21 -6
  83. data/lib/ElasticEmail/models/message_category.rb +8 -5
  84. data/lib/ElasticEmail/models/new_api_key.rb +2 -2
  85. data/lib/ElasticEmail/models/new_smtp_credentials.rb +24 -2
  86. data/lib/ElasticEmail/models/options.rb +24 -2
  87. data/lib/ElasticEmail/models/recipient_event.rb +24 -2
  88. data/lib/ElasticEmail/models/segment.rb +2 -2
  89. data/lib/ElasticEmail/models/segment_payload.rb +2 -2
  90. data/lib/ElasticEmail/models/smtp_credentials.rb +24 -2
  91. data/lib/ElasticEmail/models/smtp_credentials_payload.rb +2 -2
  92. data/lib/ElasticEmail/models/sort_order_item.rb +2 -2
  93. data/lib/ElasticEmail/models/split_optimization_type.rb +8 -5
  94. data/lib/ElasticEmail/models/split_options.rb +24 -2
  95. data/lib/ElasticEmail/models/sub_account_info.rb +24 -2
  96. data/lib/ElasticEmail/models/subaccount_email_credits_payload.rb +2 -2
  97. data/lib/ElasticEmail/models/subaccount_email_settings.rb +2 -2
  98. data/lib/ElasticEmail/models/subaccount_email_settings_payload.rb +2 -2
  99. data/lib/ElasticEmail/models/subaccount_payload.rb +2 -2
  100. data/lib/ElasticEmail/models/subaccount_settings_info.rb +2 -2
  101. data/lib/ElasticEmail/models/subaccount_settings_info_payload.rb +2 -2
  102. data/lib/ElasticEmail/models/suppression.rb +2 -2
  103. data/lib/ElasticEmail/models/template.rb +24 -2
  104. data/lib/ElasticEmail/models/template_payload.rb +24 -2
  105. data/lib/ElasticEmail/models/template_scope.rb +8 -5
  106. data/lib/ElasticEmail/models/template_type.rb +9 -5
  107. data/lib/ElasticEmail/models/transactional_recipient.rb +2 -2
  108. data/lib/ElasticEmail/models/utm.rb +2 -2
  109. data/lib/ElasticEmail/models/verification_file_result.rb +24 -2
  110. data/lib/ElasticEmail/models/verification_file_result_details.rb +24 -2
  111. data/lib/ElasticEmail/models/verification_status.rb +8 -5
  112. data/lib/ElasticEmail/version.rb +3 -3
  113. data/lib/ElasticEmail.rb +3 -4
  114. data/spec/api_client_spec.rb +2 -2
  115. data/spec/configuration_spec.rb +2 -2
  116. data/spec/models/email_predicted_validation_status_spec.rb +28 -0
  117. data/spec/spec_helper.rb +2 -2
  118. metadata +7 -3
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #Elastic Email REST API
3
3
 
4
- #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://elasticemail.com/account#/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
4
+ #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://app.elasticemail.com/marketing/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
5
5
 
6
6
  The version of the OpenAPI document: 4.0.0
7
7
  Contact: support@elasticemail.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ OpenAPI Generator version: 6.3.0
10
10
 
11
11
  =end
12
12
 
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #Elastic Email REST API
3
3
 
4
- #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://elasticemail.com/account#/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
4
+ #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://app.elasticemail.com/marketing/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
5
5
 
6
6
  The version of the OpenAPI document: 4.0.0
7
7
  Contact: support@elasticemail.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ OpenAPI Generator version: 6.3.0
10
10
 
11
11
  =end
12
12
 
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #Elastic Email REST API
3
3
 
4
- #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://elasticemail.com/account#/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
4
+ #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://app.elasticemail.com/marketing/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
5
5
 
6
6
  The version of the OpenAPI document: 4.0.0
7
7
  Contact: support@elasticemail.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ OpenAPI Generator version: 6.3.0
10
10
 
11
11
  =end
12
12
 
@@ -81,7 +81,7 @@ module ElasticEmail
81
81
  end
82
82
 
83
83
  # Get Email Verification Result
84
- # Returns a result of verified email. Required Access Level: ViewEmailVerifications
84
+ # Returns a result of verified email. Required Access Level: VerifyEmails
85
85
  # @param email [String] Email address to view verification result of
86
86
  # @param [Hash] opts the optional parameters
87
87
  # @return [EmailValidationResult]
@@ -91,7 +91,7 @@ module ElasticEmail
91
91
  end
92
92
 
93
93
  # Get Email Verification Result
94
- # Returns a result of verified email. Required Access Level: ViewEmailVerifications
94
+ # Returns a result of verified email. Required Access Level: VerifyEmails
95
95
  # @param email [String] Email address to view verification result of
96
96
  # @param [Hash] opts the optional parameters
97
97
  # @return [Array<(EmailValidationResult, Integer, Hash)>] EmailValidationResult data, response status code and response headers
@@ -331,7 +331,7 @@ module ElasticEmail
331
331
  end
332
332
 
333
333
  # Get Detailed File Verification Result
334
- # Returns status and results (if verified) of file with given ID. Required Access Level: ViewEmailVerifications
334
+ # Returns status and results (if verified) of file with given ID. Required Access Level: VerifyEmails
335
335
  # @param id [String] ID of the Verification to display status of
336
336
  # @param [Hash] opts the optional parameters
337
337
  # @option opts [Integer] :limit Maximum number of returned email verification results
@@ -343,7 +343,7 @@ module ElasticEmail
343
343
  end
344
344
 
345
345
  # Get Detailed File Verification Result
346
- # Returns status and results (if verified) of file with given ID. Required Access Level: ViewEmailVerifications
346
+ # Returns status and results (if verified) of file with given ID. Required Access Level: VerifyEmails
347
347
  # @param id [String] ID of the Verification to display status of
348
348
  # @param [Hash] opts the optional parameters
349
349
  # @option opts [Integer] :limit Maximum number of returned email verification results
@@ -526,7 +526,7 @@ module ElasticEmail
526
526
  end
527
527
 
528
528
  # Get Files Verification Results
529
- # Returns a list of uploaded files, their statuses and results. Required Access Level: ViewEmailVerifications
529
+ # Returns a list of uploaded files, their statuses and results. Required Access Level: VerifyEmails
530
530
  # @param [Hash] opts the optional parameters
531
531
  # @return [Array<VerificationFileResult>]
532
532
  def verifications_files_result_get(opts = {})
@@ -535,7 +535,7 @@ module ElasticEmail
535
535
  end
536
536
 
537
537
  # Get Files Verification Results
538
- # Returns a list of uploaded files, their statuses and results. Required Access Level: ViewEmailVerifications
538
+ # Returns a list of uploaded files, their statuses and results. Required Access Level: VerifyEmails
539
539
  # @param [Hash] opts the optional parameters
540
540
  # @return [Array<(Array<VerificationFileResult>, Integer, Hash)>] Array<VerificationFileResult> data, response status code and response headers
541
541
  def verifications_files_result_get_with_http_info(opts = {})
@@ -583,7 +583,7 @@ module ElasticEmail
583
583
  end
584
584
 
585
585
  # Get Emails Verification Results
586
- # Returns a results of all verified single emails. Required Access Level: ViewEmailVerifications
586
+ # Returns a results of all verified single emails. Required Access Level: VerifyEmails
587
587
  # @param [Hash] opts the optional parameters
588
588
  # @option opts [Integer] :limit Maximum number of returned items.
589
589
  # @option opts [Integer] :offset How many items should be returned ahead.
@@ -594,7 +594,7 @@ module ElasticEmail
594
594
  end
595
595
 
596
596
  # Get Emails Verification Results
597
- # Returns a results of all verified single emails. Required Access Level: ViewEmailVerifications
597
+ # Returns a results of all verified single emails. Required Access Level: VerifyEmails
598
598
  # @param [Hash] opts the optional parameters
599
599
  # @option opts [Integer] :limit Maximum number of returned items.
600
600
  # @option opts [Integer] :offset How many items should be returned ahead.
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #Elastic Email REST API
3
3
 
4
- #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://elasticemail.com/account#/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
4
+ #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://app.elasticemail.com/marketing/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
5
5
 
6
6
  The version of the OpenAPI document: 4.0.0
7
7
  Contact: support@elasticemail.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ OpenAPI Generator version: 6.3.0
10
10
 
11
11
  =end
12
12
 
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #Elastic Email REST API
3
3
 
4
- #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://elasticemail.com/account#/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
4
+ #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://app.elasticemail.com/marketing/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
5
5
 
6
6
  The version of the OpenAPI document: 4.0.0
7
7
  Contact: support@elasticemail.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ OpenAPI Generator version: 6.3.0
10
10
 
11
11
  =end
12
12
 
@@ -32,6 +32,7 @@ module ElasticEmail
32
32
  end
33
33
  else
34
34
  super arg
35
+ @message = arg
35
36
  end
36
37
  end
37
38
 
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #Elastic Email REST API
3
3
 
4
- #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://elasticemail.com/account#/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
4
+ #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://app.elasticemail.com/marketing/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
5
5
 
6
6
  The version of the OpenAPI document: 4.0.0
7
7
  Contact: support@elasticemail.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ OpenAPI Generator version: 6.3.0
10
10
 
11
11
  =end
12
12
 
@@ -62,6 +62,11 @@ module ElasticEmail
62
62
  # Defines the access token (Bearer) used with OAuth2.
63
63
  attr_accessor :access_token
64
64
 
65
+ # Defines a Proc used to fetch or refresh access tokens (Bearer) used with OAuth2.
66
+ # Overrides the access_token if set
67
+ # @return [Proc]
68
+ attr_accessor :access_token_getter
69
+
65
70
  # Set this to enable/disable debugging. When enabled (set to true), HTTP request/response
66
71
  # details will be logged with `logger.debug` (see the `logger` attribute).
67
72
  # Default to false.
@@ -208,6 +213,12 @@ module ElasticEmail
208
213
  end
209
214
  end
210
215
 
216
+ # Gets access_token using access_token_getter or uses the static access_token
217
+ def access_token_with_refresh
218
+ return access_token if access_token_getter.nil?
219
+ access_token_getter.call
220
+ end
221
+
211
222
  # Gets Basic Auth token string
212
223
  def basic_auth_token
213
224
  'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n")
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #Elastic Email REST API
3
3
 
4
- #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://elasticemail.com/account#/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
4
+ #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://app.elasticemail.com/marketing/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
5
5
 
6
6
  The version of the OpenAPI document: 4.0.0
7
7
  Contact: support@elasticemail.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ OpenAPI Generator version: 6.3.0
10
10
 
11
11
  =end
12
12
 
@@ -51,21 +51,25 @@ module ElasticEmail
51
51
  MODIFY_LANGUAGE = "ModifyLanguage".freeze
52
52
  VIEW_SUPPORT = "ViewSupport".freeze
53
53
  SEND_HTTP = "SendHttp".freeze
54
- MODIFY2_FA = "Modify2FA".freeze
54
+ MODIFY2_FA_EMAIL = "Modify2FAEmail".freeze
55
55
  MODIFY_SUPPORT = "ModifySupport".freeze
56
56
  VIEW_CUSTOM_FIELDS = "ViewCustomFields".freeze
57
57
  MODIFY_CUSTOM_FIELDS = "ModifyCustomFields".freeze
58
58
  MODIFY_WEB_NOTIFICATIONS = "ModifyWebNotifications".freeze
59
59
  EXTENDED_LOGS = "ExtendedLogs".freeze
60
60
  VERIFY_EMAILS = "VerifyEmails".freeze
61
- VIEW_EMAIL_VERIFICATIONS = "ViewEmailVerifications".freeze
62
- VIEW_MARKETING = "ViewMarketing".freeze
63
- VIEW_EMAIL_API = "ViewEmailApi".freeze
64
- VIEW_INBOUND = "ViewInbound".freeze
61
+ MODIFY2_FA_SMS = "Modify2FASms".freeze
62
+ DISABLE_CONTACTS_STORE = "DisableContactsStore".freeze
65
63
  MODIFY_LANDING_PAGES = "ModifyLandingPages".freeze
66
64
  VIEW_LANDING_PAGES = "ViewLandingPages".freeze
67
65
  MODIFY_SUPPRESSIONS = "ModifySuppressions".freeze
68
66
  VIEW_SUPPRESSIONS = "ViewSuppressions".freeze
67
+ VIEW_DRAG_DROP_EDITOR = "ViewDragDropEditor".freeze
68
+ VIEW_TEMPLATE_EDITOR = "ViewTemplateEditor".freeze
69
+
70
+ def self.all_vars
71
+ @all_vars ||= [NONE, VIEW_ACCOUNT, VIEW_CONTACTS, VIEW_FORMS, VIEW_TEMPLATES, VIEW_CAMPAIGNS, VIEW_CHANNELS, VIEW_AUTOMATIONS, VIEW_SURVEYS, VIEW_SETTINGS, VIEW_BILLING, VIEW_SUB_ACCOUNTS, VIEW_USERS, VIEW_FILES, VIEW_REPORTS, MODIFY_ACCOUNT, MODIFY_CONTACTS, MODIFY_FORMS, MODIFY_TEMPLATES, MODIFY_CAMPAIGNS, MODIFY_CHANNELS, MODIFY_AUTOMATIONS, MODIFY_SURVEYS, MODIFY_FILES, EXPORT, SEND_SMTP, SEND_SMS, MODIFY_SETTINGS, MODIFY_BILLING, MODIFY_PROFILE, MODIFY_SUB_ACCOUNTS, MODIFY_USERS, SECURITY, MODIFY_LANGUAGE, VIEW_SUPPORT, SEND_HTTP, MODIFY2_FA_EMAIL, MODIFY_SUPPORT, VIEW_CUSTOM_FIELDS, MODIFY_CUSTOM_FIELDS, MODIFY_WEB_NOTIFICATIONS, EXTENDED_LOGS, VERIFY_EMAILS, MODIFY2_FA_SMS, DISABLE_CONTACTS_STORE, MODIFY_LANDING_PAGES, VIEW_LANDING_PAGES, MODIFY_SUPPRESSIONS, VIEW_SUPPRESSIONS, VIEW_DRAG_DROP_EDITOR, VIEW_TEMPLATE_EDITOR].freeze
72
+ end
69
73
 
70
74
  # Builds the enum from string
71
75
  # @param [String] The enum value in the form of the string
@@ -78,9 +82,8 @@ module ElasticEmail
78
82
  # @param [String] The enum value in the form of the string
79
83
  # @return [String] The enum value
80
84
  def build_from_hash(value)
81
- constantValues = AccessLevel.constants.select { |c| AccessLevel::const_get(c) == value }
82
- raise "Invalid ENUM value #{value} for class #AccessLevel" if constantValues.empty?
83
- value
85
+ return value if AccessLevel.all_vars.include?(value)
86
+ raise "Invalid ENUM value #{value} for class #AccessLevel"
84
87
  end
85
88
  end
86
89
  end
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #Elastic Email REST API
3
3
 
4
- #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://elasticemail.com/account#/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
4
+ #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://app.elasticemail.com/marketing/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
5
5
 
6
6
  The version of the OpenAPI document: 4.0.0
7
7
  Contact: support@elasticemail.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ OpenAPI Generator version: 6.3.0
10
10
 
11
11
  =end
12
12
 
@@ -17,10 +17,13 @@ module ElasticEmail
17
17
  class AccountStatusEnum
18
18
  DISABLED = "Disabled".freeze
19
19
  UNDER_REVIEW = "UnderReview".freeze
20
- NO_PAYMENTS_ALLOWED = "NoPaymentsAllowed".freeze
21
20
  NEVER_SIGNED_IN = "NeverSignedIn".freeze
22
21
  ACTIVE = "Active".freeze
23
22
 
23
+ def self.all_vars
24
+ @all_vars ||= [DISABLED, UNDER_REVIEW, NEVER_SIGNED_IN, ACTIVE].freeze
25
+ end
26
+
24
27
  # Builds the enum from string
25
28
  # @param [String] The enum value in the form of the string
26
29
  # @return [String] The enum value
@@ -32,9 +35,8 @@ module ElasticEmail
32
35
  # @param [String] The enum value in the form of the string
33
36
  # @return [String] The enum value
34
37
  def build_from_hash(value)
35
- constantValues = AccountStatusEnum.constants.select { |c| AccountStatusEnum::const_get(c) == value }
36
- raise "Invalid ENUM value #{value} for class #AccountStatusEnum" if constantValues.empty?
37
- value
38
+ return value if AccountStatusEnum.all_vars.include?(value)
39
+ raise "Invalid ENUM value #{value} for class #AccountStatusEnum"
38
40
  end
39
41
  end
40
42
  end
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #Elastic Email REST API
3
3
 
4
- #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://elasticemail.com/account#/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
4
+ #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://app.elasticemail.com/marketing/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
5
5
 
6
6
  The version of the OpenAPI document: 4.0.0
7
7
  Contact: support@elasticemail.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ OpenAPI Generator version: 6.3.0
10
10
 
11
11
  =end
12
12
 
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #Elastic Email REST API
3
3
 
4
- #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://elasticemail.com/account#/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
4
+ #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://app.elasticemail.com/marketing/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
5
5
 
6
6
  The version of the OpenAPI document: 4.0.0
7
7
  Contact: support@elasticemail.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ OpenAPI Generator version: 6.3.0
10
10
 
11
11
  =end
12
12
 
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #Elastic Email REST API
3
3
 
4
- #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://elasticemail.com/account#/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
4
+ #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://app.elasticemail.com/marketing/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
5
5
 
6
6
  The version of the OpenAPI document: 4.0.0
7
7
  Contact: support@elasticemail.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ OpenAPI Generator version: 6.3.0
10
10
 
11
11
  =end
12
12
 
@@ -20,6 +20,10 @@ module ElasticEmail
20
20
  AMP = "AMP".freeze
21
21
  CSS = "CSS".freeze
22
22
 
23
+ def self.all_vars
24
+ @all_vars ||= [HTML, PLAIN_TEXT, AMP, CSS].freeze
25
+ end
26
+
23
27
  # Builds the enum from string
24
28
  # @param [String] The enum value in the form of the string
25
29
  # @return [String] The enum value
@@ -31,9 +35,8 @@ module ElasticEmail
31
35
  # @param [String] The enum value in the form of the string
32
36
  # @return [String] The enum value
33
37
  def build_from_hash(value)
34
- constantValues = BodyContentType.constants.select { |c| BodyContentType::const_get(c) == value }
35
- raise "Invalid ENUM value #{value} for class #BodyContentType" if constantValues.empty?
36
- value
38
+ return value if BodyContentType.all_vars.include?(value)
39
+ raise "Invalid ENUM value #{value} for class #BodyContentType"
37
40
  end
38
41
  end
39
42
  end
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #Elastic Email REST API
3
3
 
4
- #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://elasticemail.com/account#/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
4
+ #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://app.elasticemail.com/marketing/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
5
5
 
6
6
  The version of the OpenAPI document: 4.0.0
7
7
  Contact: support@elasticemail.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ OpenAPI Generator version: 6.3.0
10
10
 
11
11
  =end
12
12
 
@@ -21,9 +21,31 @@ module ElasticEmail
21
21
  # Actual content of the body part
22
22
  attr_accessor :content
23
23
 
24
- # Text value of charset encoding for example: iso-8859-1, windows-1251, utf-8, us-ascii, windows-1250 and more
24
+ # Text value of charset encoding for example: iso-8859-1, windows-1251, utf-8, us-ascii, windows-1250 and more...
25
25
  attr_accessor :charset
26
26
 
27
+ class EnumAttributeValidator
28
+ attr_reader :datatype
29
+ attr_reader :allowable_values
30
+
31
+ def initialize(datatype, allowable_values)
32
+ @allowable_values = allowable_values.map do |value|
33
+ case datatype.to_s
34
+ when /Integer/i
35
+ value.to_i
36
+ when /Float/i
37
+ value.to_f
38
+ else
39
+ value
40
+ end
41
+ end
42
+ end
43
+
44
+ def valid?(value)
45
+ !value || allowable_values.include?(value)
46
+ end
47
+ end
48
+
27
49
  # Attribute mapping from ruby-style variable name to JSON key.
28
50
  def self.attribute_map
29
51
  {
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #Elastic Email REST API
3
3
 
4
- #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://elasticemail.com/account#/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
4
+ #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://app.elasticemail.com/marketing/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
5
5
 
6
6
  The version of the OpenAPI document: 4.0.0
7
7
  Contact: support@elasticemail.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ OpenAPI Generator version: 6.3.0
10
10
 
11
11
  =end
12
12
 
@@ -27,6 +27,28 @@ module ElasticEmail
27
27
 
28
28
  attr_accessor :options
29
29
 
30
+ class EnumAttributeValidator
31
+ attr_reader :datatype
32
+ attr_reader :allowable_values
33
+
34
+ def initialize(datatype, allowable_values)
35
+ @allowable_values = allowable_values.map do |value|
36
+ case datatype.to_s
37
+ when /Integer/i
38
+ value.to_i
39
+ when /Float/i
40
+ value.to_f
41
+ else
42
+ value
43
+ end
44
+ end
45
+ end
46
+
47
+ def valid?(value)
48
+ !value || allowable_values.include?(value)
49
+ end
50
+ end
51
+
30
52
  # Attribute mapping from ruby-style variable name to JSON key.
31
53
  def self.attribute_map
32
54
  {
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #Elastic Email REST API
3
3
 
4
- #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://elasticemail.com/account#/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
4
+ #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://app.elasticemail.com/marketing/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
5
5
 
6
6
  The version of the OpenAPI document: 4.0.0
7
7
  Contact: support@elasticemail.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ OpenAPI Generator version: 6.3.0
10
10
 
11
11
  =end
12
12
 
@@ -29,6 +29,28 @@ module ElasticEmail
29
29
 
30
30
  attr_accessor :split_options
31
31
 
32
+ class EnumAttributeValidator
33
+ attr_reader :datatype
34
+ attr_reader :allowable_values
35
+
36
+ def initialize(datatype, allowable_values)
37
+ @allowable_values = allowable_values.map do |value|
38
+ case datatype.to_s
39
+ when /Integer/i
40
+ value.to_i
41
+ when /Float/i
42
+ value.to_f
43
+ else
44
+ value
45
+ end
46
+ end
47
+ end
48
+
49
+ def valid?(value)
50
+ !value || allowable_values.include?(value)
51
+ end
52
+ end
53
+
32
54
  # Attribute mapping from ruby-style variable name to JSON key.
33
55
  def self.attribute_map
34
56
  {
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #Elastic Email REST API
3
3
 
4
- #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://elasticemail.com/account#/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
4
+ #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://app.elasticemail.com/marketing/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
5
5
 
6
6
  The version of the OpenAPI document: 4.0.0
7
7
  Contact: support@elasticemail.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ OpenAPI Generator version: 6.3.0
10
10
 
11
11
  =end
12
12
 
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #Elastic Email REST API
3
3
 
4
- #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://elasticemail.com/account#/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
4
+ #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://app.elasticemail.com/marketing/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
5
5
 
6
6
  The version of the OpenAPI document: 4.0.0
7
7
  Contact: support@elasticemail.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ OpenAPI Generator version: 6.3.0
10
10
 
11
11
  =end
12
12
 
@@ -24,6 +24,10 @@ module ElasticEmail
24
24
  CANCELLED = "Cancelled".freeze
25
25
  DRAFT = "Draft".freeze
26
26
 
27
+ def self.all_vars
28
+ @all_vars ||= [DELETED, ACTIVE, PROCESSING, SENDING, COMPLETED, PAUSED, CANCELLED, DRAFT].freeze
29
+ end
30
+
27
31
  # Builds the enum from string
28
32
  # @param [String] The enum value in the form of the string
29
33
  # @return [String] The enum value
@@ -35,9 +39,8 @@ module ElasticEmail
35
39
  # @param [String] The enum value in the form of the string
36
40
  # @return [String] The enum value
37
41
  def build_from_hash(value)
38
- constantValues = CampaignStatus.constants.select { |c| CampaignStatus::const_get(c) == value }
39
- raise "Invalid ENUM value #{value} for class #CampaignStatus" if constantValues.empty?
40
- value
42
+ return value if CampaignStatus.all_vars.include?(value)
43
+ raise "Invalid ENUM value #{value} for class #CampaignStatus"
41
44
  end
42
45
  end
43
46
  end
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #Elastic Email REST API
3
3
 
4
- #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://elasticemail.com/account#/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
4
+ #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://app.elasticemail.com/marketing/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
5
5
 
6
6
  The version of the OpenAPI document: 4.0.0
7
7
  Contact: support@elasticemail.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ OpenAPI Generator version: 6.3.0
10
10
 
11
11
  =end
12
12
 
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #Elastic Email REST API
3
3
 
4
- #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://elasticemail.com/account#/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
4
+ #This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://app.elasticemail.com/marketing/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
5
5
 
6
6
  The version of the OpenAPI document: 4.0.0
7
7
  Contact: support@elasticemail.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 6.0.0
9
+ OpenAPI Generator version: 6.3.0
10
10
 
11
11
  =end
12
12