Class: Twilio::REST::Content::V1::ContentContext::ApprovalCreateList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Content::V1::ContentContext::ApprovalCreateList
- Defined in:
- lib/twilio-ruby/rest/content/v1/content/approval_create.rb
Defined Under Namespace
Classes: ContentApprovalRequest
Instance Method Summary collapse
-
#create(content_approval_request: nil) ⇒ ApprovalCreateInstance
Create the ApprovalCreateInstance.
-
#initialize(version, content_sid: nil) ⇒ ApprovalCreateList
constructor
Initialize the ApprovalCreateList.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, content_sid: nil) ⇒ ApprovalCreateList
Initialize the ApprovalCreateList
44 45 46 47 48 49 50 |
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 44 def initialize(version, content_sid: nil) super(version) # Path Solution @solution = { content_sid: content_sid } @uri = "/Content/#{@solution[:content_sid]}/ApprovalRequests/whatsapp" end |
Instance Method Details
#create(content_approval_request: nil) ⇒ ApprovalCreateInstance
Create the ApprovalCreateInstance
55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 55 def create(content_approval_request: nil ) headers = Twilio::Values.of({"Content-Type"=> "application/json"}) payload = @version.create('POST', @uri, data: content_approval_request.to_json, headers: headers) ApprovalCreateInstance.new( @version, payload, content_sid: @solution[:content_sid], ) end |
#to_s ⇒ Object
Provide a user friendly representation
71 72 73 |
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 71 def to_s '#<Twilio.Content.V1.ApprovalCreateList>' end |