Class: BillForward::EmailsApi
- Inherits:
-
Object
- Object
- BillForward::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
#initialize(api_client = ApiClient.default) ⇒ EmailsApi
Returns a new instance of EmailsApi.
30 31 32 |
# File 'lib/bf_ruby2/api/emails_api.rb', line 30 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
28 29 30 |
# File 'lib/bf_ruby2/api/emails_api.rb', line 28 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"}
40 41 42 43 |
# File 'lib/bf_ruby2/api/emails_api.rb', line 40 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"}
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 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/bf_ruby2/api/emails_api.rb', line 51 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 fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailsApi.get_email_by_id" if email_id.nil? # resource path local_var_path = "/emails/{email-ID}".sub('{format}','json').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) local_header_accept = ['application/json; charset=utf-8', 'text/xml'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['text/plain'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # 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"}
100 101 102 103 |
# File 'lib/bf_ruby2/api/emails_api.rb', line 100 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"}
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 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
# File 'lib/bf_ruby2/api/emails_api.rb', line 111 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 fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailsApi.get_email_html_by_id" if email_id.nil? # resource path local_var_path = "/emails/{email-ID}.html".sub('{format}','json').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) local_header_accept = ['text/html'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['text/plain'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # 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"}
160 161 162 163 |
# File 'lib/bf_ruby2/api/emails_api.rb', line 160 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"}
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 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
# File 'lib/bf_ruby2/api/emails_api.rb', line 171 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 fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailsApi.get_email_text_by_id" if email_id.nil? # resource path local_var_path = "/emails/{email-ID}.txt".sub('{format}','json').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) local_header_accept = ['text/plain'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['text/plain'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # 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 |