Class: Twilio::REST::Api::V2010::AccountContext::ValidationRequestList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Api::V2010::AccountContext::ValidationRequestList
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/validation_request.rb
Instance Method Summary collapse
-
#create(phone_number: nil, friendly_name: :unset, call_delay: :unset, extension: :unset, status_callback: :unset, status_callback_method: :unset) ⇒ ValidationRequestInstance
Create the ValidationRequestInstance.
-
#initialize(version, account_sid: nil) ⇒ ValidationRequestList
constructor
Initialize the ValidationRequestList.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, account_sid: nil) ⇒ ValidationRequestList
Initialize the ValidationRequestList
28 29 30 31 32 33 34 |
# File 'lib/twilio-ruby/rest/api/v2010/account/validation_request.rb', line 28 def initialize(version, account_sid: nil) super(version) # Path Solution @solution = { account_sid: account_sid } @uri = "/Accounts/#{@solution[:account_sid]}/OutgoingCallerIds.json" end |
Instance Method Details
#create(phone_number: nil, friendly_name: :unset, call_delay: :unset, extension: :unset, status_callback: :unset, status_callback_method: :unset) ⇒ ValidationRequestInstance
Create the ValidationRequestInstance
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/twilio-ruby/rest/api/v2010/account/validation_request.rb', line 44 def create( phone_number: nil, friendly_name: :unset, call_delay: :unset, extension: :unset, status_callback: :unset, status_callback_method: :unset ) data = Twilio::Values.of({ 'PhoneNumber' => phone_number, 'FriendlyName' => friendly_name, 'CallDelay' => call_delay, 'Extension' => extension, 'StatusCallback' => status_callback, 'StatusCallbackMethod' => status_callback_method, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.create('POST', @uri, data: data, headers: headers) ValidationRequestInstance.new( @version, payload, account_sid: @solution[:account_sid], ) end |
#to_s ⇒ Object
Provide a user friendly representation
80 81 82 |
# File 'lib/twilio-ruby/rest/api/v2010/account/validation_request.rb', line 80 def to_s '#<Twilio.Api.V2010.ValidationRequestList>' end |