Class: Twilio::REST::Messaging::V1::DeactivationsInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Messaging::V1::DeactivationsInstance
- Defined in:
- lib/twilio-ruby/rest/messaging/v1/deactivations.rb
Instance Method Summary collapse
-
#context ⇒ DeactivationsContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#fetch(date: :unset) ⇒ DeactivationsInstance
Fetch the DeactivationsInstance.
-
#initialize(version, payload) ⇒ DeactivationsInstance
constructor
Initialize the DeactivationsInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#redirect_to ⇒ String
Returns an authenticated url that redirects to a file containing the deactivated numbers for the requested day.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, payload) ⇒ DeactivationsInstance
Initialize the DeactivationsInstance
275 276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/twilio-ruby/rest/messaging/v1/deactivations.rb', line 275 def initialize(version, payload ) super(version) # Marshaled Properties @properties = { 'redirect_to' => payload['redirect_to'], } # Context @instance_context = nil @params = { } end |
Instance Method Details
#context ⇒ DeactivationsContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
293 294 295 296 297 298 |
# File 'lib/twilio-ruby/rest/messaging/v1/deactivations.rb', line 293 def context unless @instance_context @instance_context = DeactivationsContext.new(@version ) end @instance_context end |
#fetch(date: :unset) ⇒ DeactivationsInstance
Fetch the DeactivationsInstance
310 311 312 313 314 315 316 317 |
# File 'lib/twilio-ruby/rest/messaging/v1/deactivations.rb', line 310 def fetch( date: :unset ) context.fetch( date: date, ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
328 329 330 331 |
# File 'lib/twilio-ruby/rest/messaging/v1/deactivations.rb', line 328 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Messaging.V1.DeactivationsInstance #{values}>" end |
#redirect_to ⇒ String
Returns an authenticated url that redirects to a file containing the deactivated numbers for the requested day. This url is valid for up to two minutes.
302 303 304 |
# File 'lib/twilio-ruby/rest/messaging/v1/deactivations.rb', line 302 def redirect_to @properties['redirect_to'] end |
#to_s ⇒ Object
Provide a user friendly representation
321 322 323 324 |
# File 'lib/twilio-ruby/rest/messaging/v1/deactivations.rb', line 321 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Messaging.V1.DeactivationsInstance #{values}>" end |