Class: SurgeAPI::Resources::Blasts
- Inherits:
-
Object
- Object
- SurgeAPI::Resources::Blasts
- Defined in:
- lib/surge_api/resources/blasts.rb
Instance Method Summary collapse
-
#create(account_id, attachments: nil, body: nil, contacts: nil, from: nil, name: nil, segments: nil, send_at: nil, to: nil, request_options: {}) ⇒ SurgeAPI::Models::Blast
Some parameter documentations has been truncated, see Models::BlastCreateParams for more details.
-
#initialize(client:) ⇒ Blasts
constructor
private
A new instance of Blasts.
Constructor Details
#initialize(client:) ⇒ Blasts
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Blasts.
50 51 52 |
# File 'lib/surge_api/resources/blasts.rb', line 50 def initialize(client:) @client = client end |
Instance Method Details
#create(account_id, attachments: nil, body: nil, contacts: nil, from: nil, name: nil, segments: nil, send_at: nil, to: nil, request_options: {}) ⇒ SurgeAPI::Models::Blast
Some parameter documentations has been truncated, see Models::BlastCreateParams for more details.
Sends a Blast.
36 37 38 39 40 41 42 43 44 45 |
# File 'lib/surge_api/resources/blasts.rb', line 36 def create(account_id, params = {}) parsed, = SurgeAPI::BlastCreateParams.dump_request(params) @client.request( method: :post, path: ["accounts/%1$s/blasts", account_id], body: parsed, model: SurgeAPI::Blast, options: ) end |