class Twilio::REST::Numbers::V2::RegulatoryComplianceList::BundleContext::ItemAssignmentInstance
Public Class Methods
Initialize the ItemAssignmentInstance
@param [Version] version Version
that contains the resource @param [Hash] payload payload that contains response from Twilio
@param [String] bundle_sid
The unique string that we created to identify the
Bundle resource.
@param [String] sid The unique string that we created to identify the Identity
resource.
@return [ItemAssignmentInstance] ItemAssignmentInstance
Twilio::REST::InstanceResource::new
# File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb 222 def initialize(version, payload, bundle_sid: nil, sid: nil) 223 super(version) 224 225 # Marshaled Properties 226 @properties = { 227 'sid' => payload['sid'], 228 'bundle_sid' => payload['bundle_sid'], 229 'account_sid' => payload['account_sid'], 230 'object_sid' => payload['object_sid'], 231 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 232 'url' => payload['url'], 233 } 234 235 # Context 236 @instance_context = nil 237 @params = {'bundle_sid' => bundle_sid, 'sid' => sid || @properties['sid'], } 238 end
Public Instance Methods
@return [String] The SID of the Account that created the resource
# File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb 265 def account_sid 266 @properties['account_sid'] 267 end
@return [String] The unique string that identifies the Bundle resource.
# File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb 259 def bundle_sid 260 @properties['bundle_sid'] 261 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 [ItemAssignmentContext] ItemAssignmentContext
for this ItemAssignmentInstance
# File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb 244 def context 245 unless @instance_context 246 @instance_context = ItemAssignmentContext.new(@version, @params['bundle_sid'], @params['sid'], ) 247 end 248 @instance_context 249 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/bundle/item_assignment.rb 277 def date_created 278 @properties['date_created'] 279 end
Delete the ItemAssignmentInstance
@return [Boolean] true if delete succeeds, false otherwise
# File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb 297 def delete 298 context.delete 299 end
Fetch the ItemAssignmentInstance
@return [ItemAssignmentInstance] Fetched ItemAssignmentInstance
# File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb 290 def fetch 291 context.fetch 292 end
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb 310 def inspect 311 values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") 312 "<Twilio.Numbers.V2.ItemAssignmentInstance #{values}>" 313 end
@return [String] The sid of an object bag
# File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb 271 def object_sid 272 @properties['object_sid'] 273 end
@return [String] The unique string that identifies the resource
# File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb 253 def sid 254 @properties['sid'] 255 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb 303 def to_s 304 values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") 305 "<Twilio.Numbers.V2.ItemAssignmentInstance #{values}>" 306 end
@return [String] The absolute URL of the Identity resource
# File lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb 283 def url 284 @properties['url'] 285 end