Class: Twilio::REST::Messaging::V1::ExternalCampaignInstance

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload) ⇒ ExternalCampaignInstance

Initialize the ExternalCampaignInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String)

    The SID of the Account that created this ExternalCampaign resource.

  • sid (String)

    The SID of the Call resource to fetch.



111
112
113
114
115
116
117
118
119
120
121
122
# File 'lib/twilio-ruby/rest/messaging/v1/external_campaign.rb', line 111

def initialize(version, payload )
    super(version)
    
    # Marshaled Properties
    @properties = { 
        'sid' => payload['sid'],
        'account_sid' => payload['account_sid'],
        'campaign_id' => payload['campaign_id'],
        'messaging_service_sid' => payload['messaging_service_sid'],
        'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
    }
end

Instance Method Details

#account_sidString

Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that the Campaign belongs to.

Returns:



133
134
135
# File 'lib/twilio-ruby/rest/messaging/v1/external_campaign.rb', line 133

def 
    @properties['account_sid']
end

#campaign_idString

Returns ID of the preregistered campaign.

Returns:

  • (String)

    ID of the preregistered campaign.



139
140
141
# File 'lib/twilio-ruby/rest/messaging/v1/external_campaign.rb', line 139

def campaign_id
    @properties['campaign_id']
end

#date_createdTime

Returns The date and time in GMT when the resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.

Returns:



151
152
153
# File 'lib/twilio-ruby/rest/messaging/v1/external_campaign.rb', line 151

def date_created
    @properties['date_created']
end

#inspectObject

Provide a detailed, user friendly representation



163
164
165
# File 'lib/twilio-ruby/rest/messaging/v1/external_campaign.rb', line 163

def inspect
    "<Twilio.Messaging.V1.ExternalCampaignInstance>"
end

#messaging_service_sidString

Returns The SID of the [Messaging Service](www.twilio.com/docs/messaging/api/service-resource) that the resource is associated with.

Returns:



145
146
147
# File 'lib/twilio-ruby/rest/messaging/v1/external_campaign.rb', line 145

def messaging_service_sid
    @properties['messaging_service_sid']
end

#sidString

Returns The unique string that identifies a US A2P Compliance resource ‘QE2c6890da8086d771620e9b13fadeba0b`.

Returns:

  • (String)

    The unique string that identifies a US A2P Compliance resource ‘QE2c6890da8086d771620e9b13fadeba0b`.



127
128
129
# File 'lib/twilio-ruby/rest/messaging/v1/external_campaign.rb', line 127

def sid
    @properties['sid']
end

#to_sObject

Provide a user friendly representation



157
158
159
# File 'lib/twilio-ruby/rest/messaging/v1/external_campaign.rb', line 157

def to_s
    "<Twilio.Messaging.V1.ExternalCampaignInstance>"
end