class Twilio::REST::Numbers::V2::RegulatoryComplianceList::EndUserInstance
Public Class Methods
Initialize the EndUserInstance
@param [Version] version Version
that contains the resource @param [Hash] payload payload that contains response from Twilio
@param [String] sid The unique string created by Twilio
to identify the End User
resource.
@return [EndUserInstance] EndUserInstance
Twilio::REST::InstanceResource::new
# File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb 236 def initialize(version, payload, sid: nil) 237 super(version) 238 239 # Marshaled Properties 240 @properties = { 241 'sid' => payload['sid'], 242 'account_sid' => payload['account_sid'], 243 'friendly_name' => payload['friendly_name'], 244 'type' => payload['type'], 245 'attributes' => payload['attributes'], 246 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 247 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 248 'url' => payload['url'], 249 } 250 251 # Context 252 @instance_context = nil 253 @params = {'sid' => sid || @properties['sid'], } 254 end
Public Instance Methods
@return [String] The SID of the Account that created the resource
# File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb 275 def account_sid 276 @properties['account_sid'] 277 end
@return [Hash] The set of parameters that compose the End Users resource
# File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb 293 def attributes 294 @properties['attributes'] 295 end
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [EndUserContext] EndUserContext
for this EndUserInstance
# File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb 260 def context 261 unless @instance_context 262 @instance_context = EndUserContext.new(@version, @params['sid'], ) 263 end 264 @instance_context 265 end
@return [Time] The ISO 8601 date and time in GMT when the resource was created
# File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb 299 def date_created 300 @properties['date_created'] 301 end
@return [Time] The ISO 8601 date and time in GMT when the resource was last updated
# File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb 305 def date_updated 306 @properties['date_updated'] 307 end
Delete the EndUserInstance
@return [Boolean] true if delete succeeds, false otherwise
# File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb 336 def delete 337 context.delete 338 end
Fetch the EndUserInstance
@return [EndUserInstance] Fetched EndUserInstance
# File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb 318 def fetch 319 context.fetch 320 end
@return [String] The string that you assigned to describe the resource
# File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb 281 def friendly_name 282 @properties['friendly_name'] 283 end
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb 349 def inspect 350 values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") 351 "<Twilio.Numbers.V2.EndUserInstance #{values}>" 352 end
@return [String] The unique string that identifies the resource
# File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb 269 def sid 270 @properties['sid'] 271 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb 342 def to_s 343 values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") 344 "<Twilio.Numbers.V2.EndUserInstance #{values}>" 345 end
@return [end_user.Type] The type of end user of the Bundle resource
# File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb 287 def type 288 @properties['type'] 289 end
Update the EndUserInstance
@param [String] friendly_name
The string that you assigned to describe the
resource.
@param [Hash] attributes The set of parameters that are the attributes of the
End User resource which are derived End User Types.
@return [EndUserInstance] Updated EndUserInstance
# File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb 329 def update(friendly_name: :unset, attributes: :unset) 330 context.update(friendly_name: friendly_name, attributes: attributes, ) 331 end
@return [String] The absolute URL of the End User resource
# File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb 311 def url 312 @properties['url'] 313 end