class Twilio::REST::Trusthub::V1::TrustProductsContext::TrustProductsEntityAssignmentsInstance

Public Class Methods

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

Initialize the TrustProductsEntityAssignmentsInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] trust_product_sid The unique string that we created to identify

the TrustProduct resource.

@param [String] sid The unique string that we created to identify the Identity

resource.

@return [TrustProductsEntityAssignmentsInstance] TrustProductsEntityAssignmentsInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb
229 def initialize(version, payload, trust_product_sid: nil, sid: nil)
230   super(version)
231 
232   # Marshaled Properties
233   @properties = {
234       'sid' => payload['sid'],
235       'trust_product_sid' => payload['trust_product_sid'],
236       'account_sid' => payload['account_sid'],
237       'object_sid' => payload['object_sid'],
238       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
239       'url' => payload['url'],
240   }
241 
242   # Context
243   @instance_context = nil
244   @params = {'trust_product_sid' => trust_product_sid, 'sid' => sid || @properties['sid'], }
245 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/trusthub/v1/trust_products/trust_products_entity_assignments.rb
276 def account_sid
277   @properties['account_sid']
278 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 [TrustProductsEntityAssignmentsContext] TrustProductsEntityAssignmentsContext for this TrustProductsEntityAssignmentsInstance

    # File lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb
251 def context
252   unless @instance_context
253     @instance_context = TrustProductsEntityAssignmentsContext.new(
254         @version,
255         @params['trust_product_sid'],
256         @params['sid'],
257     )
258   end
259   @instance_context
260 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/trusthub/v1/trust_products/trust_products_entity_assignments.rb
288 def date_created
289   @properties['date_created']
290 end
delete() click to toggle source

Delete the TrustProductsEntityAssignmentsInstance @return [Boolean] true if delete succeeds, false otherwise

    # File lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb
308 def delete
309   context.delete
310 end
fetch() click to toggle source

Fetch the TrustProductsEntityAssignmentsInstance @return [TrustProductsEntityAssignmentsInstance] Fetched TrustProductsEntityAssignmentsInstance

    # File lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb
301 def fetch
302   context.fetch
303 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb
321 def inspect
322   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
323   "<Twilio.Trusthub.V1.TrustProductsEntityAssignmentsInstance #{values}>"
324 end
object_sid() click to toggle source

@return [String] The sid of an object bag

    # File lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb
282 def object_sid
283   @properties['object_sid']
284 end
sid() click to toggle source

@return [String] The unique string that identifies the resource

    # File lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb
264 def sid
265   @properties['sid']
266 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb
314 def to_s
315   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
316   "<Twilio.Trusthub.V1.TrustProductsEntityAssignmentsInstance #{values}>"
317 end
trust_product_sid() click to toggle source

@return [String] The unique string that identifies the TrustProduct resource.

    # File lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb
270 def trust_product_sid
271   @properties['trust_product_sid']
272 end
url() click to toggle source

@return [String] The absolute URL of the Identity resource

    # File lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb
294 def url
295   @properties['url']
296 end