Class: MailchimpTransactional::SendersApi

Inherits:
Object
  • Object
show all
Defined in:
lib/MailchimpTransactional/api/senders_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ SendersApi

Returns a new instance of SendersApi.



19
20
21
# File 'lib/MailchimpTransactional/api/senders_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/MailchimpTransactional/api/senders_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#add_domain(body = {}) ⇒ Array<(InlineResponse20045, Fixnum, Hash)>

Add sender domain Adds a sender domain to your account. Sender domains are added automatically as you send, but you can use this call to add them ahead of time.

Parameters:

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

    the optional parameters

Returns:

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

    InlineResponse20045 data, response status code and response headers



28
29
30
31
# File 'lib/MailchimpTransactional/api/senders_api.rb', line 28

def add_domain(body = {})
  data = @api_client.call_api(:POST, '/senders/add-domain', body)
  data
end

#check_domain(body = {}) ⇒ Array<(InlineResponse20046, Fixnum, Hash)>

Check domain settings Checks the SPF and DKIM settings for a domain, as well the domain verification. If you haven&#39;t already added this domain to your account, it will be added automatically.

Parameters:

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

    the optional parameters

Returns:

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

    InlineResponse20046 data, response status code and response headers



38
39
40
41
# File 'lib/MailchimpTransactional/api/senders_api.rb', line 38

def check_domain(body = {})
  data = @api_client.call_api(:POST, '/senders/check-domain', body)
  data
end

#domains(body = {}) ⇒ Array<(Array<InlineResponse20044>, Fixnum, Hash)>

List sender domains Returns the sender domains that have been added to this account.

Parameters:

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

    the optional parameters

Returns:

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

    Array<InlineResponse20044> data, response status code and response headers



48
49
50
51
# File 'lib/MailchimpTransactional/api/senders_api.rb', line 48

def domains(body = {})
  data = @api_client.call_api(:POST, '/senders/domains', body)
  data
end

#info(body = {}) ⇒ Array<(InlineResponse20048, Fixnum, Hash)>

Get sender info Return more detailed information about a single sender, including aggregates of recent stats.

Parameters:

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

    the optional parameters

Returns:

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

    InlineResponse20048 data, response status code and response headers



58
59
60
61
# File 'lib/MailchimpTransactional/api/senders_api.rb', line 58

def info(body = {})
  data = @api_client.call_api(:POST, '/senders/info', body)
  data
end

#list(body = {}) ⇒ Array<(Array<InlineResponse20043>, Fixnum, Hash)>

List account senders Return the senders that have tried to use this account.

Parameters:

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

    the optional parameters

Returns:

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

    Array<InlineResponse20043> data, response status code and response headers



68
69
70
71
# File 'lib/MailchimpTransactional/api/senders_api.rb', line 68

def list(body = {})
  data = @api_client.call_api(:POST, '/senders/list', body)
  data
end

#time_series(body = {}) ⇒ Array<(Array<InlineResponse20049>, Fixnum, Hash)>

View sender history Return the recent history (hourly stats for the last 30 days) for a sender.

Parameters:

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

    the optional parameters

Returns:

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

    Array<InlineResponse20049> data, response status code and response headers



78
79
80
81
# File 'lib/MailchimpTransactional/api/senders_api.rb', line 78

def time_series(body = {})
  data = @api_client.call_api(:POST, '/senders/time-series', body)
  data
end

#verify_domain(body = {}) ⇒ Array<(InlineResponse20047, Fixnum, Hash)>

Verify domain Sends a verification email in order to verify ownership of a domain. Domain verification is a required step to confirm ownership of a domain. Once a domain has been verified in a Transactional API account, other accounts may not have their messages signed by that domain unless they also verify the domain. This prevents other Transactional API accounts from sending mail signed by your domain.

Parameters:

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

    the optional parameters

Returns:

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

    InlineResponse20047 data, response status code and response headers



88
89
90
91
# File 'lib/MailchimpTransactional/api/senders_api.rb', line 88

def verify_domain(body = {})
  data = @api_client.call_api(:POST, '/senders/verify-domain', body)
  data
end