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.



251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb', line 251

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_sid ⇒ String

Returns The unique SID identifier of the Account.

Returns:

  • (String) —

    The unique SID identifier of the Account.



294
295
296
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb', line 294

def 
    @properties['account_sid']
end

#context ⇒ TrustProductsProvisionalCopyContext

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

Returns:



279
280
281
282
283
284
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb', line 279

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

#create ⇒ TrustProductsProvisionalCopyInstance

Create the TrustProductsProvisionalCopyInstance

Returns:



355
356
357
358
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb', line 355

def create

    context.create
end

#date_created ⇒ Time

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.



336
337
338
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb', line 336

def date_created
    @properties['date_created']
end

#date_updated ⇒ Time

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.



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

def date_updated
    @properties['date_updated']
end

#email ⇒ String

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.



318
319
320
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb', line 318

def email
    @properties['email']
end

#fetch ⇒ TrustProductsProvisionalCopyInstance

Fetch the TrustProductsProvisionalCopyInstance

Returns:



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

def fetch

    context.fetch
end

#friendly_name ⇒ String

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.



306
307
308
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb', line 306

def friendly_name
    @properties['friendly_name']
end

#inspect ⇒ Object

Provide a detailed, user friendly representation



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

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

#policy_sid ⇒ String

Returns The unique SID identifier of the Policy.

Returns:

  • (String) —

    The unique SID identifier of the Policy.



300
301
302
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb', line 300

def policy_sid
    @properties['policy_sid']
end

#status ⇒ String

Returns The verification status of the Customer-Profile resource.

Returns:

  • (String) —

    The verification status of the Customer-Profile resource.



312
313
314
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb', line 312

def status
    @properties['status']
end

#status_callback ⇒ String

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.



324
325
326
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb', line 324

def status_callback
    @properties['status_callback']
end

#to_s ⇒ Object

Provide a user friendly representation



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

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

#trust_product_sid ⇒ String

Returns The unique SID identifier of the Trust Product.

Returns:

  • (String) —

    The unique SID identifier of the Trust Product.



288
289
290
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb', line 288

def trust_product_sid
    @properties['trust_product_sid']
end

#url ⇒ String

Returns The URL of this resource.

Returns:

  • (String) —

    The URL of this resource.



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

def url
    @properties['url']
end

#valid_until ⇒ Time

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.



330
331
332
# File 'lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb', line 330

def valid_until
    @properties['valid_until']
end