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

Inherits:
Version
  • Object
show all
Defined in:
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/domain_certs.rb,
lib/twilio-ruby/rest/messaging/v1/deactivations.rb,
lib/twilio-ruby/rest/messaging/v1/domain_config.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/tollfree_verification.rb,
lib/twilio-ruby/rest/messaging/v1/service/channel_sender.rb,
lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb,
lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb,
lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb,
lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb,
lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb,
lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_registration_otp.rb,
lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service_domain_association.rb

Defined Under Namespace

Classes: BrandRegistrationContext, BrandRegistrationInstance, BrandRegistrationList, BrandRegistrationPage, DeactivationsContext, DeactivationsInstance, DeactivationsList, DeactivationsPage, DomainCertsContext, DomainCertsInstance, DomainCertsList, DomainCertsPage, DomainConfigContext, DomainConfigInstance, DomainConfigList, DomainConfigMessagingServiceContext, DomainConfigMessagingServiceInstance, DomainConfigMessagingServiceList, DomainConfigMessagingServicePage, DomainConfigPage, ExternalCampaignInstance, ExternalCampaignList, ExternalCampaignPage, LinkshorteningMessagingServiceContext, LinkshorteningMessagingServiceDomainAssociationContext, LinkshorteningMessagingServiceDomainAssociationInstance, LinkshorteningMessagingServiceDomainAssociationList, LinkshorteningMessagingServiceDomainAssociationPage, LinkshorteningMessagingServiceInstance, LinkshorteningMessagingServiceList, LinkshorteningMessagingServicePage, ServiceContext, ServiceInstance, ServiceList, ServicePage, TollfreeVerificationContext, TollfreeVerificationInstance, TollfreeVerificationList, TollfreeVerificationPage, UsecaseInstance, UsecaseList, UsecasePage

Instance Attribute Summary

Attributes inherited from Version

#domain

Instance Method Summary collapse

Methods inherited from Version

#absolute_url, #create, #delete, #exception, #fetch, #page, #read_limits, #relative_uri, #request, #stream, #update

Constructor Details

#initialize(domain) ⇒ V1

Initialize the V1 version of Messaging



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/twilio-ruby/rest/messaging/v1.rb', line 21

def initialize(domain)
    super
    @version = 'v1'
    @brand_registrations = nil
    @deactivations = nil
    @domain_certs = nil
    @domain_config = nil
    @domain_config_messaging_service = nil
    @external_campaign = nil
    @linkshortening_messaging_service = nil
    @linkshortening_messaging_service_domain_association = nil
    @services = nil
    @tollfree_verifications = nil
    @usecases = nil
end

Instance Method Details

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

Parameters:

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

    The SID of the Brand Registration resource to fetch.

Returns:



41
42
43
44
45
46
47
48
49
50
# File 'lib/twilio-ruby/rest/messaging/v1.rb', line 41

def brand_registrations(sid=:unset)
    if sid.nil?
        raise ArgumentError, 'sid cannot be nil'
    end
    if sid == :unset
        @brand_registrations ||= BrandRegistrationList.new self
    else
        BrandRegistrationContext.new(self, sid)
    end
end

#deactivationsTwilio::REST::Messaging::V1::deactivationsContext

Returns:

  • (Twilio::REST::Messaging::V1::deactivationsContext)


53
54
55
# File 'lib/twilio-ruby/rest/messaging/v1.rb', line 53

def deactivations
    @deactivations ||= DeactivationsContext.new self
end

#domain_certs(domain_sid = :unset) ⇒ Twilio::REST::Messaging::V1::DomainCertsContext, Twilio::REST::Messaging::V1::DomainCertsList

Parameters:

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

    Unique string used to identify the domain that this certificate should be associated with.

Returns:



60
61
62
63
64
65
66
67
68
69
# File 'lib/twilio-ruby/rest/messaging/v1.rb', line 60

def domain_certs(domain_sid=:unset)
    if domain_sid.nil?
        raise ArgumentError, 'domain_sid cannot be nil'
    end
    if domain_sid == :unset
        @domain_certs ||= DomainCertsList.new self
    else
        DomainCertsContext.new(self, domain_sid)
    end
end

#domain_config(domain_sid = :unset) ⇒ Twilio::REST::Messaging::V1::DomainConfigContext, Twilio::REST::Messaging::V1::DomainConfigList

Parameters:

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

    Unique string used to identify the domain that this config should be associated with.

Returns:



74
75
76
77
78
79
80
81
82
83
# File 'lib/twilio-ruby/rest/messaging/v1.rb', line 74

def domain_config(domain_sid=:unset)
    if domain_sid.nil?
        raise ArgumentError, 'domain_sid cannot be nil'
    end
    if domain_sid == :unset
        @domain_config ||= DomainConfigList.new self
    else
        DomainConfigContext.new(self, domain_sid)
    end
end

#domain_config_messaging_service(messaging_service_sid = :unset) ⇒ Twilio::REST::Messaging::V1::DomainConfigMessagingServiceContext, Twilio::REST::Messaging::V1::DomainConfigMessagingServiceList

Parameters:

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

    Unique string used to identify the Messaging service that this domain should be associated with.

Returns:



88
89
90
91
92
93
94
95
96
97
# File 'lib/twilio-ruby/rest/messaging/v1.rb', line 88

def domain_config_messaging_service(messaging_service_sid=:unset)
    if messaging_service_sid.nil?
        raise ArgumentError, 'messaging_service_sid cannot be nil'
    end
    if messaging_service_sid == :unset
        @domain_config_messaging_service ||= DomainConfigMessagingServiceList.new self
    else
        DomainConfigMessagingServiceContext.new(self, messaging_service_sid)
    end
end

#external_campaignTwilio::REST::Messaging::V1::ExternalCampaignList



100
101
102
# File 'lib/twilio-ruby/rest/messaging/v1.rb', line 100

def external_campaign
    @external_campaign ||= ExternalCampaignList.new self
end

#linkshortening_messaging_service(domain_sid = :unset, messaging_service_sid = :unset) ⇒ Twilio::REST::Messaging::V1::LinkshorteningMessagingServiceContext, Twilio::REST::Messaging::V1::LinkshorteningMessagingServiceList

Parameters:

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

    The domain SID to associate with a messaging service. With URL shortening enabled, links in messages sent with the associated messaging service will be shortened to the provided domain

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

    A messaging service SID to associate with a domain. With URL shortening enabled, links in messages sent with the provided messaging service will be shortened to the associated domain

Returns:



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

def linkshortening_messaging_service(domain_sid=:unset, messaging_service_sid=:unset)
    if domain_sid.nil?
        raise ArgumentError, 'domain_sid cannot be nil'
    end
    if messaging_service_sid.nil?
        raise ArgumentError, 'messaging_service_sid cannot be nil'
    end
    if domain_sid == :unset && messaging_service_sid == :unset
        @linkshortening_messaging_service ||= LinkshorteningMessagingServiceList.new self
    else
        LinkshorteningMessagingServiceContext.new(self, domain_sid, messaging_service_sid)
    end
end

#linkshortening_messaging_service_domain_association(messaging_service_sid = :unset) ⇒ Twilio::REST::Messaging::V1::LinkshorteningMessagingServiceDomainAssociationContext, Twilio::REST::Messaging::V1::LinkshorteningMessagingServiceDomainAssociationList

Parameters:

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

    Unique string used to identify the Messaging service that this domain should be associated with.

Returns:



143
144
145
146
147
148
149
150
151
152
# File 'lib/twilio-ruby/rest/messaging/v1.rb', line 143

def linkshortening_messaging_service_domain_association(messaging_service_sid=:unset)
    if messaging_service_sid.nil?
        raise ArgumentError, 'messaging_service_sid cannot be nil'
    end
    if messaging_service_sid == :unset
        @linkshortening_messaging_service_domain_association ||= LinkshorteningMessagingServiceDomainAssociationList.new self
    else
        LinkshorteningMessagingServiceDomainAssociationContext.new(self, messaging_service_sid)
    end
end

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

Parameters:

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

    The SID of the Service resource to fetch.

Returns:



157
158
159
160
161
162
163
164
165
166
# File 'lib/twilio-ruby/rest/messaging/v1.rb', line 157

def services(sid=:unset)
    if sid.nil?
        raise ArgumentError, 'sid cannot be nil'
    end
    if sid == :unset
        @services ||= ServiceList.new self
    else
        ServiceContext.new(self, sid)
    end
end

#to_sObject

Provide a user friendly representation



188
189
190
# File 'lib/twilio-ruby/rest/messaging/v1.rb', line 188

def to_s
    '<Twilio::REST::Messaging::V1>';
end

#tollfree_verifications(sid = :unset) ⇒ Twilio::REST::Messaging::V1::TollfreeVerificationContext, Twilio::REST::Messaging::V1::TollfreeVerificationList

Parameters:

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

    The unique string to identify Tollfree Verification.

Returns:



171
172
173
174
175
176
177
178
179
180
# File 'lib/twilio-ruby/rest/messaging/v1.rb', line 171

def tollfree_verifications(sid=:unset)
    if sid.nil?
        raise ArgumentError, 'sid cannot be nil'
    end
    if sid == :unset
        @tollfree_verifications ||= TollfreeVerificationList.new self
    else
        TollfreeVerificationContext.new(self, sid)
    end
end

#usecasesTwilio::REST::Messaging::V1::UsecaseList



183
184
185
# File 'lib/twilio-ruby/rest/messaging/v1.rb', line 183

def usecases
    @usecases ||= UsecaseList.new self
end