Class: Twilio::REST::Messaging::V1::DeactivationsContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Messaging::V1::DeactivationsContext
- Defined in:
- lib/twilio-ruby/rest/messaging/v1/deactivations.rb
Instance Method Summary collapse
-
#fetch(date: :unset) ⇒ DeactivationsInstance
Fetch the DeactivationsInstance.
-
#initialize(version) ⇒ DeactivationsContext
constructor
Initialize the DeactivationsContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version) ⇒ DeactivationsContext
Initialize the DeactivationsContext
48 49 50 51 52 53 54 55 56 |
# File 'lib/twilio-ruby/rest/messaging/v1/deactivations.rb', line 48 def initialize(version) super(version) # Path Solution @solution = { } @uri = "/Deactivations" end |
Instance Method Details
#fetch(date: :unset) ⇒ DeactivationsInstance
Fetch the DeactivationsInstance
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/twilio-ruby/rest/messaging/v1/deactivations.rb', line 61 def fetch( date: :unset ) params = Twilio::Values.of({ 'Date' => Twilio.serialize_iso8601_date(date), }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, params: params, headers: headers) DeactivationsInstance.new( @version, payload, ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
91 92 93 94 |
# File 'lib/twilio-ruby/rest/messaging/v1/deactivations.rb', line 91 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Messaging.V1.DeactivationsContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
84 85 86 87 |
# File 'lib/twilio-ruby/rest/messaging/v1/deactivations.rb', line 84 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Messaging.V1.DeactivationsContext #{context}>" end |