Class: Skype::SMS
Constant Summary
collapse
- OBJECT_NAME =
"SMS"
Instance Attribute Summary
#property2callback, #property2symbol
Class Method Summary
collapse
Instance Method Summary
collapse
inherited, #initialize, new, notified, #to_s
#delNotify, #notified, #notify, #setNotify
#def_parser, #notice
#invoke_alter, #invoke_echo, #invoke_get, #invoke_one, #invoke_set
Class Method Details
.create(target, type = "OUTGOING") ⇒ Object
5
6
7
8
9
10
|
# File 'lib/skype/sms.rb', line 5
def create target, type="OUTGOING"
res = Skype.invoke "CREATE SMS #{type} #{target}"
res =~ /^SMS (\d+) STATUS (.+)$/
id, status = $1, $2
return id, status
end
|
.createConfirmationCodeRequest(target) ⇒ Object
Also known as:
create_confirmation_code_request
12
13
14
|
# File 'lib/skype/sms.rb', line 12
def createConfirmationCodeRequest target
create target, 'CONFIRMATION_CODE_REQUEST'
end
|
.delete(id) ⇒ Object
17
18
19
|
# File 'lib/skype/sms.rb', line 17
def delete id
Skype.invoke_echo "DELETE SMS #{id}"
end
|
Instance Method Details
#delete ⇒ Object
89
|
# File 'lib/skype/sms.rb', line 89
def delete() invoke_echo "DLETE SMS #{@id}" end
|
#get_body ⇒ Object
Also known as:
getBody
22
|
# File 'lib/skype/sms.rb', line 22
def get_body() invoke_get("BODY") end
|
#get_chunk(noOfChunks) ⇒ Object
Also known as:
getChunk
78
79
80
81
|
# File 'lib/skype/sms.rb', line 78
def get_chunk noOfChunks
res = invoke "CHUNK #{noOfChunks}"
return noOfChunks, res
end
|
#get_failure_reason ⇒ Object
Also known as:
getFailureReason
34
|
# File 'lib/skype/sms.rb', line 34
def get_failure_reason() invoke_get("FAILUREREASON") end
|
#get_is_failed_unseen? ⇒ Boolean
Also known as:
getIsFailedUnseen?
38
|
# File 'lib/skype/sms.rb', line 38
def get_is_failed_unseen?() invoke_get("IS_FAILED_UNSEEN") end
|
#get_price ⇒ Object
Also known as:
getPrice
46
|
# File 'lib/skype/sms.rb', line 46
def get_price() parse :price, invoke_get("PRICE") end
|
#get_price_currency ⇒ Object
Also known as:
getPriceCurrency
54
|
# File 'lib/skype/sms.rb', line 54
def get_price_currency() invoke_get("PRICE_CURRENCY") end
|
#get_price_precision ⇒ Object
Also known as:
getPricePrecision
50
|
# File 'lib/skype/sms.rb', line 50
def get_price_precision() parse :price_precision, invoke_get("PRICE_PRECISION") end
|
#get_reply_to_number ⇒ Object
Also known as:
getReplyToNumber
58
|
# File 'lib/skype/sms.rb', line 58
def get_reply_to_number() invoke_get("REPLY_TO_NUMBER") end
|
#get_status ⇒ Object
Also known as:
getStatus
30
|
# File 'lib/skype/sms.rb', line 30
def get_status() invoke_get("STATUS") end
|
#get_target_numbers ⇒ Object
Also known as:
getTargetNumbers
62
|
# File 'lib/skype/sms.rb', line 62
def get_target_numbers() parse :target_numbers, invoke_get("TARGET_NUMBERS") end
|
#get_target_statuses ⇒ Object
Also known as:
getTargetStatuses
66
|
# File 'lib/skype/sms.rb', line 66
def get_target_statuses() parse :target_statuses, invoke_get("TARGET_STATUSES") end
|
#get_timestamp ⇒ Object
Also known as:
getTimestamp
42
|
# File 'lib/skype/sms.rb', line 42
def get_timestamp() parse :timestamp, invoke_get("TIMESTAMP") end
|
#get_type ⇒ Object
Also known as:
getType
26
|
# File 'lib/skype/sms.rb', line 26
def get_type() invoke_get("TYPE") end
|
#send ⇒ Object
87
|
# File 'lib/skype/sms.rb', line 87
def send() invoke_alter "SEND" end
|
#set_body(text) ⇒ Object
Also known as:
setBody
84
|
# File 'lib/skype/sms.rb', line 84
def set_body(text) invoke_set "BODY", text end
|
#set_reply_to_number(pstn) ⇒ Object
Also known as:
setReplyToNumber
100
|
# File 'lib/skype/sms.rb', line 100
def set_reply_to_number(pstn) invoke_set "REPLY_TO_NUMBER", pstn end
|
#set_seen ⇒ Object
Also known as:
setSeen
97
|
# File 'lib/skype/sms.rb', line 97
def set_seen() invoke_set "SEEN" end
|
#set_target_number(*nums) ⇒ Object
Also known as:
setTargetNumber
91
92
93
94
|
# File 'lib/skype/sms.rb', line 91
def set_target_number *nums
nums = nums[0] if nums[0].class == Array
invoke_set "TARGET_NUMBERS", nums.join(', ')
end
|