Class: V2Intuity::Endpoints::Stream
- Defined in:
- lib/v2_intuity/endpoints/stream.rb
Constant Summary
Constants inherited from Endpoint
Instance Attribute Summary
Attributes inherited from Endpoint
#base_uri, #endpoint, #id, #org_id, #path, #token
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Stream
constructor
A new instance of Stream.
- #uri(options = {}) ⇒ Object
- #uri_options(options = {}) ⇒ Object
Methods inherited from Endpoint
Constructor Details
Instance Method Details
#uri(options = {}) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/v2_intuity/endpoints/stream.rb', line 12 def uri( = {}) () if @id.nil? "#{@base_uri}/#{@endpoint}" else "#{@base_uri}/#{@endpoint}/#{@id}" end end |
#uri_options(options = {}) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/v2_intuity/endpoints/stream.rb', line 21 def ( = {}) @base_uri ||= [:base_uri] @id ||= [:id] raise 'base_uri is needed' unless @base_uri end |