Class: Twilio::REST::Content::V1::ContentContext::ApprovalFetchInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Content::V1::ContentContext::ApprovalFetchInstance
- Defined in:
- lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb
Overview
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected].
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the Account that created the Content resource.
-
#context ⇒ ApprovalFetchContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#fetch ⇒ ApprovalFetchInstance
Fetch the ApprovalFetchInstance.
-
#initialize(version, payload, sid: nil) ⇒ ApprovalFetchInstance
constructor
Initialize the ApprovalFetchInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#sid ⇒ String
The unique string that identifies the Content resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The URL of the resource, relative to ‘content.twilio.com`.
-
#whatsapp ⇒ Hash
Contains the whatsapp approval information for the Content resource.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ ApprovalFetchInstance
Initialize the ApprovalFetchInstance
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb', line 119 def initialize(version, payload, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'account_sid' => payload['account_sid'], 'whatsapp' => payload['whatsapp'], 'url' => payload['url'], } # Context @instance_context = nil @params = {'sid' => sid, } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the Account that created the Content resource.
154 155 156 |
# File 'lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb', line 154 def account_sid @properties['account_sid'] end |
#context ⇒ ApprovalFetchContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
139 140 141 142 143 144 |
# File 'lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb', line 139 def context unless @instance_context @instance_context = ApprovalFetchContext.new(@version, @params['sid'], ) end @instance_context end |
#fetch ⇒ ApprovalFetchInstance
Fetch the ApprovalFetchInstance
173 174 175 |
# File 'lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb', line 173 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
186 187 188 189 |
# File 'lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb', line 186 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Content.V1.ApprovalFetchInstance #{values}>" end |
#sid ⇒ String
Returns The unique string that identifies the Content resource.
148 149 150 |
# File 'lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb', line 148 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
179 180 181 182 |
# File 'lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb', line 179 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Content.V1.ApprovalFetchInstance #{values}>" end |
#url ⇒ String
Returns The URL of the resource, relative to ‘content.twilio.com`.
166 167 168 |
# File 'lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb', line 166 def url @properties['url'] end |
#whatsapp ⇒ Hash
Returns Contains the whatsapp approval information for the Content resource.
160 161 162 |
# File 'lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb', line 160 def whatsapp @properties['whatsapp'] end |