Class: Gupshup::REST::Api::V1
- Defined in:
- lib/gupshup-rb/rest/api/v1.rb,
lib/gupshup-rb/rest/api/v1/message.rb
Defined Under Namespace
Classes: MessageList
Instance Attribute Summary
Attributes inherited from Version
Instance Method Summary collapse
-
#initialize(domain) ⇒ V1
constructor
Initialize the V1 version of Api.
- #messages(sid = :unset) ⇒ Object
-
#to_s ⇒ Object
Provide a user friendly representation.
Methods inherited from Version
#absolute_url, #create, #delete, #exception, #fetch, #page, #read_limits, #relative_uri, #request, #stream, #update
Constructor Details
#initialize(domain) ⇒ V1
Initialize the V1 version of Api
8 9 10 11 12 |
# File 'lib/gupshup-rb/rest/api/v1.rb', line 8 def initialize(domain) super @version = 'v1' @solution = {} end |
Instance Method Details
#messages(sid = :unset) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/gupshup-rb/rest/api/v1.rb', line 14 def (sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? @messages = V1::MessageList.new(@version, src_name: @solution[:sid], ) @messages end |
#to_s ⇒ Object
Provide a user friendly representation
23 24 25 |
# File 'lib/gupshup-rb/rest/api/v1.rb', line 23 def to_s '<Gupshup::REST::Api::V1>' end |