mimepost 1.0.0

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 (112) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +144 -0
  4. data/Rakefile +8 -0
  5. data/docs/AccountProfile.md +23 -0
  6. data/docs/AccountProfileResponse.md +10 -0
  7. data/docs/AccountSettings.md +9 -0
  8. data/docs/AccountsApi.md +216 -0
  9. data/docs/ApiResponse.md +10 -0
  10. data/docs/ApiResponseAllWebhooks.md +10 -0
  11. data/docs/ApiResponseAllWebhooksData.md +13 -0
  12. data/docs/ApiResponseDomainsList.md +10 -0
  13. data/docs/ApiResponseDomainsListData.md +20 -0
  14. data/docs/ApiResponseEmaillogs.md +10 -0
  15. data/docs/ApiResponseEmaillogsData.md +12 -0
  16. data/docs/ApiResponseSingleWebhooks.md +10 -0
  17. data/docs/ApiResponseStats.md +10 -0
  18. data/docs/ApiResponseStatsData.md +10 -0
  19. data/docs/ApiResponseStatsDataDatewiseSummary.md +8 -0
  20. data/docs/ApiResponseStatsDataGraphSummary.md +9 -0
  21. data/docs/ApiResponseStatsDataTotalSummary.md +8 -0
  22. data/docs/ApiResponseStatsDataTotalSummaryStatus.md +9 -0
  23. data/docs/ApiResponseWebhooks.md +10 -0
  24. data/docs/ApiResponseWebhooksData.md +8 -0
  25. data/docs/Domain.md +8 -0
  26. data/docs/DomainsApi.md +427 -0
  27. data/docs/Email.md +17 -0
  28. data/docs/EmailAttachments.md +10 -0
  29. data/docs/EmailGlobalMergeVars.md +9 -0
  30. data/docs/EmailMergeVars.md +9 -0
  31. data/docs/EmailTo.md +9 -0
  32. data/docs/EmailsApi.md +63 -0
  33. data/docs/StatsApi.md +130 -0
  34. data/docs/Webhook.md +11 -0
  35. data/docs/Webhook1.md +11 -0
  36. data/docs/WebhooksApi.md +272 -0
  37. data/example.accounts.rb +22 -0
  38. data/git_push.sh +55 -0
  39. data/lib/mimepost.rb +71 -0
  40. data/lib/mimepost/api/accounts_api.rb +227 -0
  41. data/lib/mimepost/api/domains_api.rb +429 -0
  42. data/lib/mimepost/api/emails_api.rb +77 -0
  43. data/lib/mimepost/api/stats_api.rb +158 -0
  44. data/lib/mimepost/api/webhooks_api.rb +275 -0
  45. data/lib/mimepost/api_client.rb +391 -0
  46. data/lib/mimepost/api_error.rb +38 -0
  47. data/lib/mimepost/configuration.rb +209 -0
  48. data/lib/mimepost/models/account_profile.rb +325 -0
  49. data/lib/mimepost/models/account_profile_response.rb +203 -0
  50. data/lib/mimepost/models/account_settings.rb +194 -0
  51. data/lib/mimepost/models/api_response.rb +203 -0
  52. data/lib/mimepost/models/api_response_all_webhooks.rb +205 -0
  53. data/lib/mimepost/models/api_response_all_webhooks_data.rb +231 -0
  54. data/lib/mimepost/models/api_response_domains_list.rb +205 -0
  55. data/lib/mimepost/models/api_response_domains_list_data.rb +326 -0
  56. data/lib/mimepost/models/api_response_emaillogs.rb +205 -0
  57. data/lib/mimepost/models/api_response_emaillogs_data.rb +220 -0
  58. data/lib/mimepost/models/api_response_single_webhooks.rb +203 -0
  59. data/lib/mimepost/models/api_response_stats.rb +203 -0
  60. data/lib/mimepost/models/api_response_stats_data.rb +202 -0
  61. data/lib/mimepost/models/api_response_stats_data_datewise_summary.rb +184 -0
  62. data/lib/mimepost/models/api_response_stats_data_graph_summary.rb +197 -0
  63. data/lib/mimepost/models/api_response_stats_data_total_summary.rb +184 -0
  64. data/lib/mimepost/models/api_response_stats_data_total_summary_status.rb +193 -0
  65. data/lib/mimepost/models/api_response_webhooks.rb +203 -0
  66. data/lib/mimepost/models/api_response_webhooks_data.rb +184 -0
  67. data/lib/mimepost/models/domain.rb +189 -0
  68. data/lib/mimepost/models/email.rb +297 -0
  69. data/lib/mimepost/models/email_attachments.rb +202 -0
  70. data/lib/mimepost/models/email_global_merge_vars.rb +193 -0
  71. data/lib/mimepost/models/email_merge_vars.rb +193 -0
  72. data/lib/mimepost/models/email_to.rb +195 -0
  73. data/lib/mimepost/models/webhook.rb +223 -0
  74. data/lib/mimepost/models/webhook_1.rb +223 -0
  75. data/lib/mimepost/version.rb +15 -0
  76. data/mimepost.gemspec +46 -0
  77. data/spec/api/accounts_api_spec.rb +81 -0
  78. data/spec/api/domains_api_spec.rb +122 -0
  79. data/spec/api/emails_api_spec.rb +47 -0
  80. data/spec/api/stats_api_spec.rb +63 -0
  81. data/spec/api/webhooks_api_spec.rb +90 -0
  82. data/spec/api_client_spec.rb +243 -0
  83. data/spec/configuration_spec.rb +42 -0
  84. data/spec/models/account_profile_response_spec.rb +53 -0
  85. data/spec/models/account_profile_spec.rb +131 -0
  86. data/spec/models/account_settings_spec.rb +47 -0
  87. data/spec/models/api_response_all_webhooks_data_spec.rb +71 -0
  88. data/spec/models/api_response_all_webhooks_spec.rb +53 -0
  89. data/spec/models/api_response_domains_list_data_spec.rb +117 -0
  90. data/spec/models/api_response_domains_list_spec.rb +53 -0
  91. data/spec/models/api_response_emaillogs_data_spec.rb +65 -0
  92. data/spec/models/api_response_emaillogs_spec.rb +53 -0
  93. data/spec/models/api_response_single_webhooks_spec.rb +53 -0
  94. data/spec/models/api_response_spec.rb +53 -0
  95. data/spec/models/api_response_stats_data_datewise_summary_spec.rb +41 -0
  96. data/spec/models/api_response_stats_data_graph_summary_spec.rb +47 -0
  97. data/spec/models/api_response_stats_data_spec.rb +53 -0
  98. data/spec/models/api_response_stats_data_total_summary_spec.rb +41 -0
  99. data/spec/models/api_response_stats_data_total_summary_status_spec.rb +47 -0
  100. data/spec/models/api_response_stats_spec.rb +53 -0
  101. data/spec/models/api_response_webhooks_data_spec.rb +41 -0
  102. data/spec/models/api_response_webhooks_spec.rb +53 -0
  103. data/spec/models/domain_spec.rb +41 -0
  104. data/spec/models/email_attachments_spec.rb +53 -0
  105. data/spec/models/email_global_merge_vars_spec.rb +47 -0
  106. data/spec/models/email_merge_vars_spec.rb +47 -0
  107. data/spec/models/email_spec.rb +95 -0
  108. data/spec/models/email_to_spec.rb +47 -0
  109. data/spec/models/webhook_1_spec.rb +59 -0
  110. data/spec/models/webhook_spec.rb +59 -0
  111. data/spec/spec_helper.rb +111 -0
  112. metadata +390 -0
@@ -0,0 +1,22 @@
1
+ # Load the gem
2
+ require 'mimepost'
3
+
4
+ # Setup authorization
5
+ Mimepost.configure do |config|
6
+ # Configure API key authorization: api_key
7
+ config.api_key['X-Auth-Token'] = 'YOUR API KEY'
8
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
9
+ #config.api_key_prefix['X-Auth-Token'] = 'Bearer'
10
+ end
11
+
12
+ api_instance = Mimepost::AccountsApi.new
13
+
14
+ begin
15
+ #Get account profile details
16
+ result = api_instance.account_profile_get
17
+ p result
18
+ rescue Mimepost::ApiError => e
19
+ puts "Exception when calling AccountsApi->account_profile_get: #{e}"
20
+ end
21
+
22
+
data/git_push.sh ADDED
@@ -0,0 +1,55 @@
1
+ #!/bin/sh
2
+ #
3
+ # Generated by: https://github.com/swagger-api/swagger-codegen.git
4
+ #
5
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
6
+ #
7
+ # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
8
+
9
+ git_user_id=$1
10
+ git_repo_id=$2
11
+ release_note=$3
12
+
13
+ if [ "$git_user_id" = "" ]; then
14
+ git_user_id="mimepost"
15
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
16
+ fi
17
+
18
+ if [ "$git_repo_id" = "" ]; then
19
+ git_repo_id="mimepost-ruby"
20
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
21
+ fi
22
+
23
+ if [ "$release_note" = "" ]; then
24
+ release_note="Minor update"
25
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
26
+ fi
27
+
28
+ # Initialize the local directory as a Git repository
29
+ git init
30
+
31
+ # Adds the files in the local repository and stages them for commit.
32
+ git add .
33
+
34
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
35
+ git commit -m "$release_note"
36
+
37
+ # Sets the new remote
38
+ git_remote=`git remote`
39
+ if [ "$git_remote" = "" ]; then # git remote not defined
40
+
41
+ if [ "$GIT_TOKEN" = "" ]; then
42
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
43
+ git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
44
+ else
45
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
46
+ fi
47
+
48
+ fi
49
+
50
+ git pull origin master
51
+
52
+ # Pushes (Forces) the changes in the local repository up to the remote repository
53
+ echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
54
+ git push origin master 2>&1 | grep -v 'To https'
55
+
data/lib/mimepost.rb ADDED
@@ -0,0 +1,71 @@
1
+ =begin
2
+ #mimepost
3
+
4
+ #MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters.
5
+
6
+ OpenAPI spec version: 0.1.0
7
+ Contact: support@mimepost.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.18
10
+
11
+ =end
12
+
13
+ # Common files
14
+ require 'mimepost/api_client'
15
+ require 'mimepost/api_error'
16
+ require 'mimepost/version'
17
+ require 'mimepost/configuration'
18
+
19
+ # Models
20
+ require 'mimepost/models/account_profile'
21
+ require 'mimepost/models/account_profile_response'
22
+ require 'mimepost/models/account_settings'
23
+ require 'mimepost/models/api_response'
24
+ require 'mimepost/models/api_response_all_webhooks'
25
+ require 'mimepost/models/api_response_all_webhooks_data'
26
+ require 'mimepost/models/api_response_domains_list'
27
+ require 'mimepost/models/api_response_domains_list_data'
28
+ require 'mimepost/models/api_response_emaillogs'
29
+ require 'mimepost/models/api_response_emaillogs_data'
30
+ require 'mimepost/models/api_response_single_webhooks'
31
+ require 'mimepost/models/api_response_stats'
32
+ require 'mimepost/models/api_response_stats_data'
33
+ require 'mimepost/models/api_response_stats_data_datewise_summary'
34
+ require 'mimepost/models/api_response_stats_data_graph_summary'
35
+ require 'mimepost/models/api_response_stats_data_total_summary'
36
+ require 'mimepost/models/api_response_stats_data_total_summary_status'
37
+ require 'mimepost/models/api_response_webhooks'
38
+ require 'mimepost/models/api_response_webhooks_data'
39
+ require 'mimepost/models/domain'
40
+ require 'mimepost/models/email'
41
+ require 'mimepost/models/email_attachments'
42
+ require 'mimepost/models/email_global_merge_vars'
43
+ require 'mimepost/models/email_merge_vars'
44
+ require 'mimepost/models/email_to'
45
+ require 'mimepost/models/webhook'
46
+ require 'mimepost/models/webhook_1'
47
+
48
+ # APIs
49
+ require 'mimepost/api/accounts_api'
50
+ require 'mimepost/api/domains_api'
51
+ require 'mimepost/api/emails_api'
52
+ require 'mimepost/api/stats_api'
53
+ require 'mimepost/api/webhooks_api'
54
+
55
+ module Mimepost
56
+ class << self
57
+ # Customize default settings for the SDK using block.
58
+ # Mimepost.configure do |config|
59
+ # config.username = "xxx"
60
+ # config.password = "xxx"
61
+ # end
62
+ # If no block given, return the default Configuration object.
63
+ def configure
64
+ if block_given?
65
+ yield(Configuration.default)
66
+ else
67
+ Configuration.default
68
+ end
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,227 @@
1
+ =begin
2
+ #mimepost
3
+
4
+ #MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters.
5
+
6
+ OpenAPI spec version: 0.1.0
7
+ Contact: support@mimepost.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.18
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module Mimepost
16
+ class AccountsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get account profile details
23
+ #
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [AccountProfileResponse]
26
+ def account_profile_get(opts = {})
27
+ data, _status_code, _headers = account_profile_get_with_http_info(opts)
28
+ data
29
+ end
30
+
31
+ # Get account profile details
32
+ #
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(AccountProfileResponse, Fixnum, Hash)>] AccountProfileResponse data, response status code and response headers
35
+ def account_profile_get_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: AccountsApi.account_profile_get ...'
38
+ end
39
+ # resource path
40
+ local_var_path = '/account/profile/'
41
+
42
+ # query parameters
43
+ query_params = {}
44
+
45
+ # header parameters
46
+ header_params = {}
47
+ # HTTP header 'Accept' (if needed)
48
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
49
+ # HTTP header 'Content-Type'
50
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
51
+
52
+ # form parameters
53
+ form_params = {}
54
+
55
+ # http body (model)
56
+ post_body = nil
57
+ auth_names = ['api_key']
58
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
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 => 'AccountProfileResponse')
65
+ if @api_client.config.debugging
66
+ @api_client.config.logger.debug "API called: AccountsApi#account_profile_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
67
+ end
68
+ return data, status_code, headers
69
+ end
70
+ # Update account profile details
71
+ #
72
+ # @param body
73
+ # @param [Hash] opts the optional parameters
74
+ # @return [ApiResponse]
75
+ def account_profile_post(body, opts = {})
76
+ data, _status_code, _headers = account_profile_post_with_http_info(body, opts)
77
+ data
78
+ end
79
+
80
+ # Update account profile details
81
+ #
82
+ # @param body
83
+ # @param [Hash] opts the optional parameters
84
+ # @return [Array<(ApiResponse, Fixnum, Hash)>] ApiResponse data, response status code and response headers
85
+ def account_profile_post_with_http_info(body, opts = {})
86
+ if @api_client.config.debugging
87
+ @api_client.config.logger.debug 'Calling API: AccountsApi.account_profile_post ...'
88
+ end
89
+ # verify the required parameter 'body' is set
90
+ if @api_client.config.client_side_validation && body.nil?
91
+ fail ArgumentError, "Missing the required parameter 'body' when calling AccountsApi.account_profile_post"
92
+ end
93
+ # resource path
94
+ local_var_path = '/account/profile/'
95
+
96
+ # query parameters
97
+ query_params = {}
98
+
99
+ # header parameters
100
+ header_params = {}
101
+ # HTTP header 'Accept' (if needed)
102
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
103
+ # HTTP header 'Content-Type'
104
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
105
+
106
+ # form parameters
107
+ form_params = {}
108
+
109
+ # http body (model)
110
+ post_body = @api_client.object_to_http_body(body)
111
+ auth_names = ['api_key']
112
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
113
+ :header_params => header_params,
114
+ :query_params => query_params,
115
+ :form_params => form_params,
116
+ :body => post_body,
117
+ :auth_names => auth_names,
118
+ :return_type => 'ApiResponse')
119
+ if @api_client.config.debugging
120
+ @api_client.config.logger.debug "API called: AccountsApi#account_profile_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
121
+ end
122
+ return data, status_code, headers
123
+ end
124
+ # Get all the settings
125
+ #
126
+ # @param [Hash] opts the optional parameters
127
+ # @return [AccountSettings]
128
+ def settings_get(opts = {})
129
+ data, _status_code, _headers = settings_get_with_http_info(opts)
130
+ data
131
+ end
132
+
133
+ # Get all the settings
134
+ #
135
+ # @param [Hash] opts the optional parameters
136
+ # @return [Array<(AccountSettings, Fixnum, Hash)>] AccountSettings data, response status code and response headers
137
+ def settings_get_with_http_info(opts = {})
138
+ if @api_client.config.debugging
139
+ @api_client.config.logger.debug 'Calling API: AccountsApi.settings_get ...'
140
+ end
141
+ # resource path
142
+ local_var_path = '/settings/'
143
+
144
+ # query parameters
145
+ query_params = {}
146
+
147
+ # header parameters
148
+ header_params = {}
149
+ # HTTP header 'Accept' (if needed)
150
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
151
+ # HTTP header 'Content-Type'
152
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
153
+
154
+ # form parameters
155
+ form_params = {}
156
+
157
+ # http body (model)
158
+ post_body = nil
159
+ auth_names = ['api_key']
160
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
161
+ :header_params => header_params,
162
+ :query_params => query_params,
163
+ :form_params => form_params,
164
+ :body => post_body,
165
+ :auth_names => auth_names,
166
+ :return_type => 'AccountSettings')
167
+ if @api_client.config.debugging
168
+ @api_client.config.logger.debug "API called: AccountsApi#settings_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
169
+ end
170
+ return data, status_code, headers
171
+ end
172
+ # Set a setting
173
+ #
174
+ # @param body
175
+ # @param [Hash] opts the optional parameters
176
+ # @return [ApiResponse]
177
+ def settings_post(body, opts = {})
178
+ data, _status_code, _headers = settings_post_with_http_info(body, opts)
179
+ data
180
+ end
181
+
182
+ # Set a setting
183
+ #
184
+ # @param body
185
+ # @param [Hash] opts the optional parameters
186
+ # @return [Array<(ApiResponse, Fixnum, Hash)>] ApiResponse data, response status code and response headers
187
+ def settings_post_with_http_info(body, opts = {})
188
+ if @api_client.config.debugging
189
+ @api_client.config.logger.debug 'Calling API: AccountsApi.settings_post ...'
190
+ end
191
+ # verify the required parameter 'body' is set
192
+ if @api_client.config.client_side_validation && body.nil?
193
+ fail ArgumentError, "Missing the required parameter 'body' when calling AccountsApi.settings_post"
194
+ end
195
+ # resource path
196
+ local_var_path = '/settings/'
197
+
198
+ # query parameters
199
+ query_params = {}
200
+
201
+ # header parameters
202
+ header_params = {}
203
+ # HTTP header 'Accept' (if needed)
204
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
205
+ # HTTP header 'Content-Type'
206
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
207
+
208
+ # form parameters
209
+ form_params = {}
210
+
211
+ # http body (model)
212
+ post_body = @api_client.object_to_http_body(body)
213
+ auth_names = ['api_key']
214
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
215
+ :header_params => header_params,
216
+ :query_params => query_params,
217
+ :form_params => form_params,
218
+ :body => post_body,
219
+ :auth_names => auth_names,
220
+ :return_type => 'ApiResponse')
221
+ if @api_client.config.debugging
222
+ @api_client.config.logger.debug "API called: AccountsApi#settings_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
223
+ end
224
+ return data, status_code, headers
225
+ end
226
+ end
227
+ end
@@ -0,0 +1,429 @@
1
+ =begin
2
+ #mimepost
3
+
4
+ #MimePost API for sending email. You can find out more about MimePost at [https://mimepost.com](http://mimepost.com). For this sample, you can use the api key `special-key` to test the authorization filters.
5
+
6
+ OpenAPI spec version: 0.1.0
7
+ Contact: support@mimepost.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.18
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module Mimepost
16
+ class DomainsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get a list of all the domains
23
+ # @param [Hash] opts the optional parameters
24
+ # @return [ApiResponseDomainsList]
25
+ def domains_get(opts = {})
26
+ data, _status_code, _headers = domains_get_with_http_info(opts)
27
+ data
28
+ end
29
+
30
+ # Get a list of all the domains
31
+ # @param [Hash] opts the optional parameters
32
+ # @return [Array<(ApiResponseDomainsList, Fixnum, Hash)>] ApiResponseDomainsList data, response status code and response headers
33
+ def domains_get_with_http_info(opts = {})
34
+ if @api_client.config.debugging
35
+ @api_client.config.logger.debug 'Calling API: DomainsApi.domains_get ...'
36
+ end
37
+ # resource path
38
+ local_var_path = '/domains/'
39
+
40
+ # query parameters
41
+ query_params = {}
42
+
43
+ # header parameters
44
+ header_params = {}
45
+ # HTTP header 'Accept' (if needed)
46
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
47
+ # HTTP header 'Content-Type'
48
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
49
+
50
+ # form parameters
51
+ form_params = {}
52
+
53
+ # http body (model)
54
+ post_body = nil
55
+ auth_names = ['api_key']
56
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
57
+ :header_params => header_params,
58
+ :query_params => query_params,
59
+ :form_params => form_params,
60
+ :body => post_body,
61
+ :auth_names => auth_names,
62
+ :return_type => 'ApiResponseDomainsList')
63
+ if @api_client.config.debugging
64
+ @api_client.config.logger.debug "API called: DomainsApi#domains_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
65
+ end
66
+ return data, status_code, headers
67
+ end
68
+ # Submit request for the approval of a verified domain
69
+ # @param id
70
+ # @param [Hash] opts the optional parameters
71
+ # @return [ApiResponse]
72
+ def domains_id_approve_post(id, opts = {})
73
+ data, _status_code, _headers = domains_id_approve_post_with_http_info(id, opts)
74
+ data
75
+ end
76
+
77
+ # Submit request for the approval of a verified domain
78
+ # @param id
79
+ # @param [Hash] opts the optional parameters
80
+ # @return [Array<(ApiResponse, Fixnum, Hash)>] ApiResponse data, response status code and response headers
81
+ def domains_id_approve_post_with_http_info(id, opts = {})
82
+ if @api_client.config.debugging
83
+ @api_client.config.logger.debug 'Calling API: DomainsApi.domains_id_approve_post ...'
84
+ end
85
+ # verify the required parameter 'id' is set
86
+ if @api_client.config.client_side_validation && id.nil?
87
+ fail ArgumentError, "Missing the required parameter 'id' when calling DomainsApi.domains_id_approve_post"
88
+ end
89
+ # resource path
90
+ local_var_path = '/domains/{id}/approve/'.sub('{' + 'id' + '}', id.to_s)
91
+
92
+ # query parameters
93
+ query_params = {}
94
+
95
+ # header parameters
96
+ header_params = {}
97
+ # HTTP header 'Accept' (if needed)
98
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
99
+ # HTTP header 'Content-Type'
100
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
101
+
102
+ # form parameters
103
+ form_params = {}
104
+
105
+ # http body (model)
106
+ post_body = nil
107
+ auth_names = ['api_key']
108
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
109
+ :header_params => header_params,
110
+ :query_params => query_params,
111
+ :form_params => form_params,
112
+ :body => post_body,
113
+ :auth_names => auth_names,
114
+ :return_type => 'ApiResponse')
115
+ if @api_client.config.debugging
116
+ @api_client.config.logger.debug "API called: DomainsApi#domains_id_approve_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
117
+ end
118
+ return data, status_code, headers
119
+ end
120
+ # Remove a single domain
121
+ # @param id
122
+ # @param [Hash] opts the optional parameters
123
+ # @return [ApiResponse]
124
+ def domains_id_delete(id, opts = {})
125
+ data, _status_code, _headers = domains_id_delete_with_http_info(id, opts)
126
+ data
127
+ end
128
+
129
+ # Remove a single domain
130
+ # @param id
131
+ # @param [Hash] opts the optional parameters
132
+ # @return [Array<(ApiResponse, Fixnum, Hash)>] ApiResponse data, response status code and response headers
133
+ def domains_id_delete_with_http_info(id, opts = {})
134
+ if @api_client.config.debugging
135
+ @api_client.config.logger.debug 'Calling API: DomainsApi.domains_id_delete ...'
136
+ end
137
+ # verify the required parameter 'id' is set
138
+ if @api_client.config.client_side_validation && id.nil?
139
+ fail ArgumentError, "Missing the required parameter 'id' when calling DomainsApi.domains_id_delete"
140
+ end
141
+ # resource path
142
+ local_var_path = '/domains/{id}'.sub('{' + 'id' + '}', id.to_s)
143
+
144
+ # query parameters
145
+ query_params = {}
146
+
147
+ # header parameters
148
+ header_params = {}
149
+ # HTTP header 'Accept' (if needed)
150
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
151
+ # HTTP header 'Content-Type'
152
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
153
+
154
+ # form parameters
155
+ form_params = {}
156
+
157
+ # http body (model)
158
+ post_body = nil
159
+ auth_names = ['api_key']
160
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
161
+ :header_params => header_params,
162
+ :query_params => query_params,
163
+ :form_params => form_params,
164
+ :body => post_body,
165
+ :auth_names => auth_names,
166
+ :return_type => 'ApiResponse')
167
+ if @api_client.config.debugging
168
+ @api_client.config.logger.debug "API called: DomainsApi#domains_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
169
+ end
170
+ return data, status_code, headers
171
+ end
172
+ # Get the details of a single domain
173
+ # @param id
174
+ # @param [Hash] opts the optional parameters
175
+ # @return [ApiResponseDomainsList]
176
+ def domains_id_get(id, opts = {})
177
+ data, _status_code, _headers = domains_id_get_with_http_info(id, opts)
178
+ data
179
+ end
180
+
181
+ # Get the details of a single domain
182
+ # @param id
183
+ # @param [Hash] opts the optional parameters
184
+ # @return [Array<(ApiResponseDomainsList, Fixnum, Hash)>] ApiResponseDomainsList data, response status code and response headers
185
+ def domains_id_get_with_http_info(id, opts = {})
186
+ if @api_client.config.debugging
187
+ @api_client.config.logger.debug 'Calling API: DomainsApi.domains_id_get ...'
188
+ end
189
+ # verify the required parameter 'id' is set
190
+ if @api_client.config.client_side_validation && id.nil?
191
+ fail ArgumentError, "Missing the required parameter 'id' when calling DomainsApi.domains_id_get"
192
+ end
193
+ # resource path
194
+ local_var_path = '/domains/{id}'.sub('{' + 'id' + '}', id.to_s)
195
+
196
+ # query parameters
197
+ query_params = {}
198
+
199
+ # header parameters
200
+ header_params = {}
201
+ # HTTP header 'Accept' (if needed)
202
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
203
+ # HTTP header 'Content-Type'
204
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
205
+
206
+ # form parameters
207
+ form_params = {}
208
+
209
+ # http body (model)
210
+ post_body = nil
211
+ auth_names = ['api_key']
212
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
213
+ :header_params => header_params,
214
+ :query_params => query_params,
215
+ :form_params => form_params,
216
+ :body => post_body,
217
+ :auth_names => auth_names,
218
+ :return_type => 'ApiResponseDomainsList')
219
+ if @api_client.config.debugging
220
+ @api_client.config.logger.debug "API called: DomainsApi#domains_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
221
+ end
222
+ return data, status_code, headers
223
+ end
224
+ # Request for the verification of DKIM record for a single domain
225
+ # @param id
226
+ # @param [Hash] opts the optional parameters
227
+ # @return [ApiResponse]
228
+ def domains_id_verify_dkim_post(id, opts = {})
229
+ data, _status_code, _headers = domains_id_verify_dkim_post_with_http_info(id, opts)
230
+ data
231
+ end
232
+
233
+ # Request for the verification of DKIM record for a single domain
234
+ # @param id
235
+ # @param [Hash] opts the optional parameters
236
+ # @return [Array<(ApiResponse, Fixnum, Hash)>] ApiResponse data, response status code and response headers
237
+ def domains_id_verify_dkim_post_with_http_info(id, opts = {})
238
+ if @api_client.config.debugging
239
+ @api_client.config.logger.debug 'Calling API: DomainsApi.domains_id_verify_dkim_post ...'
240
+ end
241
+ # verify the required parameter 'id' is set
242
+ if @api_client.config.client_side_validation && id.nil?
243
+ fail ArgumentError, "Missing the required parameter 'id' when calling DomainsApi.domains_id_verify_dkim_post"
244
+ end
245
+ # resource path
246
+ local_var_path = '/domains/{id}/verify_dkim/'.sub('{' + 'id' + '}', id.to_s)
247
+
248
+ # query parameters
249
+ query_params = {}
250
+
251
+ # header parameters
252
+ header_params = {}
253
+ # HTTP header 'Accept' (if needed)
254
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
255
+ # HTTP header 'Content-Type'
256
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
257
+
258
+ # form parameters
259
+ form_params = {}
260
+
261
+ # http body (model)
262
+ post_body = nil
263
+ auth_names = ['api_key']
264
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
265
+ :header_params => header_params,
266
+ :query_params => query_params,
267
+ :form_params => form_params,
268
+ :body => post_body,
269
+ :auth_names => auth_names,
270
+ :return_type => 'ApiResponse')
271
+ if @api_client.config.debugging
272
+ @api_client.config.logger.debug "API called: DomainsApi#domains_id_verify_dkim_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
273
+ end
274
+ return data, status_code, headers
275
+ end
276
+ # Request for the verification of SPF record for a single domain
277
+ # @param id
278
+ # @param [Hash] opts the optional parameters
279
+ # @return [ApiResponse]
280
+ def domains_id_verify_spf_post(id, opts = {})
281
+ data, _status_code, _headers = domains_id_verify_spf_post_with_http_info(id, opts)
282
+ data
283
+ end
284
+
285
+ # Request for the verification of SPF record for a single domain
286
+ # @param id
287
+ # @param [Hash] opts the optional parameters
288
+ # @return [Array<(ApiResponse, Fixnum, Hash)>] ApiResponse data, response status code and response headers
289
+ def domains_id_verify_spf_post_with_http_info(id, opts = {})
290
+ if @api_client.config.debugging
291
+ @api_client.config.logger.debug 'Calling API: DomainsApi.domains_id_verify_spf_post ...'
292
+ end
293
+ # verify the required parameter 'id' is set
294
+ if @api_client.config.client_side_validation && id.nil?
295
+ fail ArgumentError, "Missing the required parameter 'id' when calling DomainsApi.domains_id_verify_spf_post"
296
+ end
297
+ # resource path
298
+ local_var_path = '/domains/{id}/verify_spf/'.sub('{' + 'id' + '}', id.to_s)
299
+
300
+ # query parameters
301
+ query_params = {}
302
+
303
+ # header parameters
304
+ header_params = {}
305
+ # HTTP header 'Accept' (if needed)
306
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
307
+ # HTTP header 'Content-Type'
308
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
309
+
310
+ # form parameters
311
+ form_params = {}
312
+
313
+ # http body (model)
314
+ post_body = nil
315
+ auth_names = ['api_key']
316
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
317
+ :header_params => header_params,
318
+ :query_params => query_params,
319
+ :form_params => form_params,
320
+ :body => post_body,
321
+ :auth_names => auth_names,
322
+ :return_type => 'ApiResponse')
323
+ if @api_client.config.debugging
324
+ @api_client.config.logger.debug "API called: DomainsApi#domains_id_verify_spf_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
325
+ end
326
+ return data, status_code, headers
327
+ end
328
+ # Request for the verification of tracking record for a single domain
329
+ # @param id
330
+ # @param [Hash] opts the optional parameters
331
+ # @return [ApiResponse]
332
+ def domains_id_verify_tracking_post(id, opts = {})
333
+ data, _status_code, _headers = domains_id_verify_tracking_post_with_http_info(id, opts)
334
+ data
335
+ end
336
+
337
+ # Request for the verification of tracking record for a single domain
338
+ # @param id
339
+ # @param [Hash] opts the optional parameters
340
+ # @return [Array<(ApiResponse, Fixnum, Hash)>] ApiResponse data, response status code and response headers
341
+ def domains_id_verify_tracking_post_with_http_info(id, opts = {})
342
+ if @api_client.config.debugging
343
+ @api_client.config.logger.debug 'Calling API: DomainsApi.domains_id_verify_tracking_post ...'
344
+ end
345
+ # verify the required parameter 'id' is set
346
+ if @api_client.config.client_side_validation && id.nil?
347
+ fail ArgumentError, "Missing the required parameter 'id' when calling DomainsApi.domains_id_verify_tracking_post"
348
+ end
349
+ # resource path
350
+ local_var_path = '/domains/{id}/verify_tracking/'.sub('{' + 'id' + '}', id.to_s)
351
+
352
+ # query parameters
353
+ query_params = {}
354
+
355
+ # header parameters
356
+ header_params = {}
357
+ # HTTP header 'Accept' (if needed)
358
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
359
+ # HTTP header 'Content-Type'
360
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
361
+
362
+ # form parameters
363
+ form_params = {}
364
+
365
+ # http body (model)
366
+ post_body = nil
367
+ auth_names = ['api_key']
368
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
369
+ :header_params => header_params,
370
+ :query_params => query_params,
371
+ :form_params => form_params,
372
+ :body => post_body,
373
+ :auth_names => auth_names,
374
+ :return_type => 'ApiResponse')
375
+ if @api_client.config.debugging
376
+ @api_client.config.logger.debug "API called: DomainsApi#domains_id_verify_tracking_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
377
+ end
378
+ return data, status_code, headers
379
+ end
380
+ # Add single domain
381
+ # @param [Hash] opts the optional parameters
382
+ # @option opts [Domain] :domain The name of the domain name
383
+ # @return [ApiResponse]
384
+ def domains_post(opts = {})
385
+ data, _status_code, _headers = domains_post_with_http_info(opts)
386
+ data
387
+ end
388
+
389
+ # Add single domain
390
+ # @param [Hash] opts the optional parameters
391
+ # @option opts [Domain] :domain The name of the domain name
392
+ # @return [Array<(ApiResponse, Fixnum, Hash)>] ApiResponse data, response status code and response headers
393
+ def domains_post_with_http_info(opts = {})
394
+ if @api_client.config.debugging
395
+ @api_client.config.logger.debug 'Calling API: DomainsApi.domains_post ...'
396
+ end
397
+ # resource path
398
+ local_var_path = '/domains/'
399
+
400
+ # query parameters
401
+ query_params = {}
402
+
403
+ # header parameters
404
+ header_params = {}
405
+ # HTTP header 'Accept' (if needed)
406
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
407
+ # HTTP header 'Content-Type'
408
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
409
+
410
+ # form parameters
411
+ form_params = {}
412
+
413
+ # http body (model)
414
+ post_body = @api_client.object_to_http_body(opts[:'domain'])
415
+ auth_names = ['api_key']
416
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
417
+ :header_params => header_params,
418
+ :query_params => query_params,
419
+ :form_params => form_params,
420
+ :body => post_body,
421
+ :auth_names => auth_names,
422
+ :return_type => 'ApiResponse')
423
+ if @api_client.config.debugging
424
+ @api_client.config.logger.debug "API called: DomainsApi#domains_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
425
+ end
426
+ return data, status_code, headers
427
+ end
428
+ end
429
+ end