Class: Twilio::REST::Preview::TrustedComms::BrandedCallList

Inherits:
ListResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb

Overview

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected].

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ BrandedCallList

Initialize the BrandedCallList

Parameters:

  • version (Version)

    Version that contains the resource



20
21
22
23
24
25
26
# File 'lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb', line 20

def initialize(version)
  super(version)

  # Path Solution
  @solution = {}
  @uri = "/Business/BrandedCalls"
end

Instance Method Details

#create(from: nil, to: nil, reason: nil, call_sid: :unset) ⇒ BrandedCallInstance

Create the BrandedCallInstance

Parameters:

  • from (String) (defaults to: nil)

    The phone number to use as the caller id, given in [E.164 format](www.twilio.com/docs/glossary/what-e164). It must be a Twilio number that has been set up as a Branded Number in the Business Profile section for your account.

  • to (String) (defaults to: nil)

    The terminating Phone Number, given in [E.164 format](www.twilio.com/docs/glossary/what-e164).

  • reason (String) (defaults to: nil)

    The business reason for this phone call that will appear in the terminating device’s screen. Max 50 characters.

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

    The Call sid this Branded Call should link to.

Returns:



40
41
42
43
44
45
46
# File 'lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb', line 40

def create(from: nil, to: nil, reason: nil, call_sid: :unset)
  data = Twilio::Values.of({'From' => from, 'To' => to, 'Reason' => reason, 'CallSid' => call_sid, })

  payload = @version.create('POST', @uri, data: data)

  BrandedCallInstance.new(@version, payload, )
end

#to_sObject

Provide a user friendly representation



50
51
52
# File 'lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb', line 50

def to_s
  '#<Twilio.Preview.TrustedComms.BrandedCallList>'
end