class Twilio::REST::Numbers::V2::RegulatoryComplianceList::BundleContext::ItemAssignmentInstance

Public Class Methods

new(version, payload, bundle_sid: nil, sid: nil) click to toggle source

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

Calls superclass method 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

account_sid() click to toggle source

@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
bundle_sid() click to toggle source

@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
context() click to toggle source

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
date_created() click to toggle source

@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() click to toggle source

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() click to toggle source

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
inspect() click to toggle source

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
object_sid() click to toggle source

@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
sid() click to toggle source

@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
to_s() click to toggle source

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
url() click to toggle source

@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