Class: Ucp::Util::SmsRequest
- Inherits:
-
Object
- Object
- Ucp::Util::SmsRequest
- Defined in:
- lib/ucp/util/sms_request.rb
Instance Attribute Summary collapse
-
#account ⇒ Object
readonly
Returns the value of attribute account.
-
#message_ref ⇒ Object
readonly
Returns the value of attribute message_ref.
-
#originator ⇒ Object
readonly
Returns the value of attribute originator.
-
#part_nr ⇒ Object
readonly
Returns the value of attribute part_nr.
-
#recipient ⇒ Object
readonly
Returns the value of attribute recipient.
-
#source_ip ⇒ Object
readonly
Returns the value of attribute source_ip.
-
#source_port ⇒ Object
readonly
Returns the value of attribute source_port.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
-
#total_parts ⇒ Object
readonly
Returns the value of attribute total_parts.
Instance Method Summary collapse
- #complete? ⇒ Boolean
-
#initialize(originator, recipient, text, account = nil, source_ip = nil, source_port = nil) ⇒ SmsRequest
constructor
A new instance of SmsRequest.
- #partial? ⇒ Boolean
- #set_parts_info(message_ref, part_nr, total_parts) ⇒ Object
Constructor Details
#initialize(originator, recipient, text, account = nil, source_ip = nil, source_port = nil) ⇒ SmsRequest
Returns a new instance of SmsRequest.
25 26 27 28 29 30 31 32 |
# File 'lib/ucp/util/sms_request.rb', line 25 def initialize(originator,recipient,text,account=nil,source_ip=nil,source_port=nil) @account=account @source_ip=source_ip @source_port=source_port @originator=originator @recipient=recipient @text=text end |
Instance Attribute Details
#account ⇒ Object (readonly)
Returns the value of attribute account.
23 24 25 |
# File 'lib/ucp/util/sms_request.rb', line 23 def account @account end |
#message_ref ⇒ Object (readonly)
Returns the value of attribute message_ref.
23 24 25 |
# File 'lib/ucp/util/sms_request.rb', line 23 def @message_ref end |
#originator ⇒ Object (readonly)
Returns the value of attribute originator.
23 24 25 |
# File 'lib/ucp/util/sms_request.rb', line 23 def originator @originator end |
#part_nr ⇒ Object (readonly)
Returns the value of attribute part_nr.
23 24 25 |
# File 'lib/ucp/util/sms_request.rb', line 23 def part_nr @part_nr end |
#recipient ⇒ Object (readonly)
Returns the value of attribute recipient.
23 24 25 |
# File 'lib/ucp/util/sms_request.rb', line 23 def recipient @recipient end |
#source_ip ⇒ Object (readonly)
Returns the value of attribute source_ip.
23 24 25 |
# File 'lib/ucp/util/sms_request.rb', line 23 def source_ip @source_ip end |
#source_port ⇒ Object (readonly)
Returns the value of attribute source_port.
23 24 25 |
# File 'lib/ucp/util/sms_request.rb', line 23 def source_port @source_port end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
23 24 25 |
# File 'lib/ucp/util/sms_request.rb', line 23 def text @text end |
#total_parts ⇒ Object (readonly)
Returns the value of attribute total_parts.
23 24 25 |
# File 'lib/ucp/util/sms_request.rb', line 23 def total_parts @total_parts end |
Instance Method Details
#complete? ⇒ Boolean
40 41 42 |
# File 'lib/ucp/util/sms_request.rb', line 40 def complete? return @total_parts==1 end |
#partial? ⇒ Boolean
44 45 46 |
# File 'lib/ucp/util/sms_request.rb', line 44 def partial? return @total_parts>1 end |
#set_parts_info(message_ref, part_nr, total_parts) ⇒ Object
34 35 36 37 38 |
# File 'lib/ucp/util/sms_request.rb', line 34 def set_parts_info(,part_nr,total_parts) @message_ref= @part_nr=part_nr @total_parts=total_parts end |