Class: MailchimpMarketing::VerifiedDomainsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/MailchimpMarketing/api/verified_domains_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client) ⇒ VerifiedDomainsApi

Returns a new instance of VerifiedDomainsApi.



19
20
21
# File 'lib/MailchimpMarketing/api/verified_domains_api.rb', line 19

def initialize(api_client)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/MailchimpMarketing/api/verified_domains_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_verified_domain(body = {}, opts = {}) ⇒ VerifiedDomains

Add a domain to the account, triggering a verification e-mail to the provided address. Add a domain to the account.

Parameters:

  • body (defaults to: {})
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (VerifiedDomains)


27
28
29
30
# File 'lib/MailchimpMarketing/api/verified_domains_api.rb', line 27

def create_verified_domain(body = {}, opts = {})
  data, _status_code, _headers = create_verified_domain_with_http_info(body, opts)
  data
end

#create_verified_domain_with_http_info(body, opts = {}) ⇒ Array<(VerifiedDomains, Fixnum, Hash)>

Add a domain to the account, triggering a verification e-mail to the provided address. Add a domain to the account.

Parameters:

  • body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(VerifiedDomains, Fixnum, Hash)>)

    VerifiedDomains data, response status code and response headers



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/MailchimpMarketing/api/verified_domains_api.rb', line 37

def create_verified_domain_with_http_info(body, opts = {})
  # resource path
  local_var_path = '/verified-domains'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'VerifiedDomains')
  return data, status_code, headers
end

#delete_domain(domain_name = {}, opts = {}) ⇒ nil

Delete a verified domain Delete a verified domain from the account.

Parameters:

  • domain_name (defaults to: {})

    The domain to be verified.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


71
72
73
74
# File 'lib/MailchimpMarketing/api/verified_domains_api.rb', line 71

def delete_domain(domain_name = {}, opts = {})
  delete_domain_with_http_info(domain_name, opts)
  nil
end

#delete_domain_with_http_info(domain_name, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete a verified domain Delete a verified domain from the account.

Parameters:

  • domain_name

    The domain to be verified.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/MailchimpMarketing/api/verified_domains_api.rb', line 81

def delete_domain_with_http_info(domain_name, opts = {})
  # resource path
  local_var_path = '/verified-domains/{domain_name}'.sub('{' + 'domain_name' + '}', domain_name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  return data, status_code, headers
end

#get_domain(domain_name = {}, opts = {}) ⇒ VerifiedDomains

Get the details for a single domain on the account. Get the details for a single domain on the account.

Parameters:

  • domain_name (defaults to: {})

    The domain to be verified.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (VerifiedDomains)


114
115
116
117
# File 'lib/MailchimpMarketing/api/verified_domains_api.rb', line 114

def get_domain(domain_name = {}, opts = {})
  data, _status_code, _headers = get_domain_with_http_info(domain_name, opts)
  data
end

#get_domain_with_http_info(domain_name, opts = {}) ⇒ Array<(VerifiedDomains, Fixnum, Hash)>

Get the details for a single domain on the account. Get the details for a single domain on the account.

Parameters:

  • domain_name

    The domain to be verified.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(VerifiedDomains, Fixnum, Hash)>)

    VerifiedDomains data, response status code and response headers



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# File 'lib/MailchimpMarketing/api/verified_domains_api.rb', line 124

def get_domain_with_http_info(domain_name, opts = {})
  # resource path
  local_var_path = '/verified-domains/{domain_name}'.sub('{' + 'domain_name' + '}', domain_name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'VerifiedDomains')
  return data, status_code, headers
end

#get_verified_domains_all(opts = {}) ⇒ VerifiedDomains1

Get all of the sending domains on the account. Get all of the sending domains on the account.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (VerifiedDomains1)


157
158
159
160
# File 'lib/MailchimpMarketing/api/verified_domains_api.rb', line 157

def get_verified_domains_all(opts = {})
  data, _status_code, _headers = get_verified_domains_all_with_http_info(opts)
  data
end

#get_verified_domains_all_with_http_info(opts = {}) ⇒ Array<(VerifiedDomains1, Fixnum, Hash)>

Get all of the sending domains on the account. Get all of the sending domains on the account.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(VerifiedDomains1, Fixnum, Hash)>)

    VerifiedDomains1 data, response status code and response headers



166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
# File 'lib/MailchimpMarketing/api/verified_domains_api.rb', line 166

def get_verified_domains_all_with_http_info(opts = {})
  # resource path
  local_var_path = '/verified-domains'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'VerifiedDomains1')
  return data, status_code, headers
end

#submit_domain_verification(domain_name = {}, body = {}, opts = {}) ⇒ VerifiedDomains

Submit a response to the verification challenge and verify a domain for sending. Verify a domain for sending.

Parameters:

  • domain_name (defaults to: {})

    The domain to be verified.

  • body (defaults to: {})
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (VerifiedDomains)


201
202
203
204
# File 'lib/MailchimpMarketing/api/verified_domains_api.rb', line 201

def submit_domain_verification(domain_name = {}, body = {}, opts = {})
  data, _status_code, _headers = submit_domain_verification_with_http_info(domain_name, body, opts)
  data
end

#submit_domain_verification_with_http_info(domain_name, body, opts = {}) ⇒ Array<(VerifiedDomains, Fixnum, Hash)>

Submit a response to the verification challenge and verify a domain for sending. Verify a domain for sending.

Parameters:

  • domain_name

    The domain to be verified.

  • body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(VerifiedDomains, Fixnum, Hash)>)

    VerifiedDomains data, response status code and response headers



212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/MailchimpMarketing/api/verified_domains_api.rb', line 212

def submit_domain_verification_with_http_info(domain_name, body, opts = {})
  # resource path
  local_var_path = '/verified-domains/{domain_name}/actions/verify'.sub('{' + 'domain_name' + '}', domain_name.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'VerifiedDomains')
  return data, status_code, headers
end