Class: Pingram::BroadcastsApi
- Inherits:
-
Object
- Object
- Pingram::BroadcastsApi
- Defined in:
- lib/pingram/api/broadcasts_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#broadcasts_archive(broadcast_id, opts = {}) ⇒ BroadcastResponse
Archive an email broadcast so it is hidden from the default broadcast list.
-
#broadcasts_archive_with_http_info(broadcast_id, opts = {}) ⇒ Array<(BroadcastResponse, Integer, Hash)>
Archive an email broadcast so it is hidden from the default broadcast list.
-
#broadcasts_cancel(broadcast_id, opts = {}) ⇒ BroadcastResponse
Cancel an email broadcast.
-
#broadcasts_cancel_with_http_info(broadcast_id, opts = {}) ⇒ Array<(BroadcastResponse, Integer, Hash)>
Cancel an email broadcast.
-
#broadcasts_create(create_broadcast_request, opts = {}) ⇒ BroadcastResponse
Create a draft email broadcast.
-
#broadcasts_create_with_http_info(create_broadcast_request, opts = {}) ⇒ Array<(BroadcastResponse, Integer, Hash)>
Create a draft email broadcast.
-
#broadcasts_delete(broadcast_id, opts = {}) ⇒ MessageResponse
Delete an email broadcast.
-
#broadcasts_delete_with_http_info(broadcast_id, opts = {}) ⇒ Array<(MessageResponse, Integer, Hash)>
Delete an email broadcast.
-
#broadcasts_get(broadcast_id, opts = {}) ⇒ BroadcastResponse
Get one email broadcast by ID, including the send-ready html body, optional internalTemplate (visual-editor source), and audience definition.
-
#broadcasts_get_metrics(broadcast_id, opts = {}) ⇒ BroadcastMetricsResponse
Poll live email broadcast metrics: status, optional pausedReason or scheduleAt, and aggregate counters (total, sent, delivered, opened, clicked, bounced, complained, unsubscribed, skipped, failed).
-
#broadcasts_get_metrics_with_http_info(broadcast_id, opts = {}) ⇒ Array<(BroadcastMetricsResponse, Integer, Hash)>
Poll live email broadcast metrics: status, optional pausedReason or scheduleAt, and aggregate counters (total, sent, delivered, opened, clicked, bounced, complained, unsubscribed, skipped, failed).
-
#broadcasts_get_with_http_info(broadcast_id, opts = {}) ⇒ Array<(BroadcastResponse, Integer, Hash)>
Get one email broadcast by ID, including the send-ready html body, optional internalTemplate (visual-editor source), and audience definition.
-
#broadcasts_list(opts = {}) ⇒ ListBroadcastsResponse
List email broadcasts for the account, newest first.
-
#broadcasts_list_recipients(broadcast_id, opts = {}) ⇒ ListBroadcastRecipientsResponse
List email broadcast recipients with per-recipient delivery fact timestamps (sentAt, deliveredAt, openedAt, etc.).
-
#broadcasts_list_recipients_with_http_info(broadcast_id, opts = {}) ⇒ Array<(ListBroadcastRecipientsResponse, Integer, Hash)>
List email broadcast recipients with per-recipient delivery fact timestamps (sentAt, deliveredAt, openedAt, etc.).
-
#broadcasts_list_with_http_info(opts = {}) ⇒ Array<(ListBroadcastsResponse, Integer, Hash)>
List email broadcasts for the account, newest first.
-
#broadcasts_pause(broadcast_id, opts = {}) ⇒ BroadcastResponse
Pause an actively sending email broadcast.
-
#broadcasts_pause_with_http_info(broadcast_id, opts = {}) ⇒ Array<(BroadcastResponse, Integer, Hash)>
Pause an actively sending email broadcast.
-
#broadcasts_resume(broadcast_id, opts = {}) ⇒ BroadcastResponse
Resume a paused email broadcast.
-
#broadcasts_resume_with_http_info(broadcast_id, opts = {}) ⇒ Array<(BroadcastResponse, Integer, Hash)>
Resume a paused email broadcast.
-
#broadcasts_schedule(broadcast_id, schedule_broadcast_request, opts = {}) ⇒ BroadcastResponse
Schedule a draft email broadcast for a future ISO datetime (sendAt).
-
#broadcasts_schedule_with_http_info(broadcast_id, schedule_broadcast_request, opts = {}) ⇒ Array<(BroadcastResponse, Integer, Hash)>
Schedule a draft email broadcast for a future ISO datetime (sendAt).
-
#broadcasts_send(broadcast_id, opts = {}) ⇒ BroadcastResponse
Send a draft email broadcast immediately.
-
#broadcasts_send_with_http_info(broadcast_id, opts = {}) ⇒ Array<(BroadcastResponse, Integer, Hash)>
Send a draft email broadcast immediately.
-
#broadcasts_unarchive(broadcast_id, opts = {}) ⇒ BroadcastResponse
Restore an archived email broadcast to the default broadcast list.
-
#broadcasts_unarchive_with_http_info(broadcast_id, opts = {}) ⇒ Array<(BroadcastResponse, Integer, Hash)>
Restore an archived email broadcast to the default broadcast list.
-
#broadcasts_update(broadcast_id, update_broadcast_request, opts = {}) ⇒ BroadcastResponse
Update a draft email broadcast (name, type, audience, sender, subject, html).
-
#broadcasts_update_with_http_info(broadcast_id, update_broadcast_request, opts = {}) ⇒ Array<(BroadcastResponse, Integer, Hash)>
Update a draft email broadcast (name, type, audience, sender, subject, html).
-
#initialize(api_client = ApiClient.default) ⇒ BroadcastsApi
constructor
A new instance of BroadcastsApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ BroadcastsApi
Returns a new instance of BroadcastsApi.
19 20 21 |
# File 'lib/pingram/api/broadcasts_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/pingram/api/broadcasts_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#broadcasts_archive(broadcast_id, opts = {}) ⇒ BroadcastResponse
Archive an email broadcast so it is hidden from the default broadcast list. Allowed for draft, paused, sent, and canceled broadcasts. Not allowed while sending or scheduled.
26 27 28 29 |
# File 'lib/pingram/api/broadcasts_api.rb', line 26 def broadcasts_archive(broadcast_id, opts = {}) data, _status_code, _headers = broadcasts_archive_with_http_info(broadcast_id, opts) data end |
#broadcasts_archive_with_http_info(broadcast_id, opts = {}) ⇒ Array<(BroadcastResponse, Integer, Hash)>
Archive an email broadcast so it is hidden from the default broadcast list. Allowed for draft, paused, sent, and canceled broadcasts. Not allowed while sending or scheduled.
35 36 37 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 73 74 75 76 77 78 79 80 81 |
# File 'lib/pingram/api/broadcasts_api.rb', line 35 def broadcasts_archive_with_http_info(broadcast_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BroadcastsApi.broadcasts_archive ...' end # verify the required parameter 'broadcast_id' is set if @api_client.config.client_side_validation && broadcast_id.nil? fail ArgumentError, "Missing the required parameter 'broadcast_id' when calling BroadcastsApi.broadcasts_archive" end # resource path local_var_path = '/broadcasts/{broadcastId}/archive'.sub('{' + 'broadcastId' + '}', CGI.escape(broadcast_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'BroadcastResponse' # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization) auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey'] = opts.merge( :operation => :"BroadcastsApi.broadcasts_archive", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BroadcastsApi#broadcasts_archive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#broadcasts_cancel(broadcast_id, opts = {}) ⇒ BroadcastResponse
Cancel an email broadcast. Scheduled broadcasts revert to draft and drop their schedule. Sending or paused broadcasts become canceled; remaining pending recipients are skipped.
87 88 89 90 |
# File 'lib/pingram/api/broadcasts_api.rb', line 87 def broadcasts_cancel(broadcast_id, opts = {}) data, _status_code, _headers = broadcasts_cancel_with_http_info(broadcast_id, opts) data end |
#broadcasts_cancel_with_http_info(broadcast_id, opts = {}) ⇒ Array<(BroadcastResponse, Integer, Hash)>
Cancel an email broadcast. Scheduled broadcasts revert to draft and drop their schedule. Sending or paused broadcasts become canceled; remaining pending recipients are skipped.
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 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/pingram/api/broadcasts_api.rb', line 96 def broadcasts_cancel_with_http_info(broadcast_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BroadcastsApi.broadcasts_cancel ...' end # verify the required parameter 'broadcast_id' is set if @api_client.config.client_side_validation && broadcast_id.nil? fail ArgumentError, "Missing the required parameter 'broadcast_id' when calling BroadcastsApi.broadcasts_cancel" end # resource path local_var_path = '/broadcasts/{broadcastId}/cancel'.sub('{' + 'broadcastId' + '}', CGI.escape(broadcast_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'BroadcastResponse' # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization) auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey'] = opts.merge( :operation => :"BroadcastsApi.broadcasts_cancel", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BroadcastsApi#broadcasts_cancel\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#broadcasts_create(create_broadcast_request, opts = {}) ⇒ BroadcastResponse
Create a draft email broadcast. html is the send-ready body. Optional internalTemplate is visual-editor source; if set it must be paired with html and cannot be added later. Set audience to either a Mongo-style user filter (sync users via Users API first; for large lists) or a raw email list (max 10,000). Include name, from fields, subject, and HTML. Notification type is optional on create and required before send or schedule; it is created automatically if missing.
148 149 150 151 |
# File 'lib/pingram/api/broadcasts_api.rb', line 148 def broadcasts_create(create_broadcast_request, opts = {}) data, _status_code, _headers = broadcasts_create_with_http_info(create_broadcast_request, opts) data end |
#broadcasts_create_with_http_info(create_broadcast_request, opts = {}) ⇒ Array<(BroadcastResponse, Integer, Hash)>
Create a draft email broadcast. html is the send-ready body. Optional internalTemplate is visual-editor source; if set it must be paired with html and cannot be added later. Set audience to either a Mongo-style user filter (sync users via Users API first; for large lists) or a raw email list (max 10,000). Include name, from fields, subject, and HTML. Notification type is optional on create and required before send or schedule; it is created automatically if missing.
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 196 197 198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/pingram/api/broadcasts_api.rb', line 157 def broadcasts_create_with_http_info(create_broadcast_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BroadcastsApi.broadcasts_create ...' end # verify the required parameter 'create_broadcast_request' is set if @api_client.config.client_side_validation && create_broadcast_request.nil? fail ArgumentError, "Missing the required parameter 'create_broadcast_request' when calling BroadcastsApi.broadcasts_create" end # resource path local_var_path = '/broadcasts' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_broadcast_request) # return_type return_type = opts[:debug_return_type] || 'BroadcastResponse' # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization) auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey'] = opts.merge( :operation => :"BroadcastsApi.broadcasts_create", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BroadcastsApi#broadcasts_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#broadcasts_delete(broadcast_id, opts = {}) ⇒ MessageResponse
Delete an email broadcast. Allowed for drafts, scheduled, paused, completed, and canceled broadcasts. Not allowed while status is sending.
214 215 216 217 |
# File 'lib/pingram/api/broadcasts_api.rb', line 214 def broadcasts_delete(broadcast_id, opts = {}) data, _status_code, _headers = broadcasts_delete_with_http_info(broadcast_id, opts) data end |
#broadcasts_delete_with_http_info(broadcast_id, opts = {}) ⇒ Array<(MessageResponse, Integer, Hash)>
Delete an email broadcast. Allowed for drafts, scheduled, paused, completed, and canceled broadcasts. Not allowed while status is sending.
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 |
# File 'lib/pingram/api/broadcasts_api.rb', line 223 def broadcasts_delete_with_http_info(broadcast_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BroadcastsApi.broadcasts_delete ...' end # verify the required parameter 'broadcast_id' is set if @api_client.config.client_side_validation && broadcast_id.nil? fail ArgumentError, "Missing the required parameter 'broadcast_id' when calling BroadcastsApi.broadcasts_delete" end # resource path local_var_path = '/broadcasts/{broadcastId}'.sub('{' + 'broadcastId' + '}', CGI.escape(broadcast_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'MessageResponse' # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization) auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey'] = opts.merge( :operation => :"BroadcastsApi.broadcasts_delete", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BroadcastsApi#broadcasts_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#broadcasts_get(broadcast_id, opts = {}) ⇒ BroadcastResponse
Get one email broadcast by ID, including the send-ready html body, optional internalTemplate (visual-editor source), and audience definition.
275 276 277 278 |
# File 'lib/pingram/api/broadcasts_api.rb', line 275 def broadcasts_get(broadcast_id, opts = {}) data, _status_code, _headers = broadcasts_get_with_http_info(broadcast_id, opts) data end |
#broadcasts_get_metrics(broadcast_id, opts = {}) ⇒ BroadcastMetricsResponse
Poll live email broadcast metrics: status, optional pausedReason or scheduleAt, and aggregate counters (total, sent, delivered, opened, clicked, bounced, complained, unsubscribed, skipped, failed).
336 337 338 339 |
# File 'lib/pingram/api/broadcasts_api.rb', line 336 def broadcasts_get_metrics(broadcast_id, opts = {}) data, _status_code, _headers = broadcasts_get_metrics_with_http_info(broadcast_id, opts) data end |
#broadcasts_get_metrics_with_http_info(broadcast_id, opts = {}) ⇒ Array<(BroadcastMetricsResponse, Integer, Hash)>
Poll live email broadcast metrics: status, optional pausedReason or scheduleAt, and aggregate counters (total, sent, delivered, opened, clicked, bounced, complained, unsubscribed, skipped, failed).
345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 |
# File 'lib/pingram/api/broadcasts_api.rb', line 345 def broadcasts_get_metrics_with_http_info(broadcast_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BroadcastsApi.broadcasts_get_metrics ...' end # verify the required parameter 'broadcast_id' is set if @api_client.config.client_side_validation && broadcast_id.nil? fail ArgumentError, "Missing the required parameter 'broadcast_id' when calling BroadcastsApi.broadcasts_get_metrics" end # resource path local_var_path = '/broadcasts/{broadcastId}/metrics'.sub('{' + 'broadcastId' + '}', CGI.escape(broadcast_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'BroadcastMetricsResponse' # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization) auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey'] = opts.merge( :operation => :"BroadcastsApi.broadcasts_get_metrics", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BroadcastsApi#broadcasts_get_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#broadcasts_get_with_http_info(broadcast_id, opts = {}) ⇒ Array<(BroadcastResponse, Integer, Hash)>
Get one email broadcast by ID, including the send-ready html body, optional internalTemplate (visual-editor source), and audience definition.
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 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 |
# File 'lib/pingram/api/broadcasts_api.rb', line 284 def broadcasts_get_with_http_info(broadcast_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BroadcastsApi.broadcasts_get ...' end # verify the required parameter 'broadcast_id' is set if @api_client.config.client_side_validation && broadcast_id.nil? fail ArgumentError, "Missing the required parameter 'broadcast_id' when calling BroadcastsApi.broadcasts_get" end # resource path local_var_path = '/broadcasts/{broadcastId}'.sub('{' + 'broadcastId' + '}', CGI.escape(broadcast_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'BroadcastResponse' # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization) auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey'] = opts.merge( :operation => :"BroadcastsApi.broadcasts_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BroadcastsApi#broadcasts_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#broadcasts_list(opts = {}) ⇒ ListBroadcastsResponse
List email broadcasts for the account, newest first. Returns metadata and counters without html or internalTemplate bodies. Paginate with limit (default 50, max 100) and nextToken.
398 399 400 401 |
# File 'lib/pingram/api/broadcasts_api.rb', line 398 def broadcasts_list(opts = {}) data, _status_code, _headers = broadcasts_list_with_http_info(opts) data end |
#broadcasts_list_recipients(broadcast_id, opts = {}) ⇒ ListBroadcastRecipientsResponse
List email broadcast recipients with per-recipient delivery fact timestamps (sentAt, deliveredAt, openedAt, etc.). Derive display status client-side from timestamps. Filter by status (pending, sent, delivered, opened, clicked, bounced, complained, unsubscribed, skipped, failed, problems). Paginate with limit (default 50, max 200) and nextToken.
461 462 463 464 |
# File 'lib/pingram/api/broadcasts_api.rb', line 461 def broadcasts_list_recipients(broadcast_id, opts = {}) data, _status_code, _headers = broadcasts_list_recipients_with_http_info(broadcast_id, opts) data end |
#broadcasts_list_recipients_with_http_info(broadcast_id, opts = {}) ⇒ Array<(ListBroadcastRecipientsResponse, Integer, Hash)>
List email broadcast recipients with per-recipient delivery fact timestamps (sentAt, deliveredAt, openedAt, etc.). Derive display status client-side from timestamps. Filter by status (pending, sent, delivered, opened, clicked, bounced, complained, unsubscribed, skipped, failed, problems). Paginate with limit (default 50, max 200) and nextToken.
473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 |
# File 'lib/pingram/api/broadcasts_api.rb', line 473 def broadcasts_list_recipients_with_http_info(broadcast_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BroadcastsApi.broadcasts_list_recipients ...' end # verify the required parameter 'broadcast_id' is set if @api_client.config.client_side_validation && broadcast_id.nil? fail ArgumentError, "Missing the required parameter 'broadcast_id' when calling BroadcastsApi.broadcasts_list_recipients" end # resource path local_var_path = '/broadcasts/{broadcastId}/recipients'.sub('{' + 'broadcastId' + '}', CGI.escape(broadcast_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'nextToken'] = opts[:'next_token'] if !opts[:'next_token'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListBroadcastRecipientsResponse' # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization) auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey'] = opts.merge( :operation => :"BroadcastsApi.broadcasts_list_recipients", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BroadcastsApi#broadcasts_list_recipients\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#broadcasts_list_with_http_info(opts = {}) ⇒ Array<(ListBroadcastsResponse, Integer, Hash)>
List email broadcasts for the account, newest first. Returns metadata and counters without html or internalTemplate bodies. Paginate with limit (default 50, max 100) and nextToken.
408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 |
# File 'lib/pingram/api/broadcasts_api.rb', line 408 def broadcasts_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BroadcastsApi.broadcasts_list ...' end # resource path local_var_path = '/broadcasts' # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'nextToken'] = opts[:'next_token'] if !opts[:'next_token'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListBroadcastsResponse' # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization) auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey'] = opts.merge( :operation => :"BroadcastsApi.broadcasts_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BroadcastsApi#broadcasts_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#broadcasts_pause(broadcast_id, opts = {}) ⇒ BroadcastResponse
Pause an actively sending email broadcast. Status becomes paused with pausedReason PAUSED_BY_USER.
528 529 530 531 |
# File 'lib/pingram/api/broadcasts_api.rb', line 528 def broadcasts_pause(broadcast_id, opts = {}) data, _status_code, _headers = broadcasts_pause_with_http_info(broadcast_id, opts) data end |
#broadcasts_pause_with_http_info(broadcast_id, opts = {}) ⇒ Array<(BroadcastResponse, Integer, Hash)>
Pause an actively sending email broadcast. Status becomes paused with pausedReason PAUSED_BY_USER.
537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 |
# File 'lib/pingram/api/broadcasts_api.rb', line 537 def broadcasts_pause_with_http_info(broadcast_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BroadcastsApi.broadcasts_pause ...' end # verify the required parameter 'broadcast_id' is set if @api_client.config.client_side_validation && broadcast_id.nil? fail ArgumentError, "Missing the required parameter 'broadcast_id' when calling BroadcastsApi.broadcasts_pause" end # resource path local_var_path = '/broadcasts/{broadcastId}/pause'.sub('{' + 'broadcastId' + '}', CGI.escape(broadcast_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'BroadcastResponse' # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization) auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey'] = opts.merge( :operation => :"BroadcastsApi.broadcasts_pause", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BroadcastsApi#broadcasts_pause\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#broadcasts_resume(broadcast_id, opts = {}) ⇒ BroadcastResponse
Resume a paused email broadcast. Continues sending remaining recipients. Broadcasts paused for spam content cannot be resumed.
589 590 591 592 |
# File 'lib/pingram/api/broadcasts_api.rb', line 589 def broadcasts_resume(broadcast_id, opts = {}) data, _status_code, _headers = broadcasts_resume_with_http_info(broadcast_id, opts) data end |
#broadcasts_resume_with_http_info(broadcast_id, opts = {}) ⇒ Array<(BroadcastResponse, Integer, Hash)>
Resume a paused email broadcast. Continues sending remaining recipients. Broadcasts paused for spam content cannot be resumed.
598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 |
# File 'lib/pingram/api/broadcasts_api.rb', line 598 def broadcasts_resume_with_http_info(broadcast_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BroadcastsApi.broadcasts_resume ...' end # verify the required parameter 'broadcast_id' is set if @api_client.config.client_side_validation && broadcast_id.nil? fail ArgumentError, "Missing the required parameter 'broadcast_id' when calling BroadcastsApi.broadcasts_resume" end # resource path local_var_path = '/broadcasts/{broadcastId}/resume'.sub('{' + 'broadcastId' + '}', CGI.escape(broadcast_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'BroadcastResponse' # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization) auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey'] = opts.merge( :operation => :"BroadcastsApi.broadcasts_resume", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BroadcastsApi#broadcasts_resume\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#broadcasts_schedule(broadcast_id, schedule_broadcast_request, opts = {}) ⇒ BroadcastResponse
Schedule a draft email broadcast for a future ISO datetime (sendAt). Requires a non-empty subject. fromAddress must be the platform default sender or a domain verified for this account (Settings → Domain Verification). The platform default sender is for testing only (at most 10 recipients, heavily throttled). Cancels any existing schedule when the broadcast is returned to draft via cancel.
651 652 653 654 |
# File 'lib/pingram/api/broadcasts_api.rb', line 651 def broadcasts_schedule(broadcast_id, schedule_broadcast_request, opts = {}) data, _status_code, _headers = broadcasts_schedule_with_http_info(broadcast_id, schedule_broadcast_request, opts) data end |
#broadcasts_schedule_with_http_info(broadcast_id, schedule_broadcast_request, opts = {}) ⇒ Array<(BroadcastResponse, Integer, Hash)>
Schedule a draft email broadcast for a future ISO datetime (sendAt). Requires a non-empty subject. fromAddress must be the platform default sender or a domain verified for this account (Settings → Domain Verification). The platform default sender is for testing only (at most 10 recipients, heavily throttled). Cancels any existing schedule when the broadcast is returned to draft via cancel.
661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 |
# File 'lib/pingram/api/broadcasts_api.rb', line 661 def broadcasts_schedule_with_http_info(broadcast_id, schedule_broadcast_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BroadcastsApi.broadcasts_schedule ...' end # verify the required parameter 'broadcast_id' is set if @api_client.config.client_side_validation && broadcast_id.nil? fail ArgumentError, "Missing the required parameter 'broadcast_id' when calling BroadcastsApi.broadcasts_schedule" end # verify the required parameter 'schedule_broadcast_request' is set if @api_client.config.client_side_validation && schedule_broadcast_request.nil? fail ArgumentError, "Missing the required parameter 'schedule_broadcast_request' when calling BroadcastsApi.broadcasts_schedule" end # resource path local_var_path = '/broadcasts/{broadcastId}/schedule'.sub('{' + 'broadcastId' + '}', CGI.escape(broadcast_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(schedule_broadcast_request) # return_type return_type = opts[:debug_return_type] || 'BroadcastResponse' # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization) auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey'] = opts.merge( :operation => :"BroadcastsApi.broadcasts_schedule", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BroadcastsApi#broadcasts_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#broadcasts_send(broadcast_id, opts = {}) ⇒ BroadcastResponse
Send a draft email broadcast immediately. Requires a non-empty subject. fromAddress must be the platform default sender or a domain verified for this account (Settings → Domain Verification). The platform default sender is for testing only (at most 10 recipients, heavily throttled). Transitions status to sending and starts delivery.
722 723 724 725 |
# File 'lib/pingram/api/broadcasts_api.rb', line 722 def broadcasts_send(broadcast_id, opts = {}) data, _status_code, _headers = broadcasts_send_with_http_info(broadcast_id, opts) data end |
#broadcasts_send_with_http_info(broadcast_id, opts = {}) ⇒ Array<(BroadcastResponse, Integer, Hash)>
Send a draft email broadcast immediately. Requires a non-empty subject. fromAddress must be the platform default sender or a domain verified for this account (Settings → Domain Verification). The platform default sender is for testing only (at most 10 recipients, heavily throttled). Transitions status to sending and starts delivery.
731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 |
# File 'lib/pingram/api/broadcasts_api.rb', line 731 def broadcasts_send_with_http_info(broadcast_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BroadcastsApi.broadcasts_send ...' end # verify the required parameter 'broadcast_id' is set if @api_client.config.client_side_validation && broadcast_id.nil? fail ArgumentError, "Missing the required parameter 'broadcast_id' when calling BroadcastsApi.broadcasts_send" end # resource path local_var_path = '/broadcasts/{broadcastId}/send'.sub('{' + 'broadcastId' + '}', CGI.escape(broadcast_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'BroadcastResponse' # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization) auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey'] = opts.merge( :operation => :"BroadcastsApi.broadcasts_send", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BroadcastsApi#broadcasts_send\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#broadcasts_unarchive(broadcast_id, opts = {}) ⇒ BroadcastResponse
Restore an archived email broadcast to the default broadcast list.
783 784 785 786 |
# File 'lib/pingram/api/broadcasts_api.rb', line 783 def broadcasts_unarchive(broadcast_id, opts = {}) data, _status_code, _headers = broadcasts_unarchive_with_http_info(broadcast_id, opts) data end |
#broadcasts_unarchive_with_http_info(broadcast_id, opts = {}) ⇒ Array<(BroadcastResponse, Integer, Hash)>
Restore an archived email broadcast to the default broadcast list.
792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 |
# File 'lib/pingram/api/broadcasts_api.rb', line 792 def broadcasts_unarchive_with_http_info(broadcast_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BroadcastsApi.broadcasts_unarchive ...' end # verify the required parameter 'broadcast_id' is set if @api_client.config.client_side_validation && broadcast_id.nil? fail ArgumentError, "Missing the required parameter 'broadcast_id' when calling BroadcastsApi.broadcasts_unarchive" end # resource path local_var_path = '/broadcasts/{broadcastId}/unarchive'.sub('{' + 'broadcastId' + '}', CGI.escape(broadcast_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'BroadcastResponse' # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization) auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey'] = opts.merge( :operation => :"BroadcastsApi.broadcasts_unarchive", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BroadcastsApi#broadcasts_unarchive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#broadcasts_update(broadcast_id, update_broadcast_request, opts = {}) ⇒ BroadcastResponse
Update a draft email broadcast (name, type, audience, sender, subject, html). html is the send-ready body. Send an empty replyToAddress to clear Reply-To. internalTemplate can be updated only when the broadcast was created with it; it cannot be added to an html-only broadcast or removed. Only drafts can be edited; scheduled or active broadcasts are locked.
845 846 847 848 |
# File 'lib/pingram/api/broadcasts_api.rb', line 845 def broadcasts_update(broadcast_id, update_broadcast_request, opts = {}) data, _status_code, _headers = broadcasts_update_with_http_info(broadcast_id, update_broadcast_request, opts) data end |
#broadcasts_update_with_http_info(broadcast_id, update_broadcast_request, opts = {}) ⇒ Array<(BroadcastResponse, Integer, Hash)>
Update a draft email broadcast (name, type, audience, sender, subject, html). html is the send-ready body. Send an empty replyToAddress to clear Reply-To. internalTemplate can be updated only when the broadcast was created with it; it cannot be added to an html-only broadcast or removed. Only drafts can be edited; scheduled or active broadcasts are locked.
855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 |
# File 'lib/pingram/api/broadcasts_api.rb', line 855 def broadcasts_update_with_http_info(broadcast_id, update_broadcast_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BroadcastsApi.broadcasts_update ...' end # verify the required parameter 'broadcast_id' is set if @api_client.config.client_side_validation && broadcast_id.nil? fail ArgumentError, "Missing the required parameter 'broadcast_id' when calling BroadcastsApi.broadcasts_update" end # verify the required parameter 'update_broadcast_request' is set if @api_client.config.client_side_validation && update_broadcast_request.nil? fail ArgumentError, "Missing the required parameter 'update_broadcast_request' when calling BroadcastsApi.broadcasts_update" end # resource path local_var_path = '/broadcasts/{broadcastId}'.sub('{' + 'broadcastId' + '}', CGI.escape(broadcast_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(update_broadcast_request) # return_type return_type = opts[:debug_return_type] || 'BroadcastResponse' # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization) auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey'] = opts.merge( :operation => :"BroadcastsApi.broadcasts_update", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BroadcastsApi#broadcasts_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |