Class: Twilio::REST::Messaging::V1::ExternalCampaignList

Inherits:
ListResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/messaging/v1/external_campaign.rb

Overview

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ ExternalCampaignList

Initialize the ExternalCampaignList

Parameters:

  • version (Version)

    Version that contains the resource


20
21
22
23
24
25
26
# File 'lib/twilio-ruby/rest/messaging/v1/external_campaign.rb', line 20

def initialize(version)
  super(version)

  # Path Solution
  @solution = {}
  @uri = "/Services/PreregisteredUsa2p"
end

Instance Method Details

#create(campaign_id: nil, messaging_service_sid: nil) ⇒ ExternalCampaignInstance

Create the ExternalCampaignInstance

Parameters:

  • campaign_id (String) (defaults to: nil)

    ID of the preregistered campaign.

  • messaging_service_sid (String) (defaults to: nil)

    The SID of the Messaging Service that the resource is associated with.

Returns:


35
36
37
38
39
40
41
42
43
44
# File 'lib/twilio-ruby/rest/messaging/v1/external_campaign.rb', line 35

def create(campaign_id: nil, messaging_service_sid: nil)
  data = Twilio::Values.of({
      'CampaignId' => campaign_id,
      'MessagingServiceSid' => messaging_service_sid,
  })

  payload = @version.create('POST', @uri, data: data)

  ExternalCampaignInstance.new(@version, payload, )
end

#to_sObject

Provide a user friendly representation


48
49
50
# File 'lib/twilio-ruby/rest/messaging/v1/external_campaign.rb', line 48

def to_s
  '#<Twilio.Messaging.V1.ExternalCampaignList>'
end