Class: RingCentralSdk::REST::Request::Fax

Inherits:
Multipart show all
Defined in:
lib/ringcentral_sdk/rest/request/fax.rb

Constant Summary

Constants inherited from Multipart

Multipart::CONTENT_ID_HEADER, Multipart::DEFAULT_BASE64_ENCODE, Multipart::DEFAULT_CONTENT_ID_DISABLE, Multipart::DEFAULT_ID, Multipart::DEFAULT_METHOD

Instance Attribute Summary

Attributes inherited from Multipart

#account_id, #extension_id, #method, #mime, #mime_part_params

Instance Method Summary collapse

Methods inherited from Multipart

#add_file, #add_files, #add_json, #add_part, #add_text, #body, #content_type, #initialize, #path_params, #set_url

Methods inherited from Base

#body, #content_type, #headers, #method, #params

Constructor Details

This class inherits a constructor from RingCentralSdk::REST::Request::Multipart

Instance Method Details

#add_metadata(data, opts = {}) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/ringcentral_sdk/rest/request/fax.rb', line 5

def (data, opts = {})
  if data.is_a? Hash
    inf = RingCentralSdk::REST::Request::Inflator::ContactInfo.new
    if data.key? :to
      data[:to] = inf.inflate_to_array data[:to]
    end
  end

  super data, opts
end

#urlObject



16
17
18
# File 'lib/ringcentral_sdk/rest/request/fax.rb', line 16

def url
  "account/#{@account_id}/extension/#{@extension_id}/fax"
end