Method: Vonage::Meetings::Themes#set_logo
- Defined in:
- lib/vonage/meetings/themes.rb
#set_logo(theme_id:, filepath:, logo_type:) ⇒ Response
Deprecated.
Set a logo for a theme.
TODO: add type signature
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/vonage/meetings/themes.rb', line 168 def set_logo(theme_id:, filepath:, logo_type:) logger.info('This method is deprecated and will be removed in a future release.') pn = Pathname.new(filepath) valid_logo_types = ['white', 'colored', 'favicon'] raise ArgumentError, ':filepath not for a file' unless pn.file? raise ArgumentError, 'file at :filepath not readable' unless pn.readable? raise ArgumentError, "logo_type: must be one of #{valid_logo_types}" unless valid_logo_types.include?(logo_type) logo_upload_credentials = get_logo_upload_credentials filtered_logo_upload_credentials = logo_upload_credentials.select {|cred| cred.fields.logo_type == logo_type }.first upload_logo_file(filepath: filepath, credentials: filtered_logo_upload_credentials) finalize_logos(theme_id: theme_id, keys: [filtered_logo_upload_credentials.fields.key]) end |