Class: Rexpense::Http
- Inherits:
-
Object
- Object
- Rexpense::Http
- Defined in:
- lib/rexpense/http.rb
Constant Summary collapse
- SANDBOX_URL =
"https://sandbox.rexpense.com/api"- PRODUCTION_URL =
"https://app.rexpense.com/api"
Instance Attribute Summary collapse
-
#base_url ⇒ Object
readonly
Returns the value of attribute base_url.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(token) ⇒ Http
constructor
A new instance of Http.
Constructor Details
#initialize(token) ⇒ Http
Returns a new instance of Http.
11 12 13 14 |
# File 'lib/rexpense/http.rb', line 11 def initialize(token) @token = token @base_url = api_url + "/api/#{Rexpense.configuration.version}" end |
Instance Attribute Details
#base_url ⇒ Object (readonly)
Returns the value of attribute base_url.
6 7 8 |
# File 'lib/rexpense/http.rb', line 6 def base_url @base_url end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
6 7 8 |
# File 'lib/rexpense/http.rb', line 6 def token @token end |