Completed
Push — master ( cadf70...47b0dd )
by John
442:50 queued 418:53
created

send_fax()   B

Complexity

Conditions 2

Size

Total Lines 26

Duplication

Lines 0
Ratio 0 %
Metric Value
cc 2
dl 0
loc 26
rs 8.8571
1
#!ruby
2
3
require 'ringcentral_sdk'
4
require 'pp'
5
6
config = RingCentralSdk::REST::Config.new
7
config.load_dotenv
8
9
client = RingCentralSdk::REST::Client.new(
10
  config.app.key,
11
  config.app.secret,
12
  config.app.server_url,
13
  {
14
    :username => config.user.username,
15
    :extension => config.user.extension,
16
    :password => config.user.password
17
  }
18
)
19
20
res = client.messages.fax.create(
21
  :to => config.env.data['RC_DEMO_FAX_TO'],
22
  :coverPageText => config.env.data['RC_DEMO_FAX_COVERPAGE_TEXT'],
23
  :files => [config.env.data['RC_DEMO_FAX_FILEPATH']]
24
)
25
26
pp res.body
27
28
puts "DONE"