Class: Sent
- Inherits:
-
Applications
- Object
- Applications
- Sent
- Defined in:
- lib/coolsms/sent.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
Returns the value of attribute count.
-
#end ⇒ Object
DateFormat YYYY-MM-DD HH:MI:SS.
-
#gid ⇒ Object
Returns the value of attribute gid.
-
#mid ⇒ Object
Returns the value of attribute mid.
-
#notin_resultcode ⇒ Object
Returns the value of attribute notin_resultcode.
-
#page ⇒ Object
Returns the value of attribute page.
-
#rcpt ⇒ Object
Returns the value of attribute rcpt.
-
#resultcode ⇒ Object
Returns the value of attribute resultcode.
-
#start ⇒ Object
Date Format YYYY-MM-DD HH:MI:SS.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Sent
constructor
A new instance of Sent.
- #sent ⇒ Object
Methods inherited from Applications
Constructor Details
#initialize(options = {}) ⇒ Sent
Returns a new instance of Sent.
25 26 27 |
# File 'lib/coolsms/sent.rb', line 25 def initialize(={}) self.set_fields( ) end |
Instance Attribute Details
#count ⇒ Object
Returns the value of attribute count.
3 4 5 |
# File 'lib/coolsms/sent.rb', line 3 def count @count end |
#end ⇒ Object
DateFormat YYYY-MM-DD HH:MI:SS
13 14 15 |
# File 'lib/coolsms/sent.rb', line 13 def end @end end |
#gid ⇒ Object
Returns the value of attribute gid.
23 24 25 |
# File 'lib/coolsms/sent.rb', line 23 def gid @gid end |
#mid ⇒ Object
Returns the value of attribute mid.
21 22 23 |
# File 'lib/coolsms/sent.rb', line 21 def mid @mid end |
#notin_resultcode ⇒ Object
Returns the value of attribute notin_resultcode.
19 20 21 |
# File 'lib/coolsms/sent.rb', line 19 def notin_resultcode @notin_resultcode end |
#page ⇒ Object
Returns the value of attribute page.
5 6 7 |
# File 'lib/coolsms/sent.rb', line 5 def page @page end |
#rcpt ⇒ Object
Returns the value of attribute rcpt.
7 8 9 |
# File 'lib/coolsms/sent.rb', line 7 def rcpt @rcpt end |
#resultcode ⇒ Object
Returns the value of attribute resultcode.
17 18 19 |
# File 'lib/coolsms/sent.rb', line 17 def resultcode @resultcode end |
#start ⇒ Object
Date Format YYYY-MM-DD HH:MI:SS
10 11 12 |
# File 'lib/coolsms/sent.rb', line 10 def start @start end |
#status ⇒ Object
Returns the value of attribute status.
15 16 17 |
# File 'lib/coolsms/sent.rb', line 15 def status @status end |
Instance Method Details
#sent ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/coolsms/sent.rb', line 29 def sent fields = self.fields( :count, :page, :rcpt, :start, :end, :status, :resultcode, :notin_resultcode, :mid, :gid ) res = Request.new.get( "sent", fields ) if res.code == "200" body = JSON.parse( res.body ) { ret: true, message: body, code: res.code } else { ret: false, code: res.code } end end |