Class: Ucp::Util::SmsRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/ucp/util/sms_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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,=nil,source_ip=nil,source_port=nil)
  @account=
  @source_ip=source_ip
  @source_port=source_port
  @originator=originator
  @recipient=recipient
  @text=text
end

Instance Attribute Details

#accountObject (readonly)

Returns the value of attribute account.



23
24
25
# File 'lib/ucp/util/sms_request.rb', line 23

def 
  @account
end

#message_refObject (readonly)

Returns the value of attribute message_ref.



23
24
25
# File 'lib/ucp/util/sms_request.rb', line 23

def message_ref
  @message_ref
end

#originatorObject (readonly)

Returns the value of attribute originator.



23
24
25
# File 'lib/ucp/util/sms_request.rb', line 23

def originator
  @originator
end

#part_nrObject (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

#recipientObject (readonly)

Returns the value of attribute recipient.



23
24
25
# File 'lib/ucp/util/sms_request.rb', line 23

def recipient
  @recipient
end

#source_ipObject (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_portObject (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

#textObject (readonly)

Returns the value of attribute text.



23
24
25
# File 'lib/ucp/util/sms_request.rb', line 23

def text
  @text
end

#total_partsObject (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

Returns:

  • (Boolean)


40
41
42
# File 'lib/ucp/util/sms_request.rb', line 40

def complete?
  return @total_parts==1
end

#partial?Boolean

Returns:

  • (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(message_ref,part_nr,total_parts)
  @message_ref=message_ref
  @part_nr=part_nr
  @total_parts=total_parts
end