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

Inherits:
InstanceResource 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, payload) ⇒ ExternalCampaignInstance

Initialize the ExternalCampaignInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio


92
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/twilio-ruby/rest/messaging/v1/external_campaign.rb', line 92

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 that created the resource.

Returns:

  • (String)

    The SID of the Account that created the resource


113
114
115
# File 'lib/twilio-ruby/rest/messaging/v1/external_campaign.rb', line 113

def 
  @properties['account_sid']
end

#campaign_idString

Returns ID of the preregistered campaign.

Returns:

  • (String)

    ID of the preregistered campaign.


119
120
121
# File 'lib/twilio-ruby/rest/messaging/v1/external_campaign.rb', line 119

def campaign_id
  @properties['campaign_id']
end

#date_createdTime

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

Returns:

  • (Time)

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


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

def date_created
  @properties['date_created']
end

#inspectObject

Provide a detailed, user friendly representation


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

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

#messaging_service_sidString

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

Returns:

  • (String)

    The SID of the Messaging Service the resource is associated with


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

def messaging_service_sid
  @properties['messaging_service_sid']
end

#sidString

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

Returns:

  • (String)

    The unique string that identifies a US A2P Compliance resource


107
108
109
# File 'lib/twilio-ruby/rest/messaging/v1/external_campaign.rb', line 107

def sid
  @properties['sid']
end

#to_sObject

Provide a user friendly representation


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

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