Class: Twilio::REST::Trusthub::V1::TrustProductsContext::TrustProductsEntityAssignmentsInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, trust_product_sid: nil, sid: nil) ⇒ TrustProductsEntityAssignmentsInstance

Initialize the TrustProductsEntityAssignmentsInstance



266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb', line 266

def initialize(version, payload , trust_product_sid: nil, sid: nil)
    super(version)
    
    # Marshaled Properties
    @properties = { 
        'sid' => payload['sid'],
        'trust_product_sid' => payload['trust_product_sid'],
        'account_sid' => payload['account_sid'],
        'object_sid' => payload['object_sid'],
        'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
        'url' => payload['url'],
    }

    # Context
    @instance_context = nil
    @params = { 'trust_product_sid' => trust_product_sid  || @properties['trust_product_sid']  ,'sid' => sid  || @properties['sid']  , }
end

Instance Method Details

#account_sidString



309
310
311
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb', line 309

def 
    @properties['account_sid']
end

#contextTrustProductsEntityAssignmentsContext

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context



288
289
290
291
292
293
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb', line 288

def context
    unless @instance_context
        @instance_context = TrustProductsEntityAssignmentsContext.new(@version , @params['trust_product_sid'], @params['sid'])
    end
    @instance_context
end

#date_createdTime



321
322
323
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb', line 321

def date_created
    @properties['date_created']
end

#deleteBoolean

Delete the TrustProductsEntityAssignmentsInstance



334
335
336
337
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb', line 334

def delete

    context.delete
end

#fetchTrustProductsEntityAssignmentsInstance

Fetch the TrustProductsEntityAssignmentsInstance



342
343
344
345
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb', line 342

def fetch

    context.fetch
end

#inspectObject

Provide a detailed, user friendly representation



356
357
358
359
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb', line 356

def inspect
    values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Trusthub.V1.TrustProductsEntityAssignmentsInstance #{values}>"
end

#object_sidString



315
316
317
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb', line 315

def object_sid
    @properties['object_sid']
end

#sidString



297
298
299
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb', line 297

def sid
    @properties['sid']
end

#to_sObject

Provide a user friendly representation



349
350
351
352
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb', line 349

def to_s
    values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.Trusthub.V1.TrustProductsEntityAssignmentsInstance #{values}>"
end

#trust_product_sidString



303
304
305
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb', line 303

def trust_product_sid
    @properties['trust_product_sid']
end

#urlString



327
328
329
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb', line 327

def url
    @properties['url']
end