Class: Twilio::REST::Messaging::V1::ExternalCampaignList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Messaging::V1::ExternalCampaignList
- Defined in:
- lib/twilio-ruby/rest/messaging/v1/external_campaign.rb
Instance Method Summary collapse
-
#create(campaign_id: nil, messaging_service_sid: nil, cnp_migration: :unset) ⇒ ExternalCampaignInstance
Create the ExternalCampaignInstance.
-
#initialize(version) ⇒ ExternalCampaignList
constructor
Initialize the ExternalCampaignList.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version) ⇒ ExternalCampaignList
Initialize the ExternalCampaignList
26 27 28 29 30 31 32 |
# File 'lib/twilio-ruby/rest/messaging/v1/external_campaign.rb', line 26 def initialize(version) super(version) # Path Solution @solution = { } @uri = "/Services/PreregisteredUsa2p" end |
Instance Method Details
#create(campaign_id: nil, messaging_service_sid: nil, cnp_migration: :unset) ⇒ ExternalCampaignInstance
Create the ExternalCampaignInstance
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/twilio-ruby/rest/messaging/v1/external_campaign.rb', line 39 def create( campaign_id: nil, messaging_service_sid: nil, cnp_migration: :unset ) data = Twilio::Values.of({ 'CampaignId' => campaign_id, 'MessagingServiceSid' => messaging_service_sid, 'CnpMigration' => cnp_migration, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.create('POST', @uri, data: data, headers: headers) ExternalCampaignInstance.new( @version, payload, ) end |
#to_s ⇒ Object
Provide a user friendly representation
68 69 70 |
# File 'lib/twilio-ruby/rest/messaging/v1/external_campaign.rb', line 68 def to_s '#<Twilio.Messaging.V1.ExternalCampaignList>' end |