Class: MailchimpTransactional::InboundApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ InboundApi

Returns a new instance of InboundApi.



19
20
21
# File 'lib/MailchimpTransactional/api/inbound_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/inbound_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

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

Add inbound domain Add an inbound domain to your account.

Parameters:

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

    the optional parameters

Returns:

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

    InlineResponse2009 data, response status code and response headers



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

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

#add_route(body = {}) ⇒ Array<(InlineResponse20013, Fixnum, Hash)>

Add mailbox route Add a new mailbox route to an inbound domain.

Parameters:

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

    the optional parameters

Returns:

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

    InlineResponse20013 data, response status code and response headers



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

def add_route(body = {})
  data = @api_client.call_api(:POST, '/inbound/add-route', body)
  data
end

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

Check domain settings Check the MX settings for an inbound domain. The domain must have already been added with the add-domain call.

Parameters:

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

    the optional parameters

Returns:

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

    InlineResponse20010 data, response status code and response headers



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

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

#delete_domain(body = {}) ⇒ Array<(InlineResponse20011, Fixnum, Hash)>

Delete inbound domain Delete an inbound domain from the account. All mail will stop routing for this domain immediately.

Parameters:

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

    the optional parameters

Returns:

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

    InlineResponse20011 data, response status code and response headers



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

def delete_domain(body = {})
  data = @api_client.call_api(:POST, '/inbound/delete-domain', body)
  data
end

#delete_route(body = {}) ⇒ Array<(InlineResponse20015, Fixnum, Hash)>

Delete mailbox route Delete an existing inbound mailbox route.

Parameters:

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

    the optional parameters

Returns:

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

    InlineResponse20015 data, response status code and response headers



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

def delete_route(body = {})
  data = @api_client.call_api(:POST, '/inbound/delete-route', body)
  data
end

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

List inbound domains List the domains that have been configured for inbound delivery.

Parameters:

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

    the optional parameters

Returns:

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

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



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

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

#routes(body = {}) ⇒ Array<(Array<InlineResponse20012>, Fixnum, Hash)>

List mailbox routes List the mailbox routes defined for an inbound domain.

Parameters:

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

    the optional parameters

Returns:

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

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



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

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

#send_raw(body = {}) ⇒ Array<(Array<InlineResponse20016>, Fixnum, Hash)>

Send mime document Take a raw MIME document destined for a domain with inbound domains set up, and send it to the inbound hook exactly as if it had been sent over SMTP.

Parameters:

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

    the optional parameters

Returns:

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

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



98
99
100
101
# File 'lib/MailchimpTransactional/api/inbound_api.rb', line 98

def send_raw(body = {})
  data = @api_client.call_api(:POST, '/inbound/send-raw', body)
  data
end

#update_route(body = {}) ⇒ Array<(InlineResponse20014, Fixnum, Hash)>

Update mailbox route Update the pattern or webhook of an existing inbound mailbox route. If null is provided for any fields, the values will remain unchanged.

Parameters:

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

    the optional parameters

Returns:

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

    InlineResponse20014 data, response status code and response headers



108
109
110
111
# File 'lib/MailchimpTransactional/api/inbound_api.rb', line 108

def update_route(body = {})
  data = @api_client.call_api(:POST, '/inbound/update-route', body)
  data
end