Class: Twilio::REST::Content::V1::ContentContext::ApprovalFetchContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Content::V1::ContentContext::ApprovalFetchContext
- Defined in:
- lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb
Instance Method Summary collapse
-
#fetch ⇒ ApprovalFetchInstance
Fetch the ApprovalFetchInstance.
-
#initialize(version, sid) ⇒ ApprovalFetchContext
constructor
Initialize the ApprovalFetchContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, sid) ⇒ ApprovalFetchContext
Initialize the ApprovalFetchContext
51 52 53 54 55 56 57 58 59 |
# File 'lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb', line 51 def initialize(version, sid) super(version) # Path Solution @solution = { sid: sid, } @uri = "/Content/#{@solution[:sid]}/ApprovalRequests" end |
Instance Method Details
#fetch ⇒ ApprovalFetchInstance
Fetch the ApprovalFetchInstance
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb', line 63 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) ApprovalFetchInstance.new( @version, payload, sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
89 90 91 92 |
# File 'lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb', line 89 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Content.V1.ApprovalFetchContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
82 83 84 85 |
# File 'lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb', line 82 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Content.V1.ApprovalFetchContext #{context}>" end |