Class: BoundioV2::TelStatus
- Defined in:
- lib/boundioV2/tel_status.rb
Instance Attribute Summary collapse
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#end ⇒ Object
Returns the value of attribute end.
-
#from ⇒ Object
Returns the value of attribute from.
-
#id ⇒ Object
Returns the value of attribute id.
-
#start ⇒ Object
Returns the value of attribute start.
-
#status ⇒ Object
Returns the value of attribute status.
-
#to ⇒ Object
Returns the value of attribute to.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Resource
api_version, create, exceptions, #initialize, request
Constructor Details
This class inherits a constructor from BoundioV2::Resource
Instance Attribute Details
#duration ⇒ Object
Returns the value of attribute duration.
4 5 6 |
# File 'lib/boundioV2/tel_status.rb', line 4 def duration @duration end |
#end ⇒ Object
Returns the value of attribute end.
4 5 6 |
# File 'lib/boundioV2/tel_status.rb', line 4 def end @end end |
#from ⇒ Object
Returns the value of attribute from.
4 5 6 |
# File 'lib/boundioV2/tel_status.rb', line 4 def from @from end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/boundioV2/tel_status.rb', line 4 def id @id end |
#start ⇒ Object
Returns the value of attribute start.
4 5 6 |
# File 'lib/boundioV2/tel_status.rb', line 4 def start @start end |
#status ⇒ Object
Returns the value of attribute status.
4 5 6 |
# File 'lib/boundioV2/tel_status.rb', line 4 def status @status end |
#to ⇒ Object
Returns the value of attribute to.
4 5 6 |
# File 'lib/boundioV2/tel_status.rb', line 4 def to @to end |
Class Method Details
.find(id) ⇒ Object
6 7 8 9 |
# File 'lib/boundioV2/tel_status.rb', line 6 def find(id) res = request :get, "/tel_status", :tel_id => id parse(res["result"].first) end |
.find_all(options) ⇒ Object
11 12 13 14 |
# File 'lib/boundioV2/tel_status.rb', line 11 def find_all() res = request :get, "/tel_status", res["result"].map {|h| parse(h)} end |
Instance Method Details
#processing? ⇒ Boolean
23 24 25 |
# File 'lib/boundioV2/tel_status.rb', line 23 def processing? status == "架電待機" end |
#to_s ⇒ Object
27 28 29 |
# File 'lib/boundioV2/tel_status.rb', line 27 def to_s "TelStatus (#{id}): #{from} -> #{to}, #{start} - #{self.end}, #{status}" end |