Class: Twilio::REST::Trusthub::V1::TrustProductsProvisionalCopyInstance

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, trust_product_sid: nil) ⇒ TrustProductsProvisionalCopyInstance

Initialize the TrustProductsProvisionalCopyInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String)

    The SID of the Account that created this TrustProductsProvisionalCopy resource.

  • sid (String)

    The SID of the Call resource to fetch.



310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb', line 310

def initialize(version, payload , trust_product_sid: nil)
    super(version)
    
    
    # Marshaled Properties
    @properties = { 
        'trust_product_sid' => payload['trust_product_sid'],
        'account_sid' => payload['account_sid'],
        'policy_sid' => payload['policy_sid'],
        'friendly_name' => payload['friendly_name'],
        'status' => payload['status'],
        'email' => payload['email'],
        'status_callback' => payload['status_callback'],
        'valid_until' => Twilio.deserialize_iso8601_datetime(payload['valid_until']),
        'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
        'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
        'url' => payload['url'],
    }

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

Instance Method Details

#account_sidString

Returns The unique SID identifier of the Account.

Returns:

  • (String)

    The unique SID identifier of the Account.



353
354
355
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb', line 353

def 
    @properties['account_sid']
end

#contextTrustProductsProvisionalCopyContext

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

Returns:



338
339
340
341
342
343
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb', line 338

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

#createTrustProductsProvisionalCopyInstance

Create the TrustProductsProvisionalCopyInstance

Returns:



414
415
416
417
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb', line 414

def create

    context.create
end

#date_createdTime

Returns The date that this Trust Products Provisional Copy was created, given in ISO 8601 format.

Returns:

  • (Time)

    The date that this Trust Products Provisional Copy was created, given in ISO 8601 format.



395
396
397
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb', line 395

def date_created
    @properties['date_created']
end

#date_updatedTime

Returns The date that this Trust Products Provisional Copy was updated, given in ISO 8601 format.

Returns:

  • (Time)

    The date that this Trust Products Provisional Copy was updated, given in ISO 8601 format.



401
402
403
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb', line 401

def date_updated
    @properties['date_updated']
end

#emailString

Returns The email address that will receive updates when the trust product resource changes status.

Returns:

  • (String)

    The email address that will receive updates when the trust product resource changes status.



377
378
379
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb', line 377

def email
    @properties['email']
end

#fetchTrustProductsProvisionalCopyInstance

Fetch the TrustProductsProvisionalCopyInstance

Returns:



422
423
424
425
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb', line 422

def fetch

    context.fetch
end

#friendly_nameString

Returns A human readable description of this resource, up to 64 characters.

Returns:

  • (String)

    A human readable description of this resource, up to 64 characters.



365
366
367
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb', line 365

def friendly_name
    @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation



436
437
438
439
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb', line 436

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

#policy_sidString

Returns The unique SID identifier of the Policy.

Returns:

  • (String)

    The unique SID identifier of the Policy.



359
360
361
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb', line 359

def policy_sid
    @properties['policy_sid']
end

#statusString

Returns The verification status of the Customer-Profile resource.

Returns:

  • (String)

    The verification status of the Customer-Profile resource.



371
372
373
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb', line 371

def status
    @properties['status']
end

#status_callbackString

Returns The URL we call to inform your application of status changes.

Returns:

  • (String)

    The URL we call to inform your application of status changes.



383
384
385
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb', line 383

def status_callback
    @properties['status_callback']
end

#to_sObject

Provide a user friendly representation



429
430
431
432
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb', line 429

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

#trust_product_sidString

Returns The unique SID identifier of the Trust Product.

Returns:

  • (String)

    The unique SID identifier of the Trust Product.



347
348
349
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb', line 347

def trust_product_sid
    @properties['trust_product_sid']
end

#urlString

Returns The URL of this resource.

Returns:

  • (String)

    The URL of this resource.



407
408
409
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb', line 407

def url
    @properties['url']
end

#valid_untilTime

Returns The date and time in GMT in ISO 8601 format when the resource will be valid until.

Returns:

  • (Time)

    The date and time in GMT in ISO 8601 format when the resource will be valid until.



389
390
391
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb', line 389

def valid_until
    @properties['valid_until']
end