Class: Nuvemshop::Request
- Inherits:
-
Object
- Object
- Nuvemshop::Request
- Includes:
- HTTParty
- Defined in:
- lib/nuvemshop/request.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Error
Constant Summary collapse
- BASE_URL =
'https://api.tiendanube.com/v1'.freeze
Instance Attribute Summary collapse
-
#access_token ⇒ Object
readonly
Returns the value of attribute access_token.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#response ⇒ Object
Returns the value of attribute response.
-
#user_id ⇒ Object
readonly
Returns the value of attribute user_id.
Class Method Summary collapse
Instance Method Summary collapse
- #delete(opts = {}) ⇒ Object
- #get(opts = {}) ⇒ Object
-
#initialize(*block) {|block| ... } ⇒ Request
constructor
A new instance of Request.
- #post(opts = {}) ⇒ Object
- #put(opts = {}) ⇒ Object
Constructor Details
Instance Attribute Details
#access_token ⇒ Object (readonly)
Returns the value of attribute access_token.
8 9 10 |
# File 'lib/nuvemshop/request.rb', line 8 def access_token @access_token end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
8 9 10 |
# File 'lib/nuvemshop/request.rb', line 8 def @options end |
#response ⇒ Object
Returns the value of attribute response.
7 8 9 |
# File 'lib/nuvemshop/request.rb', line 7 def response @response end |
#user_id ⇒ Object (readonly)
Returns the value of attribute user_id.
8 9 10 |
# File 'lib/nuvemshop/request.rb', line 8 def user_id @user_id end |
Class Method Details
Instance Method Details
#delete(opts = {}) ⇒ Object
31 32 33 |
# File 'lib/nuvemshop/request.rb', line 31 def delete(opts = {}) perform_request(__method__, opts) end |
#get(opts = {}) ⇒ Object
19 20 21 |
# File 'lib/nuvemshop/request.rb', line 19 def get(opts = {}) perform_request(__method__, opts) end |
#post(opts = {}) ⇒ Object
23 24 25 |
# File 'lib/nuvemshop/request.rb', line 23 def post(opts = {}) perform_request(__method__, opts) end |
#put(opts = {}) ⇒ Object
27 28 29 |
# File 'lib/nuvemshop/request.rb', line 27 def put(opts = {}) perform_request(__method__, opts) end |