Class: Twilio::REST::Video::V1::CompositionSettingsContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Video::V1::CompositionSettingsContext
- Defined in:
- lib/twilio-ruby/rest/video/v1/composition_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) ⇒ CompositionSettingsInstance
Create the CompositionSettingsInstance.
-
#fetch ⇒ CompositionSettingsInstance
Fetch the CompositionSettingsInstance.
-
#initialize(version) ⇒ CompositionSettingsContext
constructor
Initialize the CompositionSettingsContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version) ⇒ CompositionSettingsContext
Initialize the CompositionSettingsContext
48 49 50 51 52 53 54 55 56 |
# File 'lib/twilio-ruby/rest/video/v1/composition_settings.rb', line 48 def initialize(version) super(version) # Path Solution @solution = { } @uri = "/CompositionSettings/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) ⇒ CompositionSettingsInstance
Create the CompositionSettingsInstance
66 67 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 |
# File 'lib/twilio-ruby/rest/video/v1/composition_settings.rb', line 66 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) CompositionSettingsInstance.new( @version, payload, ) end |
#fetch ⇒ CompositionSettingsInstance
Fetch the CompositionSettingsInstance
100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/twilio-ruby/rest/video/v1/composition_settings.rb', line 100 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) CompositionSettingsInstance.new( @version, payload, ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
125 126 127 128 |
# File 'lib/twilio-ruby/rest/video/v1/composition_settings.rb', line 125 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Video.V1.CompositionSettingsContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
118 119 120 121 |
# File 'lib/twilio-ruby/rest/video/v1/composition_settings.rb', line 118 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Video.V1.CompositionSettingsContext #{context}>" end |