Class: SibApiV3Sdk::SendersApi
- Inherits:
-
Object
- Object
- SibApiV3Sdk::SendersApi
- Defined in:
- lib/sib-api-v3-sdk/api/senders_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_sender(opts = {}) ⇒ CreateSenderModel
Create a new sender.
-
#create_sender_with_http_info(opts = {}) ⇒ Array<(CreateSenderModel, Fixnum, Hash)>
Create a new sender.
-
#delete_sender(sender_id, opts = {}) ⇒ nil
Delete a sender.
-
#delete_sender_with_http_info(sender_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a sender.
-
#get_ips(opts = {}) ⇒ GetIps
Return all the dedicated IPs for your account.
-
#get_ips_from_sender(sender_id, opts = {}) ⇒ GetIpsFromSender
Return all the dedicated IPs for a sender.
-
#get_ips_from_sender_with_http_info(sender_id, opts = {}) ⇒ Array<(GetIpsFromSender, Fixnum, Hash)>
Return all the dedicated IPs for a sender.
-
#get_ips_with_http_info(opts = {}) ⇒ Array<(GetIps, Fixnum, Hash)>
Return all the dedicated IPs for your account.
-
#get_senders(opts = {}) ⇒ GetSendersList
Get the list of all your senders.
-
#get_senders_with_http_info(opts = {}) ⇒ Array<(GetSendersList, Fixnum, Hash)>
Get the list of all your senders.
-
#initialize(api_client = ApiClient.default) ⇒ SendersApi
constructor
A new instance of SendersApi.
-
#update_sender(sender_id, opts = {}) ⇒ nil
Update a sender.
-
#update_sender_with_http_info(sender_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Update a sender.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ SendersApi
Returns a new instance of SendersApi.
19 20 21 |
# File 'lib/sib-api-v3-sdk/api/senders_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/sib-api-v3-sdk/api/senders_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_sender(opts = {}) ⇒ CreateSenderModel
Create a new sender
28 29 30 31 |
# File 'lib/sib-api-v3-sdk/api/senders_api.rb', line 28 def create_sender(opts = {}) data, _status_code, _headers = create_sender_with_http_info(opts) return data end |
#create_sender_with_http_info(opts = {}) ⇒ Array<(CreateSenderModel, Fixnum, Hash)>
Create a new sender
38 39 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 |
# File 'lib/sib-api-v3-sdk/api/senders_api.rb', line 38 def create_sender_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SendersApi.create_sender ..." end # resource path local_var_path = "/senders" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'sender']) auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CreateSenderModel') if @api_client.config.debugging @api_client.config.logger.debug "API called: SendersApi#create_sender\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_sender(sender_id, opts = {}) ⇒ nil
Delete a sender
79 80 81 82 |
# File 'lib/sib-api-v3-sdk/api/senders_api.rb', line 79 def delete_sender(sender_id, opts = {}) delete_sender_with_http_info(sender_id, opts) return nil end |
#delete_sender_with_http_info(sender_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete a sender
89 90 91 92 93 94 95 96 97 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 |
# File 'lib/sib-api-v3-sdk/api/senders_api.rb', line 89 def delete_sender_with_http_info(sender_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SendersApi.delete_sender ..." end # verify the required parameter 'sender_id' is set if @api_client.config.client_side_validation && sender_id.nil? fail ArgumentError, "Missing the required parameter 'sender_id' when calling SendersApi.delete_sender" end # resource path local_var_path = "/senders/{senderId}".sub('{' + 'senderId' + '}', sender_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: SendersApi#delete_sender\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_ips(opts = {}) ⇒ GetIps
Return all the dedicated IPs for your account
132 133 134 135 |
# File 'lib/sib-api-v3-sdk/api/senders_api.rb', line 132 def get_ips(opts = {}) data, _status_code, _headers = get_ips_with_http_info(opts) return data end |
#get_ips_from_sender(sender_id, opts = {}) ⇒ GetIpsFromSender
Return all the dedicated IPs for a sender
182 183 184 185 |
# File 'lib/sib-api-v3-sdk/api/senders_api.rb', line 182 def get_ips_from_sender(sender_id, opts = {}) data, _status_code, _headers = get_ips_from_sender_with_http_info(sender_id, opts) return data end |
#get_ips_from_sender_with_http_info(sender_id, opts = {}) ⇒ Array<(GetIpsFromSender, Fixnum, Hash)>
Return all the dedicated IPs for a sender
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
# File 'lib/sib-api-v3-sdk/api/senders_api.rb', line 192 def get_ips_from_sender_with_http_info(sender_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SendersApi.get_ips_from_sender ..." end # verify the required parameter 'sender_id' is set if @api_client.config.client_side_validation && sender_id.nil? fail ArgumentError, "Missing the required parameter 'sender_id' when calling SendersApi.get_ips_from_sender" end # resource path local_var_path = "/senders/{senderId}/ips".sub('{' + 'senderId' + '}', sender_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] 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 => 'GetIpsFromSender') if @api_client.config.debugging @api_client.config.logger.debug "API called: SendersApi#get_ips_from_sender\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_ips_with_http_info(opts = {}) ⇒ Array<(GetIps, Fixnum, Hash)>
Return all the dedicated IPs for your account
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/sib-api-v3-sdk/api/senders_api.rb', line 141 def get_ips_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SendersApi.get_ips ..." end # resource path local_var_path = "/senders/ips" # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] 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 => 'GetIps') if @api_client.config.debugging @api_client.config.logger.debug "API called: SendersApi#get_ips\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_senders(opts = {}) ⇒ GetSendersList
Get the list of all your senders
238 239 240 241 |
# File 'lib/sib-api-v3-sdk/api/senders_api.rb', line 238 def get_senders(opts = {}) data, _status_code, _headers = get_senders_with_http_info(opts) return data end |
#get_senders_with_http_info(opts = {}) ⇒ Array<(GetSendersList, Fixnum, Hash)>
Get the list of all your senders
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 |
# File 'lib/sib-api-v3-sdk/api/senders_api.rb', line 249 def get_senders_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SendersApi.get_senders ..." end # resource path local_var_path = "/senders" # query parameters query_params = {} query_params[:'ip'] = opts[:'ip'] if !opts[:'ip'].nil? query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api-key', 'partner-key'] 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 => 'GetSendersList') if @api_client.config.debugging @api_client.config.logger.debug "API called: SendersApi#get_senders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_sender(sender_id, opts = {}) ⇒ nil
Update a sender
293 294 295 296 |
# File 'lib/sib-api-v3-sdk/api/senders_api.rb', line 293 def update_sender(sender_id, opts = {}) update_sender_with_http_info(sender_id, opts) return nil end |
#update_sender_with_http_info(sender_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Update a sender
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 |
# File 'lib/sib-api-v3-sdk/api/senders_api.rb', line 304 def update_sender_with_http_info(sender_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SendersApi.update_sender ..." end # verify the required parameter 'sender_id' is set if @api_client.config.client_side_validation && sender_id.nil? fail ArgumentError, "Missing the required parameter 'sender_id' when calling SendersApi.update_sender" end # resource path local_var_path = "/senders/{senderId}".sub('{' + 'senderId' + '}', sender_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'sender']) auth_names = ['api-key', 'partner-key'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: SendersApi#update_sender\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |