Class: MailchimpTransactional::UsersApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ UsersApi

Returns a new instance of UsersApi.



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

def api_client
  @api_client
end

Instance Method Details

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

Get user info Return the information about the API-connected user.

Parameters:

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

    the optional parameters

Returns:

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

    InlineResponse20072 data, response status code and response headers



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

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

#ping(body = {}) ⇒ Array<(String, Fixnum, Hash)>

Ping Validate an API key and respond to a ping.

Parameters:

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



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

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

#ping2(body = {}) ⇒ Array<(InlineResponse20073, Fixnum, Hash)>

Ping 2 Validate an API key and respond to a ping (JSON parser version).

Parameters:

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

    the optional parameters

Returns:

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

    InlineResponse20073 data, response status code and response headers



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

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

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

List account senders Return the senders that have tried to use this account, both verified and unverified.

Parameters:

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

    the optional parameters

Returns:

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

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



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

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