lib/twilio-ruby/rest/monitor/v1/alert.rb in twilio-ruby-5.26.0 vs lib/twilio-ruby/rest/monitor/v1/alert.rb in twilio-ruby-5.27.0

- old
+ new

@@ -193,11 +193,11 @@ class AlertContext < InstanceContext ## # Initialize the AlertContext # @param [Version] version Version that contains the resource - # @param [String] sid The sid + # @param [String] sid A 34 character string that uniquely identifies this Alert. # @return [AlertContext] AlertContext def initialize(version, sid) super(version) # Path Solution @@ -219,17 +219,10 @@ AlertInstance.new(@version, payload, sid: @solution[:sid], ) end ## - # Deletes the AlertInstance - # @return [Boolean] true if delete succeeds, false otherwise - def delete - @version.delete('delete', @uri) - end - - ## # Provide a user friendly representation def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Monitor.V1.AlertContext #{context}>" end @@ -245,11 +238,11 @@ class AlertInstance < InstanceResource ## # Initialize the AlertInstance # @param [Version] version Version that contains the resource # @param [Hash] payload payload that contains response from Twilio - # @param [String] sid The sid + # @param [String] sid A 34 character string that uniquely identifies this Alert. # @return [AlertInstance] AlertInstance def initialize(version, payload, sid: nil) super(version) # Marshaled Properties @@ -266,13 +259,15 @@ 'request_method' => payload['request_method'], 'request_url' => payload['request_url'], 'resource_sid' => payload['resource_sid'], 'sid' => payload['sid'], 'url' => payload['url'], + 'service_sid' => payload['service_sid'], 'request_variables' => payload['request_variables'], 'response_body' => payload['response_body'], 'response_headers' => payload['response_headers'], + 'request_headers' => payload['request_headers'], } # Context @instance_context = nil @params = {'sid' => sid || @properties['sid'], } @@ -390,20 +385,25 @@ def url @properties['url'] end ## + # @return [String] The request_headers + def request_headers + @properties['request_headers'] + end + + ## + # @return [String] The service_sid + def service_sid + @properties['service_sid'] + end + + ## # Fetch a AlertInstance # @return [AlertInstance] Fetched AlertInstance def fetch context.fetch - end - - ## - # Deletes the AlertInstance - # @return [Boolean] true if delete succeeds, false otherwise - def delete - context.delete end ## # Provide a user friendly representation def to_s \ No newline at end of file