21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/ringcentral.rb', line 21
def self.send(username, password, extension, recipient, attachment, cover_page = 'None', cover_page_text = nil, resolution = nil, send_time = nil)
params = {
:attachment => attachment,
:recipient => recipient,
:coverpage => cover_page,
:coverpagetext => cover_page_text,
:resolution => resolution,
:sendtime => send_time
}
username_with_extension = [username, extension].compact.join('*')
response = RestClient.post(URL, params.merge(RingCentral.credentials_hash(username_with_extension, password)))
status_code = String.new(response.body).to_i
return STATUS_CODES[status_code]
end
|