Class: Pwnix::Api::Client::Sms
- Inherits:
-
Object
- Object
- Pwnix::Api::Client::Sms
show all
- Includes:
- HTTParty, HTTPartyTime
- Defined in:
- lib/pwnix-api-client/system/sms.rb
Instance Method Summary
collapse
#clear_errors, #errors, #has_errors?, included, #last_error, #safe_api_call
Instance Method Details
#fields ⇒ Object
30
31
32
|
# File 'lib/pwnix-api-client/system/sms.rb', line 30
def fields
%w{ sms_sender sms_recipient msg_subject msg_body smtp_server smtp_tls smtp_auth_user smtp_auth_password}
end
|
#hint ⇒ Object
21
22
23
24
25
26
27
28
|
# File 'lib/pwnix-api-client/system/sms.rb', line 21
def hint
puts "Options Hash for set() example:"
o = {}
fields.each do |f|
o[f] = "#{f}_value"
end
puts "\t#{o.inspect}"
end
|
#set(options = {}) ⇒ Object
12
13
14
|
# File 'lib/pwnix-api-client/system/sms.rb', line 12
def set(options={})
safe_api_call("/system/sms/set", { :configuration => options })
end
|
#status ⇒ Object
8
9
10
|
# File 'lib/pwnix-api-client/system/sms.rb', line 8
def status
safe_api_call("/system/sms/status")
end
|
#test(options = {}) ⇒ Object
16
17
18
19
|
# File 'lib/pwnix-api-client/system/sms.rb', line 16
def test(options={})
safe_api_call("/system/sms/test", { :configuration => options })
end
|