Class: ATM::Services::Base
- Inherits:
-
Object
- Object
- ATM::Services::Base
- Extended by:
- Forwardable
- Includes:
- HTTParty
- Defined in:
- lib/atm_ruby/helpers/base_service.rb
Overview
ATM::Services::Base Base class for all of the services
Instance Attribute Summary collapse
-
#[] ⇒ Object
readonly
response - holds data after post/put/delete/get submited.
-
#auth_header ⇒ Object
readonly
Returns the value of attribute auth_header.
-
#header ⇒ Hash
readonly
-
access token for authentication.
-
-
#project_id ⇒ String
readonly
-
user set project id.
-
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(**options) ⇒ Base
constructor
A new instance of Base.
- #set_response(new_response) ⇒ Object
Constructor Details
#initialize(**options) ⇒ Base
Returns a new instance of Base.
21 22 23 24 |
# File 'lib/atm_ruby/helpers/base_service.rb', line 21 def initialize(**) self.class.base_uri [:base_url] @auth_header = [:auth_header] end |
Instance Attribute Details
#[] ⇒ Object (readonly)
response - holds data after post/put/delete/get submited
11 12 13 |
# File 'lib/atm_ruby/helpers/base_service.rb', line 11
def []
@[]
end
|
#auth_header ⇒ Object (readonly)
Returns the value of attribute auth_header.
18 19 20 |
# File 'lib/atm_ruby/helpers/base_service.rb', line 18 def auth_header @auth_header end |
#header ⇒ Hash (readonly)
-
access token for authentication
11 12 13 |
# File 'lib/atm_ruby/helpers/base_service.rb', line 11 def header @header end |
#project_id ⇒ String (readonly)
-
user set project id
11 12 13 |
# File 'lib/atm_ruby/helpers/base_service.rb', line 11 def project_id @project_id end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
18 19 20 |
# File 'lib/atm_ruby/helpers/base_service.rb', line 18 def response @response end |
Instance Method Details
#set_response(new_response) ⇒ Object
26 27 28 |
# File 'lib/atm_ruby/helpers/base_service.rb', line 26 def set_response(new_response) @response = new_response end |