class Bfwd::EmailsApi
Attributes
Public Class Methods
# File lib/bf_ruby2/api/emails_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Retrieves a single invoice, specified by the version-ID parameter. { "nickname" : "Retrieve by version","response" : "getEmailByID.html"} @param email_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [EmailPagedMetadata]
# File lib/bf_ruby2/api/emails_api.rb, line 29 def get_email_by_id(email_id, opts = {}) data, _status_code, _headers = get_email_by_id_with_http_info(email_id, opts) return data end
Retrieves a single invoice, specified by the version-ID parameter. { "nickname" : "Retrieve by version","response" : "getEmailByID.html"} @param email_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [Array<(EmailPagedMetadata
, Fixnum, Hash)>] EmailPagedMetadata
data, response status code and response headers
# File lib/bf_ruby2/api/emails_api.rb, line 40 def get_email_by_id_with_http_info(email_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: EmailsApi.get_email_by_id ..." end # verify the required parameter 'email_id' is set if @api_client.config.client_side_validation && email_id.nil? fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailsApi.get_email_by_id" end # resource path local_var_path = "/emails/{email-ID}".sub('{' + 'email-ID' + '}', email_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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 => 'EmailPagedMetadata') if @api_client.config.debugging @api_client.config.logger.debug "API called: EmailsApi#get_email_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a single invoice, specified by the version-ID parameter. { "nickname" : "Retrieve by version","response" : "getEmailByID.html"} @param email_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [String]
# File lib/bf_ruby2/api/emails_api.rb, line 87 def get_email_html_by_id(email_id, opts = {}) data, _status_code, _headers = get_email_html_by_id_with_http_info(email_id, opts) return data end
Retrieves a single invoice, specified by the version-ID parameter. { "nickname" : "Retrieve by version","response" : "getEmailByID.html"} @param email_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
# File lib/bf_ruby2/api/emails_api.rb, line 98 def get_email_html_by_id_with_http_info(email_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: EmailsApi.get_email_html_by_id ..." end # verify the required parameter 'email_id' is set if @api_client.config.client_side_validation && email_id.nil? fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailsApi.get_email_html_by_id" end # resource path local_var_path = "/emails/{email-ID}.html".sub('{' + 'email-ID' + '}', email_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/html']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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 => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: EmailsApi#get_email_html_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a single invoice, specified by the version-ID parameter. { "nickname" : "Retrieve by version","response" : "getEmailByID.html"} @param email_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [String]
# File lib/bf_ruby2/api/emails_api.rb, line 145 def get_email_text_by_id(email_id, opts = {}) data, _status_code, _headers = get_email_text_by_id_with_http_info(email_id, opts) return data end
Retrieves a single invoice, specified by the version-ID parameter. { "nickname" : "Retrieve by version","response" : "getEmailByID.html"} @param email_id @param [Hash] opts the optional parameters @option opts [Array<String>] :organizations A list of organization-IDs used to restrict the scope of API calls. @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
# File lib/bf_ruby2/api/emails_api.rb, line 156 def get_email_text_by_id_with_http_info(email_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: EmailsApi.get_email_text_by_id ..." end # verify the required parameter 'email_id' is set if @api_client.config.client_side_validation && email_id.nil? fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailsApi.get_email_text_by_id" end # resource path local_var_path = "/emails/{email-ID}.txt".sub('{' + 'email-ID' + '}', email_id.to_s) # query parameters query_params = {} query_params[:'organizations'] = @api_client.build_collection_param(opts[:'organizations'], :multi) if !opts[:'organizations'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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 => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: EmailsApi#get_email_text_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end