Class: Twilio::REST::Video::V1::RecordingSettingsContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Video::V1::RecordingSettingsContext
- Defined in:
- lib/twilio-ruby/rest/video/v1/recording_settings.rb
Instance Method Summary collapse
-
#create(friendly_name: nil, aws_credentials_sid: :unset, encryption_key_sid: :unset, aws_s3_url: :unset, aws_storage_enabled: :unset, encryption_enabled: :unset) ⇒ RecordingSettingsInstance
Create the RecordingSettingsInstance.
-
#create_with_metadata(friendly_name: nil, aws_credentials_sid: :unset, encryption_key_sid: :unset, aws_s3_url: :unset, aws_storage_enabled: :unset, encryption_enabled: :unset) ⇒ RecordingSettingsInstance
Create the RecordingSettingsInstanceMetadata.
-
#fetch ⇒ RecordingSettingsInstance
Fetch the RecordingSettingsInstance.
-
#fetch_with_metadata ⇒ RecordingSettingsInstance
Fetch the RecordingSettingsInstanceMetadata.
-
#initialize(version) ⇒ RecordingSettingsContext
constructor
Initialize the RecordingSettingsContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version) ⇒ RecordingSettingsContext
Initialize the RecordingSettingsContext
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 49 def initialize(version) super(version) # Path Solution @solution = { } @uri = "/RecordingSettings/Default" end |
Instance Method Details
#create(friendly_name: nil, aws_credentials_sid: :unset, encryption_key_sid: :unset, aws_s3_url: :unset, aws_storage_enabled: :unset, encryption_enabled: :unset) ⇒ RecordingSettingsInstance
Create the RecordingSettingsInstance
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 68 def create( friendly_name: nil, aws_credentials_sid: :unset, encryption_key_sid: :unset, aws_s3_url: :unset, aws_storage_enabled: :unset, encryption_enabled: :unset ) data = Twilio::Values.of({ 'FriendlyName' => friendly_name, 'AwsCredentialsSid' => aws_credentials_sid, 'EncryptionKeySid' => encryption_key_sid, 'AwsS3Url' => aws_s3_url, 'AwsStorageEnabled' => aws_storage_enabled, 'EncryptionEnabled' => encryption_enabled, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.create('POST', @uri, data: data, headers: headers) RecordingSettingsInstance.new( @version, payload, ) end |
#create_with_metadata(friendly_name: nil, aws_credentials_sid: :unset, encryption_key_sid: :unset, aws_s3_url: :unset, aws_storage_enabled: :unset, encryption_enabled: :unset) ⇒ RecordingSettingsInstance
Create the RecordingSettingsInstanceMetadata
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 108 def ( friendly_name: nil, aws_credentials_sid: :unset, encryption_key_sid: :unset, aws_s3_url: :unset, aws_storage_enabled: :unset, encryption_enabled: :unset ) data = Twilio::Values.of({ 'FriendlyName' => friendly_name, 'AwsCredentialsSid' => aws_credentials_sid, 'EncryptionKeySid' => encryption_key_sid, 'AwsS3Url' => aws_s3_url, 'AwsStorageEnabled' => aws_storage_enabled, 'EncryptionEnabled' => encryption_enabled, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('POST', @uri, data: data, headers: headers) recording_settings_instance = RecordingSettingsInstance.new( @version, response.body, ) RecordingSettingsInstanceMetadata.new( @version, recording_settings_instance, response.headers, response.status_code ) end |
#fetch ⇒ RecordingSettingsInstance
Fetch the RecordingSettingsInstance
148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 148 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) RecordingSettingsInstance.new( @version, payload, ) end |
#fetch_with_metadata ⇒ RecordingSettingsInstance
Fetch the RecordingSettingsInstanceMetadata
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 166 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('GET', @uri, headers: headers) recording_settings_instance = RecordingSettingsInstance.new( @version, response.body, ) RecordingSettingsInstanceMetadata.new( @version, recording_settings_instance, response.headers, response.status_code ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
197 198 199 200 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 197 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Video.V1.RecordingSettingsContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
190 191 192 193 |
# File 'lib/twilio-ruby/rest/video/v1/recording_settings.rb', line 190 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Video.V1.RecordingSettingsContext #{context}>" end |