Class: Twilio::REST::Messaging

Inherits:
Domain
  • Object
show all
Defined in:
lib/twilio-ruby/rest/messaging.rb,
lib/twilio-ruby/rest/messaging/v1.rb,
lib/twilio-ruby/rest/messaging/v1/service.rb,
lib/twilio-ruby/rest/messaging/v1/usecase.rb,
lib/twilio-ruby/rest/messaging/v1/deactivation.rb,
lib/twilio-ruby/rest/messaging/v1/external_campaign.rb,
lib/twilio-ruby/rest/messaging/v1/brand_registration.rb,
lib/twilio-ruby/rest/messaging/v1/service/short_code.rb,
lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb,
lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb,
lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb,
lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb

Defined Under Namespace

Classes: V1

Instance Attribute Summary

Attributes inherited from Domain

#client

Instance Method Summary collapse

Methods inherited from Domain

#absolute_url, #request

Constructor Details

#initialize(twilio) ⇒ Messaging

Initialize the Messaging Domain


14
15
16
17
18
19
20
21
22
23
# File 'lib/twilio-ruby/rest/messaging.rb', line 14

def initialize(twilio)
  super

  @base_url = 'https://messaging.twilio.com'
  @host = 'messaging.twilio.com'
  @port = 443

  # Versions
  @v1 = nil
end

Instance Method Details

#brand_registrations(sid = :unset) ⇒ Twilio::REST::Messaging::V1::BrandRegistrationInstance, Twilio::REST::Messaging::V1::BrandRegistrationList

Parameters:

  • sid (String) (defaults to: :unset)

    The unique string to identify Brand Registration.

Returns:


35
36
37
# File 'lib/twilio-ruby/rest/messaging.rb', line 35

def brand_registrations(sid=:unset)
  self.v1.brand_registrations(sid)
end

#deactivationsTwilio::REST::Messaging::V1::DeactivationsInstance


41
42
43
# File 'lib/twilio-ruby/rest/messaging.rb', line 41

def deactivations
  self.v1.deactivations()
end

#external_campaignTwilio::REST::Messaging::V1::ExternalCampaignInstance


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

def external_campaign
  self.v1.external_campaign()
end

#services(sid = :unset) ⇒ Twilio::REST::Messaging::V1::ServiceInstance, Twilio::REST::Messaging::V1::ServiceList

Parameters:

  • sid (String) (defaults to: :unset)

    The unique string that we created to identify the Service resource.

Returns:


56
57
58
# File 'lib/twilio-ruby/rest/messaging.rb', line 56

def services(sid=:unset)
  self.v1.services(sid)
end

#to_sObject

Provide a user friendly representation


68
69
70
# File 'lib/twilio-ruby/rest/messaging.rb', line 68

def to_s
  '#<Twilio::REST::Messaging>'
end

#usecasesTwilio::REST::Messaging::V1::UsecaseInstance


62
63
64
# File 'lib/twilio-ruby/rest/messaging.rb', line 62

def usecases
  self.v1.usecases()
end

#v1Object

Version v1 of messaging


27
28
29
# File 'lib/twilio-ruby/rest/messaging.rb', line 27

def v1
  @v1 ||= V1.new self
end