Class: Twilio::REST::Messaging::V1::TollfreeVerificationInstance

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

Overview

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, sid: nil) ⇒ TollfreeVerificationInstance

Initialize the TollfreeVerificationInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • sid (String) (defaults to: nil)

    The unique string to identify Tollfree Verification.



370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 370

def initialize(version, payload, sid: nil)
  super(version)

  # Marshaled Properties
  @properties = {
      'sid' => payload['sid'],
      'account_sid' => payload['account_sid'],
      'customer_profile_sid' => payload['customer_profile_sid'],
      'trust_product_sid' => payload['trust_product_sid'],
      'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
      'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
      'regulated_item_sid' => payload['regulated_item_sid'],
      'business_name' => payload['business_name'],
      'business_street_address' => payload['business_street_address'],
      'business_street_address2' => payload['business_street_address2'],
      'business_city' => payload['business_city'],
      'business_state_province_region' => payload['business_state_province_region'],
      'business_postal_code' => payload['business_postal_code'],
      'business_country' => payload['business_country'],
      'business_website' => payload['business_website'],
      'business_contact_first_name' => payload['business_contact_first_name'],
      'business_contact_last_name' => payload['business_contact_last_name'],
      'business_contact_email' => payload['business_contact_email'],
      'business_contact_phone' => payload['business_contact_phone'],
      'notification_email' => payload['notification_email'],
      'use_case_categories' => payload['use_case_categories'],
      'use_case_summary' => payload['use_case_summary'],
      'production_message_sample' => payload['production_message_sample'],
      'opt_in_image_urls' => payload['opt_in_image_urls'],
      'opt_in_type' => payload['opt_in_type'],
      'message_volume' => payload['message_volume'],
      'additional_information' => payload['additional_information'],
      'tollfree_phone_number_sid' => payload['tollfree_phone_number_sid'],
      'status' => payload['status'],
      'url' => payload['url'],
      'resource_links' => payload['resource_links'],
      'external_reference_id' => payload['external_reference_id'],
  }

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

Instance Method Details

#account_sidString

Returns The SID of the Account that created the resource.

Returns:

  • (String)

    The SID of the Account that created the resource



433
434
435
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 433

def 
  @properties['account_sid']
end

#additional_informationString

Returns Additional information to be provided for verification.

Returns:

  • (String)

    Additional information to be provided for verification



583
584
585
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 583

def additional_information
  @properties['additional_information']
end

#business_cityString

Returns The city of the business or organization using the Tollfree number.

Returns:

  • (String)

    The city of the business or organization using the Tollfree number



487
488
489
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 487

def business_city
  @properties['business_city']
end

#business_contact_emailString

Returns The email address of the contact for the business or organization using the Tollfree number.

Returns:

  • (String)

    The email address of the contact for the business or organization using the Tollfree number



529
530
531
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 529

def business_contact_email
  @properties['business_contact_email']
end

#business_contact_first_nameString

Returns The first name of the contact for the business or organization using the Tollfree number.

Returns:

  • (String)

    The first name of the contact for the business or organization using the Tollfree number



517
518
519
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 517

def business_contact_first_name
  @properties['business_contact_first_name']
end

#business_contact_last_nameString

Returns The last name of the contact for the business or organization using the Tollfree number.

Returns:

  • (String)

    The last name of the contact for the business or organization using the Tollfree number



523
524
525
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 523

def business_contact_last_name
  @properties['business_contact_last_name']
end

#business_contact_phoneString

Returns The phone number of the contact for the business or organization using the Tollfree number.

Returns:

  • (String)

    The phone number of the contact for the business or organization using the Tollfree number



535
536
537
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 535

def business_contact_phone
  @properties['business_contact_phone']
end

#business_countryString

Returns The country of the business or organization using the Tollfree number.

Returns:

  • (String)

    The country of the business or organization using the Tollfree number



505
506
507
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 505

def business_country
  @properties['business_country']
end

#business_nameString

Returns The name of the business or organization using the Tollfree number.

Returns:

  • (String)

    The name of the business or organization using the Tollfree number



469
470
471
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 469

def business_name
  @properties['business_name']
end

#business_postal_codeString

Returns The postal code of the business or organization using the Tollfree number.

Returns:

  • (String)

    The postal code of the business or organization using the Tollfree number



499
500
501
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 499

def business_postal_code
  @properties['business_postal_code']
end

#business_state_province_regionString

Returns The state/province/region of the business or organization using the Tollfree number.

Returns:

  • (String)

    The state/province/region of the business or organization using the Tollfree number



493
494
495
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 493

def business_state_province_region
  @properties['business_state_province_region']
end

#business_street_addressString

Returns The address of the business or organization using the Tollfree number.

Returns:

  • (String)

    The address of the business or organization using the Tollfree number



475
476
477
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 475

def business_street_address
  @properties['business_street_address']
end

#business_street_address2String

Returns The address of the business or organization using the Tollfree number.

Returns:

  • (String)

    The address of the business or organization using the Tollfree number



481
482
483
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 481

def business_street_address2
  @properties['business_street_address2']
end

#business_websiteString

Returns The website of the business or organization using the Tollfree number.

Returns:

  • (String)

    The website of the business or organization using the Tollfree number



511
512
513
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 511

def business_website
  @properties['business_website']
end

#contextTollfreeVerificationContext

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

Returns:



418
419
420
421
422
423
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 418

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

#customer_profile_sidString

Returns Customer’s Profile Bundle BundleSid.

Returns:

  • (String)

    Customer’s Profile Bundle BundleSid



439
440
441
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 439

def customer_profile_sid
  @properties['customer_profile_sid']
end

#date_createdTime

Returns The ISO 8601 date and time in GMT when the resource was created.

Returns:

  • (Time)

    The ISO 8601 date and time in GMT when the resource was created



451
452
453
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 451

def date_created
  @properties['date_created']
end

#date_updatedTime

Returns The ISO 8601 date and time in GMT when the resource was last updated.

Returns:

  • (Time)

    The ISO 8601 date and time in GMT when the resource was last updated



457
458
459
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 457

def date_updated
  @properties['date_updated']
end

#external_reference_idString

Returns An optional external reference ID supplied by customer and echoed back on status retrieval.

Returns:

  • (String)

    An optional external reference ID supplied by customer and echoed back on status retrieval



613
614
615
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 613

def external_reference_id
  @properties['external_reference_id']
end

#fetchTollfreeVerificationInstance

Fetch the TollfreeVerificationInstance

Returns:



620
621
622
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 620

def fetch
  context.fetch
end

#inspectObject

Provide a detailed, user friendly representation



701
702
703
704
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 701

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

#message_volumeString

Returns Estimate monthly volume of messages from the Tollfree Number.

Returns:

  • (String)

    Estimate monthly volume of messages from the Tollfree Number



577
578
579
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 577

def message_volume
  @properties['message_volume']
end

#notification_emailString

Returns The email address to receive the notification about the verification result.

Returns:

  • (String)

    The email address to receive the notification about the verification result.



541
542
543
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 541

def notification_email
  @properties['notification_email']
end

#opt_in_image_urlsArray[String]

Returns Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL.

Returns:

  • (Array[String])

    Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL



565
566
567
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 565

def opt_in_image_urls
  @properties['opt_in_image_urls']
end

#opt_in_typetollfree_verification.OptInType

Returns Describe how a user opts-in to text messages.

Returns:

  • (tollfree_verification.OptInType)

    Describe how a user opts-in to text messages



571
572
573
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 571

def opt_in_type
  @properties['opt_in_type']
end

#production_message_sampleString

Returns An example of message content, i.e. a sample message.

Returns:

  • (String)

    An example of message content, i.e. a sample message



559
560
561
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 559

def production_message_sample
  @properties['production_message_sample']
end

#regulated_item_sidString

Returns The SID of the Regulated Item.

Returns:

  • (String)

    The SID of the Regulated Item



463
464
465
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 463

def regulated_item_sid
  @properties['regulated_item_sid']
end

Returns The URLs of the documents associated with the Tollfree Verification resource.

Returns:

  • (Hash)

    The URLs of the documents associated with the Tollfree Verification resource



607
608
609
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 607

def resource_links
  @properties['resource_links']
end

#sidString

Returns Tollfree Verification Sid.

Returns:

  • (String)

    Tollfree Verification Sid



427
428
429
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 427

def sid
  @properties['sid']
end

#statustollfree_verification.Status

Returns The compliance status of the Tollfree Verification record.

Returns:

  • (tollfree_verification.Status)

    The compliance status of the Tollfree Verification record.



595
596
597
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 595

def status
  @properties['status']
end

#to_sObject

Provide a user friendly representation



694
695
696
697
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 694

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

#tollfree_phone_number_sidString

Returns The SID of the Phone Number associated with the Tollfree Verification.

Returns:

  • (String)

    The SID of the Phone Number associated with the Tollfree Verification



589
590
591
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 589

def tollfree_phone_number_sid
  @properties['tollfree_phone_number_sid']
end

#trust_product_sidString

Returns Tollfree TrustProduct Bundle BundleSid.

Returns:

  • (String)

    Tollfree TrustProduct Bundle BundleSid



445
446
447
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 445

def trust_product_sid
  @properties['trust_product_sid']
end

#update(business_name: :unset, business_website: :unset, notification_email: :unset, use_case_categories: :unset, use_case_summary: :unset, production_message_sample: :unset, opt_in_image_urls: :unset, opt_in_type: :unset, message_volume: :unset, business_street_address: :unset, business_street_address2: :unset, business_city: :unset, business_state_province_region: :unset, business_postal_code: :unset, business_country: :unset, additional_information: :unset, business_contact_first_name: :unset, business_contact_last_name: :unset, business_contact_email: :unset, business_contact_phone: :unset) ⇒ TollfreeVerificationInstance

Update the TollfreeVerificationInstance

Parameters:

  • business_name (String) (defaults to: :unset)

    The name of the business or organization using the Tollfree number.

  • business_website (String) (defaults to: :unset)

    The website of the business or organization using the Tollfree number.

  • notification_email (String) (defaults to: :unset)

    The email address to receive the notification about the verification result. .

  • use_case_categories (Array[String]) (defaults to: :unset)

    The category of the use case for the Tollfree Number. List as many are applicable..

  • use_case_summary (String) (defaults to: :unset)

    Use this to further explain how messaging is used by the business or organization.

  • production_message_sample (String) (defaults to: :unset)

    An example of message content, i.e. a sample message.

  • opt_in_image_urls (Array[String]) (defaults to: :unset)

    Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL.

  • opt_in_type (tollfree_verification.OptInType) (defaults to: :unset)

    Describe how a user opts-in to text messages.

  • message_volume (String) (defaults to: :unset)

    Estimate monthly volume of messages from the Tollfree Number.

  • business_street_address (String) (defaults to: :unset)

    The address of the business or organization using the Tollfree number.

  • business_street_address2 (String) (defaults to: :unset)

    The address of the business or organization using the Tollfree number.

  • business_city (String) (defaults to: :unset)

    The city of the business or organization using the Tollfree number.

  • business_state_province_region (String) (defaults to: :unset)

    The state/province/region of the business or organization using the Tollfree number.

  • business_postal_code (String) (defaults to: :unset)

    The postal code of the business or organization using the Tollfree number.

  • business_country (String) (defaults to: :unset)

    The country of the business or organization using the Tollfree number.

  • additional_information (String) (defaults to: :unset)

    Additional information to be provided for verification.

  • business_contact_first_name (String) (defaults to: :unset)

    The first name of the contact for the business or organization using the Tollfree number.

  • business_contact_last_name (String) (defaults to: :unset)

    The last name of the contact for the business or organization using the Tollfree number.

  • business_contact_email (String) (defaults to: :unset)

    The email address of the contact for the business or organization using the Tollfree number.

  • business_contact_phone (String) (defaults to: :unset)

    The phone number of the contact for the business or organization using the Tollfree number.

Returns:



667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 667

def update(business_name: :unset, business_website: :unset, notification_email: :unset, use_case_categories: :unset, use_case_summary: :unset, production_message_sample: :unset, opt_in_image_urls: :unset, opt_in_type: :unset, message_volume: :unset, business_street_address: :unset, business_street_address2: :unset, business_city: :unset, business_state_province_region: :unset, business_postal_code: :unset, business_country: :unset, additional_information: :unset, business_contact_first_name: :unset, business_contact_last_name: :unset, business_contact_email: :unset, business_contact_phone: :unset)
  context.update(
      business_name: business_name,
      business_website: business_website,
      notification_email: notification_email,
      use_case_categories: use_case_categories,
      use_case_summary: use_case_summary,
      production_message_sample: production_message_sample,
      opt_in_image_urls: opt_in_image_urls,
      opt_in_type: opt_in_type,
      message_volume: message_volume,
      business_street_address: business_street_address,
      business_street_address2: business_street_address2,
      business_city: business_city,
      business_state_province_region: business_state_province_region,
      business_postal_code: business_postal_code,
      business_country: business_country,
      additional_information: additional_information,
      business_contact_first_name: business_contact_first_name,
      business_contact_last_name: business_contact_last_name,
      business_contact_email: business_contact_email,
      business_contact_phone: business_contact_phone,
  )
end

#urlString

Returns The absolute URL of the Tollfree Verification.

Returns:

  • (String)

    The absolute URL of the Tollfree Verification



601
602
603
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 601

def url
  @properties['url']
end

#use_case_categoriesArray[String]

Returns The category of the use case for the Tollfree Number. List as many are applicable.

Returns:

  • (Array[String])

    The category of the use case for the Tollfree Number. List as many are applicable.



547
548
549
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 547

def use_case_categories
  @properties['use_case_categories']
end

#use_case_summaryString

Returns Further explaination on how messaging is used by the business or organization.

Returns:

  • (String)

    Further explaination on how messaging is used by the business or organization



553
554
555
# File 'lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb', line 553

def use_case_summary
  @properties['use_case_summary']
end