=begin #Mailchimp Transactional API #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 1.0.4 Contact: apihelp@mandrill.com Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.4.12 =end require 'uri' module MailchimpTransactional class UsersApi attr_accessor :api_client attr_accessor :api_key def initialize(api_key = '', api_client = ApiClient.default) @api_key = api_key @api_client = api_client end # /users/info # Return the information about the API-connected user # @param body # @param [Hash] opts the optional parameters # @return [InlineResponse20069] def info(body = {}, opts = {}) data, _status_code, _headers = info_with_http_info(body, opts) data end # /users/info # Return the information about the API-connected user # @param body # @param [Hash] opts the optional parameters # @return [Array<(InlineResponse20069, Fixnum, Hash)>] InlineResponse20069 data, response status code and response headers def info_with_http_info(body, opts = {}) # add api key to request body body[:key] = @api_key # resource path local_var_path = '/users/info' # http body (model) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :body => body, :auth_names => auth_names, :return_type => 'InlineResponse20069') return data, status_code, headers end # /users/ping # Validate an API key and respond to a ping # @param body # @param [Hash] opts the optional parameters # @return [String] def ping(body = {}, opts = {}) data, _status_code, _headers = ping_with_http_info(body, opts) data end # /users/ping # Validate an API key and respond to a ping # @param body # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def ping_with_http_info(body, opts = {}) # add api key to request body body[:key] = @api_key # resource path local_var_path = '/users/ping' # http body (model) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :body => body, :auth_names => auth_names, :return_type => 'String') return data, status_code, headers end # /users/ping2 # Validate an API key and respond to a ping (anal JSON parser version) # @param body # @param [Hash] opts the optional parameters # @return [InlineResponse20070] def ping2(body = {}, opts = {}) data, _status_code, _headers = ping2_with_http_info(body, opts) data end # /users/ping2 # Validate an API key and respond to a ping (anal JSON parser version) # @param body # @param [Hash] opts the optional parameters # @return [Array<(InlineResponse20070, Fixnum, Hash)>] InlineResponse20070 data, response status code and response headers def ping2_with_http_info(body, opts = {}) # add api key to request body body[:key] = @api_key # resource path local_var_path = '/users/ping2' # http body (model) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :body => body, :auth_names => auth_names, :return_type => 'InlineResponse20070') return data, status_code, headers end # /users/senders # Return the senders that have tried to use this account, both verified and unverified # @param body # @param [Hash] opts the optional parameters # @return [Array] def senders(body = {}, opts = {}) data, _status_code, _headers = senders_with_http_info(body, opts) data end # /users/senders # Return the senders that have tried to use this account, both verified and unverified # @param body # @param [Hash] opts the optional parameters # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def senders_with_http_info(body, opts = {}) # add api key to request body body[:key] = @api_key # resource path local_var_path = '/users/senders' # http body (model) auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :body => body, :auth_names => auth_names, :return_type => 'Array') return data, status_code, headers end end end