class Twilio::REST::Messaging::V1::ServiceContext::AlphaSenderInstance

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

Public Class Methods

new(version, payload, service_sid: nil, sid: nil) click to toggle source

Initialize the AlphaSenderInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] service_sid The SID of the

{Service}[https://www.twilio.com/docs/chat/rest/service-resource] the resource
is associated with.

@param [String] sid The SID of the AlphaSender resource to fetch. @return [AlphaSenderInstance] AlphaSenderInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb
231 def initialize(version, payload, service_sid: nil, sid: nil)
232   super(version)
233 
234   # Marshaled Properties
235   @properties = {
236       'sid' => payload['sid'],
237       'account_sid' => payload['account_sid'],
238       'service_sid' => payload['service_sid'],
239       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
240       'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
241       'alpha_sender' => payload['alpha_sender'],
242       'capabilities' => payload['capabilities'],
243       'url' => payload['url'],
244   }
245 
246   # Context
247   @instance_context = nil
248   @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'], }
249 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The SID of the Account that created the resource

    # File lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb
270 def account_sid
271   @properties['account_sid']
272 end
alpha_sender() click to toggle source

@return [String] The Alphanumeric Sender ID string

    # File lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb
294 def alpha_sender
295   @properties['alpha_sender']
296 end
capabilities() click to toggle source

@return [Array] An array of values that describe whether the number can receive calls or messages

    # File lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb
300 def capabilities
301   @properties['capabilities']
302 end
context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [AlphaSenderContext] AlphaSenderContext for this AlphaSenderInstance

    # File lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb
255 def context
256   unless @instance_context
257     @instance_context = AlphaSenderContext.new(@version, @params['service_sid'], @params['sid'], )
258   end
259   @instance_context
260 end
date_created() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the resource was created

    # File lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb
282 def date_created
283   @properties['date_created']
284 end
date_updated() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the resource was last updated

    # File lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb
288 def date_updated
289   @properties['date_updated']
290 end
delete() click to toggle source

Delete the AlphaSenderInstance @return [Boolean] true if delete succeeds, false otherwise

    # File lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb
320 def delete
321   context.delete
322 end
fetch() click to toggle source

Fetch the AlphaSenderInstance @return [AlphaSenderInstance] Fetched AlphaSenderInstance

    # File lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb
313 def fetch
314   context.fetch
315 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb
333 def inspect
334   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
335   "<Twilio.Messaging.V1.AlphaSenderInstance #{values}>"
336 end
service_sid() click to toggle source

@return [String] The SID of the Service that the resource is associated with

    # File lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb
276 def service_sid
277   @properties['service_sid']
278 end
sid() click to toggle source

@return [String] The unique string that identifies the resource

    # File lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb
264 def sid
265   @properties['sid']
266 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb
326 def to_s
327   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
328   "<Twilio.Messaging.V1.AlphaSenderInstance #{values}>"
329 end
url() click to toggle source

@return [String] The absolute URL of the AlphaSender resource

    # File lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb
306 def url
307   @properties['url']
308 end