Class: Bfwd::EmailsApi
- Inherits:
-
Object
- Object
- Bfwd::EmailsApi
- Defined in:
- lib/bf_ruby2/api/emails_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_email_by_id(email_id, opts = {}) ⇒ EmailPagedMetadata
Retrieves a single invoice, specified by the version-ID parameter.
-
#get_email_by_id_with_http_info(email_id, opts = {}) ⇒ Array<(EmailPagedMetadata, Fixnum, Hash)>
Retrieves a single invoice, specified by the version-ID parameter.
-
#get_email_html_by_id(email_id, opts = {}) ⇒ String
Retrieves a single invoice, specified by the version-ID parameter.
-
#get_email_html_by_id_with_http_info(email_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Retrieves a single invoice, specified by the version-ID parameter.
-
#get_email_text_by_id(email_id, opts = {}) ⇒ String
Retrieves a single invoice, specified by the version-ID parameter.
-
#get_email_text_by_id_with_http_info(email_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Retrieves a single invoice, specified by the version-ID parameter.
-
#initialize(api_client = ApiClient.default) ⇒ EmailsApi
constructor
A new instance of EmailsApi.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/bf_ruby2/api/emails_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_email_by_id(email_id, opts = {}) ⇒ EmailPagedMetadata
Retrieves a single invoice, specified by the version-ID parameter. { "nickname" : "Retrieve by version","response" : "getEmailByID.html"}
29 30 31 32 |
# 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 |
#get_email_by_id_with_http_info(email_id, opts = {}) ⇒ Array<(EmailPagedMetadata, Fixnum, Hash)>
Retrieves a single invoice, specified by the version-ID parameter. { "nickname" : "Retrieve by version","response" : "getEmailByID.html"}
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# 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 |
#get_email_html_by_id(email_id, opts = {}) ⇒ String
Retrieves a single invoice, specified by the version-ID parameter. { "nickname" : "Retrieve by version","response" : "getEmailByID.html"}
87 88 89 90 |
# 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 |
#get_email_html_by_id_with_http_info(email_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Retrieves a single invoice, specified by the version-ID parameter. { "nickname" : "Retrieve by version","response" : "getEmailByID.html"}
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# 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 |
#get_email_text_by_id(email_id, opts = {}) ⇒ String
Retrieves a single invoice, specified by the version-ID parameter. { "nickname" : "Retrieve by version","response" : "getEmailByID.html"}
145 146 147 148 |
# 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 |
#get_email_text_by_id_with_http_info(email_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Retrieves a single invoice, specified by the version-ID parameter. { "nickname" : "Retrieve by version","response" : "getEmailByID.html"}
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# 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 |