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.



151
152
153
154
155
156
157
158
159
160
161
162
163
# File 'lib/twilio-ruby/rest/messaging/v1/external_campaign.rb', line 151

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_sid ⇒ String

Returns The SID of the Account that the Campaign belongs to.

Returns:

  • (String) —

    The SID of the Account that the Campaign belongs to.



174
175
176
# File 'lib/twilio-ruby/rest/messaging/v1/external_campaign.rb', line 174

def 
    @properties['account_sid']
end

#campaign_id ⇒ String

Returns ID of the preregistered campaign.

Returns:

  • (String) —

    ID of the preregistered campaign.



180
181
182
# File 'lib/twilio-ruby/rest/messaging/v1/external_campaign.rb', line 180

def campaign_id
    @properties['campaign_id']
end

#date_created ⇒ Time

Returns The date and time in GMT when the resource was created specified in ISO 8601 format.

Returns:

  • (Time) —

    The date and time in GMT when the resource was created specified in ISO 8601 format.



192
193
194
# File 'lib/twilio-ruby/rest/messaging/v1/external_campaign.rb', line 192

def date_created
    @properties['date_created']
end

#inspect ⇒ Object

Provide a detailed, user friendly representation



204
205
206
# File 'lib/twilio-ruby/rest/messaging/v1/external_campaign.rb', line 204

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

#messaging_service_sid ⇒ String

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

Returns:

  • (String) —

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



186
187
188
# File 'lib/twilio-ruby/rest/messaging/v1/external_campaign.rb', line 186

def messaging_service_sid
    @properties['messaging_service_sid']
end

#sid ⇒ String

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.



168
169
170
# File 'lib/twilio-ruby/rest/messaging/v1/external_campaign.rb', line 168

def sid
    @properties['sid']
end

#to_s ⇒ Object

Provide a user friendly representation



198
199
200
# File 'lib/twilio-ruby/rest/messaging/v1/external_campaign.rb', line 198

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