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
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/usage/api/account) that created 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, content_sid: nil) ⇒ ApprovalFetchInstance
constructor
Initialize the ApprovalFetchInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#sid ⇒ String
The unique string that that we created to identify 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, with fields such as approval status, rejection reason, and category, amongst others.
Constructor Details
#initialize(version, payload, content_sid: nil) ⇒ ApprovalFetchInstance
Initialize the ApprovalFetchInstance
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
# File 'lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb', line 129 def initialize(version, payload , content_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 = { 'content_sid' => content_sid || @properties['content_sid'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/usage/api/account) that created Content resource.
164 165 166 |
# File 'lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb', line 164 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
149 150 151 152 153 154 |
# File 'lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb', line 149 def context unless @instance_context @instance_context = ApprovalFetchContext.new(@version , @params['content_sid']) end @instance_context end |
#fetch ⇒ ApprovalFetchInstance
Fetch the ApprovalFetchInstance
183 184 185 186 |
# File 'lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb', line 183 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
197 198 199 200 |
# File 'lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb', line 197 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Content.V1.ApprovalFetchInstance #{values}>" end |
#sid ⇒ String
Returns The unique string that that we created to identify the Content resource.
158 159 160 |
# File 'lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb', line 158 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
190 191 192 193 |
# File 'lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb', line 190 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`.
176 177 178 |
# File 'lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb', line 176 def url @properties['url'] end |
#whatsapp ⇒ Hash
Returns Contains the whatsapp approval information for the Content resource, with fields such as approval status, rejection reason, and category, amongst others.
170 171 172 |
# File 'lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb', line 170 def whatsapp @properties['whatsapp'] end |